Can "Align A/V Start" option cause desync?

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
barobaran
Posts: 7
Joined: Thu Jun 16, 2022 4:12 am

Can "Align A/V Start" option cause desync?

Post by barobaran »

Description of problem or question:
Can "Align A/V Start" option cause desync? Or are there are any other drawbacks of turning it on?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5709
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can "Align A/V Start" option cause desync?

Post by JohnAStebbins »

In media files, it is possible for the first audio timestamp and the first video timestamp to be different, e.g. the audio starts at time X and the video starts at time Y. Align A/V start shortens or extends the duration of the first video frame to force X == Y. If the original difference in start times is significant, you may notice that the first video frame is momentarily "frozen", whereas with Align A/V sync disabled you would most likely see a black frame during that time.

The primary purpose of Align A/V sync was to work around bugs in some decoders that can't tolerate streams that don't start at exactly the same time.
barobaran
Posts: 7
Joined: Thu Jun 16, 2022 4:12 am

Re: Can "Align A/V Start" option cause desync?

Post by barobaran »

Is it possible even when I cut a clip from a middle of a longer movie? Both video and audio are well underway so start time should be irrelevant.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5709
Joined: Sat Feb 09, 2008 7:21 pm

Re: Can "Align A/V Start" option cause desync?

Post by JohnAStebbins »

barobaran wrote: Sun Jun 26, 2022 12:43 am Is it possible even when I cut a clip from a middle of a longer movie? Both video and audio are well underway so start time should be irrelevant.
In this scenario is is almost guaranteed that the start times will not align. Audio frame and video frames have differing durations. So if you start an audio and video frame at the same time, they will not end at the same time.
Post Reply