[FFmpeg-user] timeout error when reading RTSP/RTP incoming audio stream

Yannick Barbeaux yannick.barbeaux at keemotion.com
Mon Jun 15 10:28:39 EEST 2020


Hello
I am struggling to read a multicast audio RTP stream controlled by RTSP. As
soon as I launch the ffplay or ffmpeg command, the RTP traffic starts
(tcpdump) on port 5004/UDP (as advertised in the SDP file), so it should
read the stream correctly but I finally get a time-out instead (and empty
out file). The very same RTSP URL can be read without any issue with VLC or
with rtpdump+sox.

$ ffmpeg -y -rtsp_transport udp_multicast -i "rtsp://
192.168.2.148:554/by-name/AES67-stream (on hasseb-AoE-F8-82)" -vn -f s24le
-ar 48000 -c:a pcm_s24be out.raw
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --disable-debug
--enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb
--enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb
--enable-libpulse --enable-libfreetype --enable-gnutl
s --enable-libdav1d --enable-libx264 --enable-libx265 --enable-libfdk-aac
--enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx
--enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr
--enable-libxvid --enable-libvidstab --enable-libtheora --en
able-libwavpack --enable-libopenjpeg --enable-libgsm --enable-nvenc
--enable-libzimg --enable-libaom
  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
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, rtsp, from 'rtsp://192.168.2.148:554/by-name/AES67-stream (on
hasseb-AoE-F8-82)':
Metadata:
    title           : AES67-stream (on hasseb-AoE-F8-82) streamed by
"hasseb"
  Duration: N/A, bitrate: 2304 kb/s
    Stream #0:0: Audio: pcm_s24be, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s24be (native) -> pcm_s24be (native))
Press [q] to stop, [?] for help
rtsp://192.168.2.148:554/by-name/AES67-stream (on hasseb-AoE-F8-82):
Connection timed out
Output #0, s24le, to 'out.raw':
  Metadata:
    title           : AES67-stream (on hasseb-AoE-F8-82) streamed by
"hasseb"
    encoder         : Lavf58.29.100
    Stream #0:0: Audio: pcm_s24be, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_s24be
size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames
parameters if used)

The SDP file is :

v=0
o=- 254522267104 0 IN IP4 192.168.2.148
s=AES67-stream (on hasseb-AoE-F8-82) streamed by "hasseb"
t=0 0
a=clock-domain:PTPv2 0
a=recvonly
m=audio 5004 RTP/AVP 98
c=IN IP4 239.123.123.123/255
a=rtpmap:98 L24/48000/2
a=sync-time:0
a=framecount:48
a=source-filter: incl IN IP4 239.123.123.123 192.168.2.148
a=ts-refclk:ptp=IEEE1588-2008:00-10-4b-ff-fe-2e-f8-82:domain-nmbr=0
a=mediaclk:direct=0
a=ptime:1

Comparing those files, we see that ffmpeg detects the correct
audio settings (pcm_s24be, 48000 Hz, stereo, s32 (24 bit)) so I cannot
figure out why it can't read the data stream? I have tried to increase the
timeout but that did not help.

Any help would be appreciated. Thank you.

Yannick


More information about the ffmpeg-user mailing list