Page MenuHome

VSE: Audio and Video doesn't sync in playback
Closed, ResolvedPublic

Description

System Information
Operating system: Linux-5.4.0-7624-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: Radeon Vega Frontier Edition (VEGA10, DRM 3.35.0, 5.4.0-7624-generic, LLVM 9.0.1) X.Org 4.6 (Core Profile) Mesa 20.0.4

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-07-24 10:15, hash: rBb53c46d76056
Worked: (newest version of Blender that worked as expected)

Short description of error
When playing the Video Sequencing Editor, the audio and video doesn't sync

Exact steps for others to reproduce the error
New file
Go to the VSE
Insert a video file with audio (something like a basic AV-sync-test video)
Set playback to AV-Sync
Hit play
The audio is lagging behind by around 2 frames
...if you export the video, the problem does not occur in the exported video

Here is an example with .blend and .mov:

Event Timeline

The test file he was using to test it:

Sybren A. Stüvel (sybren) changed the task status from Needs Triage to Confirmed.Jul 27 2020, 11:45 AM

I can confirm.

...if you export the video, the problem does not occur in the exported video

When audio-scrubbing there are no sync issues either.

I have updated the task description with a ZIP containing an example blend file + the above video file. This is what happens on my computer when I play it back:

@Hjalti Hjálmarsson (hjalti) Could you give these sound settings a try?

On my machine this seems to fix the issue.

Just a general update, we tried and it seems like we got good sync if we switched to SDL with a mixing buffer of <=512.

OpenAL is locked to a minimum of 1024 under the hood.

The issue was resolved by switching to better performing audio settings (see T79231#986004).

@Sebastian Parborg (zeddb) also did a test with the JACK backend, and that performed perfectly as well. These kind of sync issues is exactly what JACK was meant to resolve, so it's a good thing to keep supporting it.