[FFmpeg-user] Audio out of sync after many Non-monotonous DTS in output stream warning

Yang Zhang yzfedora at gmail.com
Mon Mar 23 07:52:51 EET 2020


when I transcoding some live stream that comes from DVB, I got many
warnings bellow and after a few hours, the audio out of sync.

[tee @ 0x2998780]
Non-monotonous DTS in output stream 0:0; previous: 27931, current: 27929;
changing to 27932. This may result in incorrect timestamps in the output file.
[tee @ 0x2998780]
Non-monotonous DTS in output stream 0:0; previous: 27935, current: 27933;
changing to 27936. This may result in incorrect timestamps in the output file.


And here is the ffmpeg command we used. Any suggestions for how to solve
the audio out of sync issue?

ffmpeg -vsync passthrough -copytb 1 -hwaccel cuvid -hwaccel_device 3
-probesize 10000000 -analyzeduration 10000000 -c:v h264_cuvid -gpu 3 -deint
adaptive -drop_second_field 1 -fifo_size 713924 -overrun_nonfatal 1
-buffer_size 67108864 -i udp://127.0.0.1:48210 -filter_complex
[0:i:0xab]split=outputs=1[map:v:0] -map [map:v:0] -c:v:0 h264_nvenc -g 250
-flags:v +global_header+cgop -preset:v medium -profile:v:0 high -gpu 3
-b:v:0 3500k -maxrate:v:0 5000k -bufsize:v:0 10000k -map 0:i:0x92 -c:a:0
aac -ac 2 -ar 44100 -b:a:0 128k -metadata service_name="LA 1 HD" -metadata
service_provider="Movisrta+" -max_muxing_queue_size 512 -f tee
[select=\'v:0,a:0\':bsfs/v=dump_extra=freq=keyframe:f=hls:hls_time=5:hls_list_size=10:hls_flags=delete_segments:var_stream_map=\'v:0,a:0\':hls_segment_filename=cache/hls
/2/playlist_%v_%d.ts]cache/hls/2/index.m3u8


More information about the ffmpeg-user mailing list