[FFmpeg-user] PTS and DTS sync accross multiple output streams.
andrei ka
andrei.k.gml at gmail.com
Mon Apr 1 13:00:21 EEST 2019
you can try -copyts -start_at_zero... your input sound is 5.1, you ouput
ac=2, you'd need to do a proper downmix first :
https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg...
you can also leave ar=48000, aac will squash high frecs anyway, rates
conversions are never perfect, 128k is ok for 48K.... and i'd align gops as
well here if you want everything to be as much in sync as possible (=> add
-strict-gop 1 -no_scenecut 1)
On Mon, Mar 25, 2019 at 5:07 PM Micael Silva <micaelsilva at gmail.com> wrote:
> On Mon, Mar 25, 2019 at 12:57 PM James E. Baird <James.Baird at ccr.net>
> wrote:
>
> > Does anyone have any ideas on this? I am essentially trying to keep the
> > timestamps with 3 output the same.
> >
> > Thoughts?
> >
> > James Baird
> > Systems Administrator
> > CCR
> > p: (319) 734-3528
> > m: (319) 775-7460
> > w: www.ccr.net
> >
> >
> >
> >
> > -----Original Message-----
> > From: James E. Baird
> > Sent: Monday, March 11, 2019 12:24 PM
> > To: 'ffmpeg-user at ffmpeg.org' <ffmpeg-user at ffmpeg.org>
> > Subject: PTS and DTS sync accross multiple output streams.
> >
> > Hello,
> >
> > 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://@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
> >
> > ===> Command I am currently running to transcode <===
> >
> > 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'
> >
> >
> Did you tried -copyts on the output side?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list