Opened 9 years ago
Last modified 9 years ago
#3222 new defect
RTSP (client): Fallback to TCP causes 454 Session Not Found
Reported by: | GstBlub | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | rtsp tcp |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
The fallback mechanism to TCP when UDP times out seems to not work properly. I can't get this stream to work with ffmpeg, but it works fine with vlc and windows media player: rtsp://strm01.novotempo.org.br/radionovotempo-vivo
I always get this error: method SETUP failed: 454 Session Not Found
If I force ffmpeg to use TCP (using -rtsp_transport tcp), it works.
How to reproduce:
% ffmpeg -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -rtsp_transport tcp -acodec copy -vcodec copy test.file ffmpeg 2.1 (arm) ... [rtsp @ 0x59480] UDP timeout, retrying with TCP [rtsp @ 0x59480] method SETUP failed: 454 Session Not Found [rtsp @ 0x59480] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
Forcing it to TCP however makes it work (disregard the decoding errors):
% ffmpeg -rtsp_transport tcp -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -acodec copy -vcodec copy test.file ... [mp3 @ 0x5da80] Header missing Last message repeated 51 times [rtsp @ 0x59460] decoding for stream 0 failed [rtsp @ 0x59460] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
Change History (6)
comment:1 by , 9 years ago
follow-up: 4 comment:2 by , 9 years ago
Yes, I just compiled ffmpeg from git head and it's failing the same way:
LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./ffmpeg -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -rtsp_transport tcp -acodec copy -vcodec copy test.file ffmpeg version N-59032-g3dbf9af Copyright (c) 2000-2013 the FFmpeg developers built on Dec 12 2013 14:49:25 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: --prefix=/home/gstblub/ffmpeg_build --bindir=/home/gstblub/ffmpeg_build/bin --enable-shared --enable-network --disable-protocols --enable-protocol=file --enable-protocol=tcp --enable-protocol=udp --disable-demuxers --enable-demuxer=asf --enable-demuxer=rtsp --enable-demuxer=ape --disable-decoders --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmapro --enable-decoder=wmalossless --enable-decoder=mp2 --enable-decoder=mp3 --disable-encoders --disable-muxers --enable-muxer=adts --enable-muxer=asf --enable-muxer=asf_stream --disable-parsers --enable-parser=aac --disable-bsfs --disable-devices --disable-filters libavutil 52. 58.100 / 52. 58.100 libavcodec 55. 45.101 / 55. 45.101 libavformat 55. 22.100 / 55. 22.100 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 92.100 / 3. 92.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 [rtsp @ 0xdeba00] UDP timeout, retrying with TCP [rtsp @ 0xdeba00] method SETUP failed: 454 Session Not Found [rtsp @ 0xdeba00] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
Forcing it into TCP doesn't trigger the 454 Session Not Found error:
LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./ffmpeg -rtsp_transport tcp -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -rtsp_transport tcp -acodec copy -vcodec copy test.file ffmpeg version N-59032-g3dbf9af Copyright (c) 2000-2013 the FFmpeg developers built on Dec 12 2013 14:49:25 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: --prefix=/home/gstblub/ffmpeg_build --bindir=/home/bstblub/ffmpeg_build/bin --enable-shared --enable-network --disable-protocols --enable-protocol=file --enable-protocol=tcp --enable-protocol=udp --disable-demuxers --enable-demuxer=asf --enable-demuxer=rtsp --enable-demuxer=ape --disable-decoders --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmapro --enable-decoder=wmalossless --enable-decoder=mp2 --enable-decoder=mp3 --disable-encoders --disable-muxers --enable-muxer=adts --enable-muxer=asf --enable-muxer=asf_stream --disable-parsers --enable-parser=aac --disable-bsfs --disable-devices --disable-filters libavutil 52. 58.100 / 52. 58.100 libavcodec 55. 45.101 / 55. 45.101 libavformat 55. 22.100 / 55. 22.100 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 92.100 / 3. 92.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 [mp3 @ 0x2092c20] Header missing Last message repeated 51 times [rtsp @ 0x208cae0] decoding for stream 0 failed [rtsp @ 0x208cae0] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
follow-up: 6 comment:3 by , 9 years ago
Keywords: | fallback session removed |
---|---|
Version: | 2.1.1 → git-master |
I cannot reproduce the problem you are describing here but I opened ticket #3223 for the regression.
$ ffmpeg -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo ffmpeg version N-59032-g3dbf9af Copyright (c) 2000-2013 the FFmpeg developers built on Dec 12 2013 23:44:02 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 52. 58.100 / 52. 58.100 libavcodec 55. 45.101 / 55. 45.101 libavformat 55. 22.100 / 55. 22.100 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 92.100 / 3. 92.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 [mp3 @ 0x2f890e0] Header missing Last message repeated 51 times [rtsp @ 0x2f83100] decoding for stream 0 failed [rtsp @ 0x2f83100] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
comment:4 by , 9 years ago
Replying to GstBlub:
configuration: --prefix=/home/gstblub/ffmpeg_build --bindir=/home/gstblub/ffmpeg_build/bin --enable-shared --enable-network --disable-protocols --enable-protocol=file --enable-protocol=tcp --enable-protocol=udp --disable-demuxers --enable-demuxer=asf --enable-demuxer=rtsp --enable-demuxer=ape --disable-decoders --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmapro --enable-decoder=wmalossless --enable-decoder=mp2 --enable-decoder=mp3 --disable-encoders --disable-muxers --enable-muxer=adts --enable-muxer=asf --enable-muxer=asf_stream --disable-parsers --enable-parser=aac --disable-bsfs --disable-devices --disable-filters
Sorry, I had not seen this originally: Could you test with ./configure && make
?
comment:5 by , 9 years ago
Didn't make much of a difference for me. Falling back to TCP still fails:
ffmpeg -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -rtsp_transport tcp -acodec copy -vcodec copy test.file ffmpeg version N-59032-g3dbf9af Copyright (c) 2000-2013 the FFmpeg developers built on Dec 13 2013 08:28:39 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: --prefix=/home/gstblub/ffmpeg_build --bindir=/home/gstblub/ffmpeg_build/bin libavutil 52. 58.100 / 52. 58.100 libavcodec 55. 45.101 / 55. 45.101 libavformat 55. 22.100 / 55. 22.100 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 92.100 / 3. 92.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 [rtsp @ 0x33e4a00] UDP timeout, retrying with TCP [rtsp @ 0x33e4a00] method SETUP failed: 454 Session Not Found [rtsp @ 0x33e4a00] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
Forcing it to TCP:
ffmpeg -rtsp_transport tcp -i rtsp://strm01.novotempo.org.br/radionovotempo-vivo -acodec copy -vcodec copy test.file ffmpeg version N-59032-g3dbf9af Copyright (c) 2000-2013 the FFmpeg developers built on Dec 13 2013 08:28:39 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: --prefix=/home/gstblub/ffmpeg_build --bindir=/home/gstblub/ffmpeg_build/bin libavutil 52. 58.100 / 52. 58.100 libavcodec 55. 45.101 / 55. 45.101 libavformat 55. 22.100 / 55. 22.100 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 92.100 / 3. 92.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 [mp3 @ 0x2c14340] Header missing Last message repeated 51 times [rtsp @ 0x2c0e9e0] decoding for stream 0 failed [rtsp @ 0x2c0e9e0] Could not find codec parameters for stream 0 (Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, 2 channels, s16p, 256 kb/s): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options rtsp://strm01.novotempo.org.br/radionovotempo-vivo: could not find codec parameters
comment:6 by , 9 years ago
Replying to cehoyos:
I cannot reproduce the problem you are describing here but I opened ticket #3223 for the regression.
Are you behind a router/NAT? I am, and in my case the UDP packets are not getting through, which is why it's trying to fall back to TCP. What if you run your test with -rtsp_transport udp? If this doesn't time out I suspect you are either not behind a router/NAT or your router has a "smart" feature like connection tracking/sensing enabled or the appropriate ports mapped.
Is this reproducible with current git head?
To make this a valid ticket, please post the failing
ffmpeg -i
command together with the complete, uncut console output.