[FFmpeg-user] PTS and DTS sync accross multiple output streams.

James E. Baird James.Baird at ccr.net
Mon Mar 11 19:24:20 EET 2019


I have a setup where I am transcoding live feeds from OTA broadcasts to H264 using the Nvidia NVENC encoder. I am also transcoding the audio to AAC. We are trying to output 3 cbr streams and various bitrates. The problem I am running into is that the PTS and DTS on the multiple outputs are not aligning which is critical for our use case. I am hoping there is an easy fix to this but I have not yet been able to locate one. Any thoughts on how to accomplish this?

===> Source Feed <===
ffprobe udp://@
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://@
  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

===> Command I am currently running to transcode <===

screen -d -m ffmpeg -i 'udp://@' \
        -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://@' \
        -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://@' \
        -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://@'

Let me know what other info may be needed.

Thanks in advance to any replies.
CONFIDENTIALITY NOTICE: This e-mail including attachments is covered by the Electronic Communications Privacy Act, 18 U.S.C. ยงยง2510-2521, is confidential and may contain information that is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, or dissemination of this transmission, or taking of any action in reliance on its contents, or other use is strictly prohibited. If you have received this transmission in error, please reply to the sender listed above immediately and permanently delete this message from your inbox.

More information about the ffmpeg-user mailing list