我有一个设置,其中我使用Nvidia NVENC编码器将OTA广播中的实时Feed转码为H264。我还将音频转换为AAC。我们正在尝试输出3个cbr流和各种比特率。我遇到的问题是多个输出上的PTS和DTS没有对齐,这对我们的用例至关重要。我希望对此有一个简单的解决方法,但是我还无法找到它。关于如何实现这一目标有什么想法?
===>源Feed <===
ffprobe udp://@238.224.1.5:59005
ffprobe version N-93005-gd92f06e Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --prefix=/home/circle/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/circle/ffmpeg_build/include --extra-ldflags=-L/home/circle/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/circle/bin --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-nvenc
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 44.100 / 58. 44.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mpeg2video @ 0x558e5a80fa40] Invalid frame dimensions 0x0.
Last message repeated 22 times
Input #0, mpegts, from 'udp://@238.224.1.5:59005:
Duration: N/A, start: 89037.540778, bitrate: N/A
Program 3
Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
===>命令我目前正在运行以转码<===
screen -d -m ffmpeg -i 'udp://@238.224.1.5:59005?fifo_size=1000000&overrun_nonfatal=1' \
-vcodec h264_nvenc -bf:v 2 -g 120 -rc cbr -b:v 6000K -profile:v high -level 4.0 -acodec aac -ac 2 -b:a 128k -ar 44100 -f mpegts -metadata service_name="test6000" -metadata service_provider="test" 'udp://@239.1.1.1:59001?pkt_size=1316' \
-vcodec h264_nvenc -bf:v 2 -g 120 -rc cbr -b:v 3500K -profile:v high -level 4.0 -acodec aac -ac 2 -b:a 128k -ar 44100 -f mpegts -metadata service_name="test3500" -metadata service_provider="test" 'udp://@239.1.1.2:59002?pkt_size=1316' \
-vcodec h264_nvenc -bf:v 2 -g 120 -rc cbr -b:v 1500K -profile:v high -level 4.0 -acodec aac -ac 2 -b:a 128k -ar 44100 -f mpegts -metadata service_name="test1500" -metadata service_provider="test" 'udp://@239.1.1.3:59003?pkt_size=1316'
这些流最终将被复用在一起,以将DRM插入到ABR流中。如果这些值不同步,则将不符合ABR。