Log in

View Full Version : Replacing audiotrack on an .avi


oRBIT
19th November 2005, 22:20
Question: Is there an easy way of replacing a audiotrack on an avi file? I'm trying to replace the music of a musicvideo with the original music found on CD. However it's pretty difficult to sync the start position of the new audio. Are there any good tools to make things like this easier? Adjusting the new .wav start value in virtualdub takes forever :)

setarip_old
20th November 2005, 01:34
Adjusting the new .wav start value in virtualdub takes forever
When you initially swap in the new .WAV audiostream, is there a constant variance, or does it change as the playback continues?

oRBIT
20th November 2005, 11:45
I am not sure since, even the smallest sync-problem in the beginning (even if it's not really visibile) could results in larger sync-problems later in the .avi...
It's a pain really. :)
I've recorded the clip from VHS, not sure if that could make problems even bigger. However my DVD-recorder has a timebase corrector that should take care of most problems (I think).

setarip_old
20th November 2005, 19:44
I am not sure

Perhaps I'm misunderstanding you but, it should be a simple matter of playing the file to determine this...

Mordordotnet
4th December 2005, 15:45
You could use a wav editor like audacity to view the wav file from the original source and from the CD. If you can identify a few distinct peaks in each waveform you should be able to compare the two and arrive at some useful offset.

Hope that helps.

CWR03
8th December 2005, 00:42
If the music is the same, only different quality, start by extracting the audio from the clip and convert it to .WAV. Use something like Cool Edit 96 (You can Google and find a shareware version) and open the original audio. You should be able to see precisely in milliseconds how long it is from the start of the file to the first beat. Also make note of the exact length of the file. Convert to .WAV and open the CD source. Add silence or crop away from the beginning to make it the same as the original. Repeat these steps for the end.

Now go to Time/Pitch using the CD audio (with the shareware version you'll have to close and reopen the program to select different options) and you'll have the ability to Time Stretch (preserves pitch), and you can manually enter the needed length. Click Ok and let it finish, save, convert to MP3 and remux. I've done it - it works.