PDA

View Full Version : audio out of sync - fix with vdub?


djskribbles
19th August 2007, 23:53
i had an avi video that was horribly out of sync. the audio that came with the video was 22150hz i believe so i did a conversion in vdub to 48000hz and now its much closer but the audio seems 1/2 second late. is there any simple way to fix this?

shadowhaze
22nd August 2007, 01:21
I would fix with virtualdub mod instead of virtual dub because of the way VDMod lists audio (and subtitle) streams, and you're not restricted to adding only wav.

Try this:
(1) open the [U]original[U] file (i.e. the one with 22150 hz -> BTW, what source has audio at that rate???) in VDMod & go to streams -> stream list. There you will see the exact length of the audio stream - write that number down;
(2) Leave the window open, click the add button, search/select the 48000hz stream and add it;
(3) Compare the length of the two streams - if the original is longer, then subtract the 48khz audio time (or vice versa) and write that number down;
(4) right click on the 48khz stream, highlight "interleaving" and left click - you will see a window pop up. In the middle is an "audio skew correction" box. If the 48khz stream is shorter, then add the difference in ms in the box (ex. 500 for 1/2 second short). If it's longer, then use a negative number for the difference (ex. -500 for 1/2 second too long);
(5) click okay to exit;
(6) left click on the original 22khz stream (it should turn grey), then click "disable" at the botton right side of the window. The stream should have lines through it;
(7) click okay/exit the window and then go to video and highlight direct stream copy in the drop down menu (a dot should appear next to it);
(8) then file-> save as, etc. (make sure you see direct stream copy for video and it's saved as avi);
(9) now open the new file w/ the 48khz audio, go to the stream list and compare the length of the new file's audio with the length of the old one. If there are the same - you're good.

NOTE: if the 48khz stream is more than 1 second off - remember to convert seconds & minutes in units of 60 if using a calculator. :D Also, I don't know what the limit is for VDMod's audio time skew, but it may be 999/1000ms. I've never had to go over 928ms. MuxMan also has a audio time skew feature, but it's limited (at least in the free version) to 300ms.