[FFmpeg-user] ffmpeg hanging indefinately if streaming connection dies

Andrew Wood andrewjameswood at ymail.com
Wed Aug 13 00:10:23 EEST 2025


On 12/08/2025 22:02, Ferdi Scholten wrote:
>
>
> On 12-08-2025 22:35, Andrew Wood via ffmpeg-user wrote:
>> Ive just upgraded to ffmpeg 5.1.6 (the version that comes with Debian 
>> 12) from an older version. A command which has worked fine for years 
>> recording a camera rtsp stream and automatically exiting if the 
>> camera connection dies has now started hanging forever if the camera 
>> stops responding.
> Please state the full command and preferably it's output in the 
> terminal here if you want help.
> Also 5.1.6 is ancient, We're at 7.1 currently
>>
>> Has something been altered in ffmpeg and is there a command option to 
>> make it work as before? I tried -xerror but that is causing it to 
>> exit due to 'Non-monotonous DTS in output stream 0:0; previous: 0, 
>> current: 0; aborting' even when the stream is working
> Lots of things might have changed, but we can't help if we don't know 
> what you are doing.
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


This is the full command:

ffmpeg -y -loglevel fatal  -i rtsp://192.168.111.2:554 -acodec copy 
-vcodec copy -metadata title=MyVideo /path/to/video.mp4

The version I have:

ffmpeg version 5.1.6-0+deb12u1+rpt3 Copyright (c) 2000-2024 the FFmpeg 
developers
   built with gcc 12 (Debian 12.2.0-14)
   configuration: --prefix=/usr --extra-version=0+deb12u1+rpt3 
--toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu 
--enable-gpl --disable-stripping --disable-mmal --enable-gnutls 
--enable-ladspa --enable-libaom --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 
--enable-libdav1d --enable-libflite --enable-libfontconfig 
--enable-libfreetype --enable-libfribidi --enable-libglslang 
--enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame 
--enable-libmysofa --enable-libopenjpeg --enable-libopenmpt 
--enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist 
--enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh 
--enable-libsvtav1 --enable-libtheora --enable-libtwolame 
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp 
--enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg 
--enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx 
--enable-openal --enable-opencl --enable-opengl --enable-sand 
--enable-sdl2 --disable-sndio --enable-libjxl --enable-neon 
--enable-v4l2-request --enable-libudev --enable-epoxy 
--libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx 
--enable-librsvg --enable-libdc1394 --enable-libdrm --enable-vout-drm 
--enable-libiec61883 --enable-chromaprint --enable-frei0r 
--enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
   libavutil      57. 28.100 / 57. 28.100
   libavcodec     59. 37.100 / 59. 37.100
   libavformat    59. 27.100 / 59. 27.100
   libavdevice    59.  7.100 / 59.  7.100
   libavfilter     8. 44.100 /  8. 44.100
   libswscale      6.  7.100 /  6.  7.100
   libswresample   4.  7.100 /  4.  7.100



More information about the ffmpeg-user mailing list