[FFmpeg-trac] #6114(undetermined:new): Vsync behaviour when used along with -ss
FFmpeg
trac at avcodec.org
Tue Jan 31 13:05:30 EET 2017
#6114: Vsync behaviour when used along with -ss
-------------------------------------+-------------------------------------
Reporter: Mlmlte | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: vsync | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
To encode some TV transport streams in x264 for archiving purposes, I've
been using -vsync 1 so that the resulting mkv file gets muxed without
delay on any of the two tracks (audio/video), which is fundamental since I
am then able to cut my encodes on key frames without re-encoding, and
everything plays fine on all of my devices.
Without the -vsync 1 option, I get a random negative delay on the audio,
as mediainfo shows (e.g. Delay relative to video: -1s 105ms) and if I then
try to cut my encode, the audio is out of sync.
When I use the -ss parameter to avoid encoding the whole transport stream
file, it seems that the -vsync 1 does not have the same behavior since I
get a similar negative delay on the audio track.
However, dupe frames are indeed inserted at the beginning of the encode,
so I'm not sure exactly what happens here.
Is it a bug? Any way to get file with zero delay when using -ss parameter?
In this case, the original file is a h264 transport stream with AC3 audio
with -668ms delay.
How to reproduce:
ffmpeg.exe -ss 00:13:40 -i source.ts -vf -s 1280x720 -sws_flags lanczos
-c:v libx264 -crf 20 -preset fast -c:a copy -sn -vsync 1 output.mkv
-> Negative delay
ffmpeg.exe -i source.ts -vf -s 1280x720 -sws_flags lanczos -c:v libx264
-crf 20 -preset fast -c:a copy -sn -vsync 1 output.mkv
-> No delay
ffmpeg.exe -i source.ts -vf -s 1280x720 -sws_flags lanczos -c:v libx264
-crf 20 -preset fast -c:a copy -sn output.mkv
-> Negative delay
ffmpeg version N-83280-gcba4f0e (latest zeranoe build)
Thanks a lot!
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6114>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list