We hace a video camera (transmitting using RTSP) connected to an Odroid C4. We want to send the streaming to a OvenMediaEngine using RTMP. For us to achieve this goal, we run this command:
ffmpeg -rtsp_transport tcp -nostdin -i "rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub" -threads 1 -cod
ec copy -f flv -flvflags no_duration_filesize -an "rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx"
Apparently the transmition is fine but, after a while (this "while" ranges from a few hours to a few days) the ffmpeg command stops working, with the following message [rtsp @ 0x55a46347b0] CSeq 3005 expected
:
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
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
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, rtsp, from 'rtsp://admin:xxxxxx@aaa.aaa.a.aaa:ppp//h264Preview_01_sub':
Metadata:
title : Session streamed by "preview"
comment : h264Preview_01_sub
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x360, 25 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Output #0, flv, to 'rtmp://xxxxx.xxxx.xx:pppp/xxxxxxx':
Metadata:
title : Session streamed by "preview"
comment : h264Preview_01_sub
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 640x360, q=2-31, 25 tbr, 1k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
[flv @ 0x55a463c220] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[rtsp @ 0x55a46347b0] CSeq 3005 expected, 0 received.1:25.81 bitrate= 207.3kbits/s speed= 1x
Last message repeated 1 times
We thought at first this was due to the limitation of ffmpeg when it is run on background (that's the reason for the nostdin
option), but it keeps on failing. Looking online, we also found that it could be some issue of the file size (hence the no_duration_filesize option
).
The weird part is the process is still running (if you check it using a top
or ps
command) when it fails, but it has to be rebooted to resume the transmision.
Any clues will be most welcome! Thank you.