Log in

View Full Version : audio lagging off sync problem


lindylex
4th July 2008, 16:57
I have problems with my audio being off sync with the video. I am attempting to trim out a section much later on in the video.

This is the video specs and file type. The video is an avi file.

time 1:24:58:793
colorSpace:yv12
624 X 352
FPS: 29.97
Audio Channels:2
Sample type: Integer 16 bit
Sample Per Second: 48000
Audio Length: 248594256 samples 1:26:19:047

This is my development environment.

Avisynth 2.58 build:Jun 20 2008
Windows XP 64

I noticed the Audio Length does not match the video length and this concerns me.

I have tried extracting the audio as a wav file then combined them back together and I still receive the same problem.

Does anyone have any idea on how to solve this audio lagging off sync problem?

Guest
4th July 2008, 17:09
Does the desync grow as the clip progresses or is it constant?

lindylex
4th July 2008, 18:19
neuron2, Yes

setarip_old
4th July 2008, 20:05
@lindylex

Hi!

One set of procedures you could use:

Load the file into VirtualDub, VirtualDubMod, or NanDub.
Set BOTH "Video"(VirtualDub,
VirtualDubMod and NanDub) and "Audio"
(VirtualDub and NanDub - VirtualDubMOD>"Streams>"Stream
list") to "Direct Stream Copy".

A) If the difference between audio and video is constant
throughout the video:

From the "Audio" dropdown menu, select "Interleaving" (For
VirtualDubMOD, rightclick on the listed audiostream and then
select "Interleaving")

Under "Audio skew correction", set an appropriate number of
milliseconds (positive or negative) in the box labelled "Delay
audio track by"

Save with a new filename

B) If the difference increases as the movie plays:

From under the "Video" dropdown menu, select "Framerate" -
and select "Change so video and audio durations match"

Save with a new filename

Let us know of your success ;>}

lindylex
5th July 2008, 01:00
[ Solved Solution ]

The problem is that the avi file contains VBR mp3 audio. You need to run this, command EnsureVBRMP3Sync() before you apply a Trim() command.

Example:

combined =the_video.EnsureVBRMP3Sync().Trim(67742,68000)

Avenger007
19th July 2008, 00:18
[ Solved Solution ]

The problem is that the avi file contains VBR mp3 audio. You need to run this, command EnsureVBRMP3Sync() before you apply a Trim() command.

Example:

combined =the_video.EnsureVBRMP3Sync().Trim(67742,68000)
I have the same problem when using AVIsource(...) for all avi files with vbr mp3 but EnsureVBRMP3Sync() doesn't work. The desync is quite noticeable near the end of long duration videos.

I'm using Avisynth 2.58 RC2. Am I missing something or do others still have the same problem? :confused: