cannot add rtsp audio stream

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
keithg
Posts: 9
Joined: March 7th, 2019, 12:56 am

cannot add rtsp audio stream

Post by keithg »

I have been racking my head about this today. I want to listen to an audio stream with MPD.

Code: Select all

rtsp://wowza.radia.cz:1935/CRo/DDur.stream
if I put this in vlc it plays. If I add it to mpd and try to play it, I get nothing:

Code: Select all

 mpc add "rtsp://wowza.radia.cz:1935/CRo/DDur.stream"
I stepped all the way back to ffmpeg. If I put this in, it connects to the stream and plays it:

Code: Select all

 ffplay -nodisp "rtsp://wowza.radia.cz:1935/CRo/DDur.stream" > aplay
ffplay version n4.2.3 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9.3.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-omx --enable-shared --enable-version3 --host-cflags='"-fPIC"'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[rtsp @ 0x7f88000ba0] UDP timeout, retrying with TCP=    0B f=0/0
Input #0, rtsp, from 'rtsp://wowza.radia.cz:1935/CRo/DDur.stream':
  Metadata:
    title           : DDur.stream
  Duration: N/A, start: 0.092018, bitrate: N/A
    Stream #0:0: Audio: aac (HE-AAC), 44100 Hz, stereo, fltp
I can actually hear it play through the alsa output device. If I just put the URL, I get this:

Code: Select all

Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)
Playing raw data 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
When I look in the MPD log, I see this:

Code: Select all

ERROR: Failed to decode rtsp://wowza.radia.cz:1935/CRo/DDur.stream; Protocol not found
do we need to disable video output to be able to play rtsp audio streams? If so, how do we do that? Is there another flag I need to set somewhere to play these streams?

Regards,

Keith
Last edited by keithg on July 27th, 2020, 3:50 pm, edited 1 time in total.
keithg
Posts: 9
Joined: March 7th, 2019, 12:56 am

Re: cannot add rtsp audio stream

Post by keithg »

I was also able to get it to play on my preferred alsa device with this command:

Code: Select all

ffmpeg -i rtsp://wowza.radia.cz:1935/CRo/DDur.stream -f alsa hw:1,0

Code: Select all

#  ffmpeg -i rtsp://wowza.radia.cz:1935/CRo/DDur.stream -f alsa hw:1,0
ffmpeg version n4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-omx --enable-shared --enable-version3 --host-cflags='"-fPIC"'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[rtsp @ 0x559a682e20] UDP timeout, retrying with TCP
Input #0, rtsp, from 'rtsp://wowza.radia.cz:1935/CRo/DDur.stream':
  Metadata:
    title           : DDur.stream
  Duration: N/A, start: 0.233016, bitrate: N/A
    Stream #0:0: Audio: aac (HE-AAC), 44100 Hz, stereo, fltp
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, alsa, to 'hw:1,0':
  Metadata:
    title           : DDur.stream
    encoder         : Lavf58.29.100
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_s16le
[alsa @ 0x559a6b46a0] ALSA buffer xrun.
size=N/A time=00:00:21.64 bitrate=N/A speed=   1x
keithg
Posts: 9
Joined: March 7th, 2019, 12:56 am

Re: cannot add rtsp audio stream

Post by keithg »

I forgot to add my mpd info...

Code: Select all

Music Player Daemon 0.21.25 (0.21.25)
Copyright 2003-2007 Warren Dukes 
Copyright 2008-2018 Max Kellermann 
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [wildmidi] mid
 [fluidsynth] mid
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao oss openal solaris pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file archive alsa tidal qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// tidal:// qobuz:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// mms:// mmsh:// mmst:// mmsu:// cdda://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un
max
Forum team
Posts: 1137
Joined: January 15th, 2013, 3:43 pm

Re: cannot add rtsp audio stream

Post by max »

This error you're seeing is a FFmpeg error. But I don't know why the FFmpeg library fails, while the "ffmpeg" command-line tool does not.
keithg
Posts: 9
Joined: March 7th, 2019, 12:56 am

Re: cannot add rtsp audio stream

Post by keithg »

How can I go about further diagnosis?
Post Reply