Log in

View Full Version : Correcting audio offset when using H.264


Dust Signs
5th January 2006, 15:34
Hi!

I've got a (I suppose) rather simple question concerning a little problem I experienced yesterday: I converted a film using Gordian Knot using H.264 and two CBR-MP3 audio tracks. The audio tracks do not run synchronously with the film - so I tried to open the file again in VirtualDubMod to correct that. But VirtualDubMod tells me that it cannot locate a decompressor for x264 and for this reason I am not able to edit anything (only direct stream copy is possible).
How can I correct the offset of the audiotracks? I've installed an encoder as well as a decoder for x264.

Thanks in advance
Dust Signs

bond
5th January 2006, 15:47
1) correct the audio delay always during audio encoding
2) install ffdshow, open the ffdshow dialog in vd, go to the decoder tab, enable h.264

Dust Signs
5th January 2006, 15:51
@1.) Normally, I don't have any problems with that. It's the first time that audio and video are not synchronous.
@2.) I've already done that.

Dust Signs

kotrtim
5th January 2006, 16:18
Download Mplayer (http://www.aziendeassociate.it/cd.asp?dir=/mplayer), play the avi file with Mplayer

+ and -
adjust audio delay by +/- 0.1 second

The easiest way to operate Mplayer is drag & drop the avi directly onto the Mplayer

while playing, adjust the audio delay as mentioned above which is quoted from Mplayer's guide

If you want to permenantly change the delay, the only way I know is this

1) Download a copy of YAMB (http://www.free-codecs.com/download_soft.php?d=1309&s=521) and MP4Box (http://www.aziendeassociate.it/cd.asp?dir=/gpac/dev)

Copy the mp4box.exe into the same folder as YAMB
2) Go to "Extract" tab in YAMB
3) Extract video from avi
4) Extract audio from avi
5) Now, go to "Mux" tab
6) Import video, force the correct frame rate
7) Import audio, set "media delay"
8) Mux

You can easily know what value to set for the delay, you can know by using Mplayer, pls remember how many + or - you key in, then you'll eventually know what value to set for "Media delay" If video is faster than audio, delay the video and vice versa

This is the only way I could think off, wish you luck!:p

Oh, anyway, after doing this your file is not avi anymore, it will be a mp4... Besides I'm not sure whether putting mp3 into mp4 is a standard or not, if possible, use AAC which is definitely mp4 standard

bond
5th January 2006, 16:49
@1.) Normally, I don't have any problems with that. It's the first time that audio and video are not synchronous.well now you have a problem ;)

@2.) I've already done that.no you didnt, cause otherwise you would be able to edit x264 in virtualdub

Dust Signs
5th January 2006, 16:56
no you didnt, cause otherwise you would be able to edit x264 in virtualdub

But I'm able to view H.264 movies ;) - and I'm pretty sure I checked "x264" and "H.264" in the setup.

Dust Signs

bond
5th January 2006, 17:29
But I'm able to view H.264 movies ;) - and I'm pretty sure I checked "x264" and "H.264" in the setup.its not enough to set h.264 in the installer or the dshow codec

you need to set it in the ffdshow vfw interface as i described for being able to decode h.264 in vfw (as used in virtualdub) via ffdshow

Dust Signs
5th January 2006, 17:34
Ah, misunderstood that, sorry. Now I can open it with VirtualDubMod. Thanks very much :)

Dust Signs