Forum archive - Can VirtualDub correct audio drift?

http://www.supermediastore.com/



Forum Archive Home -> Editing -> Can VirtualDub correct audio drift?



Can VirtualDub correct audio drift?

Djard posted 2009 Oct 26 00:59
I tried to correct AV asynchrony with VirtualDub. The audio is in sync at the beginning but ahead by nearly 2 secs at the end. VD's "File Info" states the audio stream is 1.93 secs shorter than the video. When I followed the steps below, the video ended up with the audio starting nearly 2 secs late but in sync at the end. Is there a way to get VD to demux (so I can stretch the audio) or is there a way for it to natively correct audio drift?

1. Launch VirtualDub -> File -> Open video file.

2. Browse to and highlight the out-of-sync AVI file -> Open.

NOTE: Click "OK" if you get message that the file has
sync errors.

3. File -> File Information -> in video details window,
compare length of of Video stream to length of Audio
stream--e.g.:

Video stream/Length: 51600 frames [28:41.72]
Audio stream/Length: 65836 samples [28:39.79]

Note that audio is 1.93 seconds shorter than the video,
which means the audio will play ahead of the video
(audio needs to be delayed).

If the Audio is longer than the video, you will use a
negative number--e.g., -1.93 seconds.

4. Convert the disparity into milliseconds for VD--e.g.:
1000 x 1.93 = 1933 ms.

5. OK.

6. Video -> Direct Stream Copy.

7. Audio -> Interleaving.

10. Type in 1933 in the 'Delay audio track by' box -> OK.

Positive number delays sound (audio plays behind video)
Negative number advances sound (audio plays ahead of video)

11. File -> Save as AVI.

12. Browse to and highlight folder where you wish to save
the corrected File.

NOTE: If saving to same location, rename the corrected
file: don't overwrite/delete the out-of-sync file
until you have tested the corrected one.

13. With "Save as type: Audio-Video Interleave (*.avi)," click
Save. The procudure should not take long--a 30 minute film
will take about 15 seconds to complete.



hech54 posted 2009 Oct 26 02:26
Djard :
The audio is in sync at the beginning but ahead by nearly 2 secs at the end.

That can be fixed but you'll need to do it outside of VDub with an audio editor like Audacity or similar.
Gradual sync problems are different that a constant sync problem.



edDV posted 2009 Oct 26 02:32
I use Vegas or Sound Forge to alter the sound duration to match the video. They both use a graphical interface.

With Audacity, you need to do it by the numbers.

Be glad your drift is linear. You just need to adjust sound duration.



Abas-Avara posted 2009 Oct 26 06:33
This is what I use for DV captures

Method 1 (after DV AVI capture)
- Open AVI in VirtualDUB
- Go to video - Framerate and then select adjust audio/video to framerate
- Save AVI (video: direct stream copy and audio: direct stream copy)



jagabo posted 2009 Oct 26 07:21
The method you used can only shift the full audio track forward or backward. It doesn't change the length of the audio.

There is a way of syncing audio and video with different lengths in VirtualDub. You just change the frame rate of the video to slow it down or speed it up. Then use Direct Stream Copy mode for video and audio. You can also change the frame rate with AviFrate.

These methods are ok for casual playback. They may lead to occasional small jerks. It's better to adjust the audio length as noted by hech54.



lordsmurf posted 2009 Oct 26 07:31
Audi drift is often caused by dropped frames -- trying to re-sync can never happen perfectly again.


Abas-Avara posted 2009 Oct 26 07:49
lordsmurf :
Audi drift is often caused by dropped frames -- trying to re-sync can never happen perfectly again.


I've always out of sync audio on my DV captures of my VHS source (firewire passtrough).
If there are dropped frames or not, it's always out of sync.
The audio goes slowly out of sync, in the beginning you can't notice it but later...


But the method I posted with VirtualDub (adjust framerate to match audio and video) works everytime for my.
I use type 2 on WinDV



Gavino posted 2009 Oct 26 08:28
VirtualDub also has a Time Stretch audio filter which can be used to adjust the audio duration.
This method keeps the video frame rate unchanged, as well as maintaining the pitch of the audio.



jagabo posted 2009 Oct 26 08:30
Gavino :
VirtualDub also has a Time Stretch audio filter which can be used to adjust the audio duration.
This method keeps the video frame rate unchanged, as well as maintaining the pitch of the audio.

Ah, yes. It's in the advanced audio filters.



Djard posted 2009 Oct 26 19:33
Thank you all for the valuable input. Before going with the demux option, I deciphered Abas-Avara's steps and they worked!!! VirtualDub automatically perfectly synchronized the AV in my video. I offer the steps I used below:

1. Launch VirtualDub -> File -> Open video file.

2. Browse to and highlight the out-of-sync AVI file -> Open.

3. Video -> Frame Rate -> select "Change so video and audio
durations match (30.004 fps)" -> OK.

4. Video -> Direct stream copy -> Audio -> Direct stream
copy.

5. File -> Save as AVI.

6. Browse to and highlight folder where you wish to save
the corrected File.

NOTE: If saving to same location, rename the corrected
file: don't overwrite/delete the out-of-sync file
until you have tested the corrected one.

7. Click "Save." The procudure should not take long--a 30
minute film will take about 18 seconds to complete.

Yay!




Login/Register to our forum to be able to post here.








DVDFab DVD to DVD lets you backup DVDs to DVDr, AVI or MP4 for portable devices. More info or download trial!
About   Advertise   Forum   Forum Archive   RSS Feeds   Statistics   Tools