“FIFO 队列已满”和“无法使用正确的持续时间更新标题”且 Mux 通道数超过 1 个

“FIFO 队列已满”和“无法使用正确的持续时间更新标题”且 Mux 通道数超过 1 个

我正在使用 ffmpeg 4.3 在 Ubuntu 20.04 上从 Blackmagick Decklink Mini Recorder 4K 采集卡采集视频,我想将其发送到几个不同的服务器进行重新流式传输。视频信号为 1080 25p。

这是我正在使用的命令:

ffmpeg -thread_queue_size 2048 -f decklink -video_input sdi -audio_input embedded -i 'DeckLink Mini Recorder 4K' -threads 4 \
-filter_complex \
"[0:v]fps=25,split=2[s720][s360]; \
[s720]scale=-2:720[v720]; \
[s360]scale=-2:360[v360]" \
-map "[v720]" -bufsize:v:0 1600k -maxrate:v:0 1600k -flvflags no_duration_filesize -flags +global_header \
-map "[v360]" -bufsize:v:0 1200k -maxrate:v:0 1200k -flvflags no_duration_filesize -flags +global_header \
-map a:0 \
-profile:v:0 main -bf 0 -c:v libx264 -tune zerolatency -c:a aac -b:a 96k -preset veryfast -crf 25 -pix_fmt yuv420p -g 50 -f tee \
"[select=\'v:0,a\':f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]rtmp://some address|\
[select=\'v:1,a\':f=fifo:fifo_format=flv:drop_pkts_on_overflow=1:attempt_recovery=1:recovery_wait_time=1]rtmp://some-other-address"

我收到以下信息:

[flv @ 0x555f95bf1280] Failed to update header with correct duration.
[flv @ 0x555f95bf1280] Failed to update header with correct filesize.
[rtmp @ 0x7f58240094c0] Ignoring unsupported var reason1.40 bitrate=N/A speed=   1x
[fifo @ 0x555f95beea80] FIFO queue fullN/A time=00:00:21.88 bitrate=N/A speed=   1x
[fifo @ 0x555f95beea80] Recovery successfultime=00:00:22.92 bitrate=N/A speed=   1x
[fifo @ 0x555f95beea80] FIFO queue flushed
[flv @ 0x555f95bf1280] Failed to update header with correct duration.
[flv @ 0x555f95bf1280] Failed to update header with correct filesize.
[tee @ 0x555f944a4e80] Slave muxer #1 failed, aborting.
av_interleaved_write_frame(): End of file
[flv @ 0x555f95be9600] Failed to update header with correct duration.
[flv @ 0x555f95be9600] Failed to update header with correct filesize.
frame=  581 fps= 25 q=28.0 Lq=28.0 size=N/A time=00:00:23.24 bitrate=N/A speed=   1x
video:4479kB audio:273kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

以下是 ffmpeg 的配置行:

--prefix=/root/Install/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-I/root/ffmpeg_build/include -I/root/Install/ffmpeg_sources/BMD_SDK/include' --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-decklink

当我只使用一个复用器运行时,它工作正常。当我添加另一个复用器时,它崩溃了。有人遇到过同样的问题吗?有什么想法可能是什么原因以及如何修复它?

答案1

看起来这是某种网络问题(或其他问题,与 ffmpeg 无关)。我将两个复用器通道发送到我拥有 POC 帐户的第三方 CDN。

我在我们主机托管的其中一台硬件服务器上安装了一个流媒体服务器,并向其发送了 5 个(不同视频分辨率和不同设置)多路复用器通道,一切运行正常。

相关内容