Matthew
15th April 2004, 07:34
Originally posted this in the VirtualDub/VDubMod forum but then realised it didn't really fit there...or anywhere else for that matter.
It's called DetectMP3Delay and it only functions on Windows 2000/XP. It's just a batch file really - I don't know the first thing about programming.
On occasion one will have an avi they want to convert or whatever but it has a big fat unknown delay. It could be 700ms or it could be 1000ms, and constantly remuxing and looking to see if peoples lips match up with sound is a real annoyance.
This tool, which hasn't been tested much, just on single-audio nandub/vdubmod avis with mp3 audio and muxed using the default interleave settings, uses a trial and error approach as well - but it's automated. In other words, it just keeps muxing until all possible delay values are found.
Instructions for first time setup:
Download this zip:
http://members.tripod.com/auntyjacksret/
Extract to a directory which contains no spaces.
Download following zip and place xvi32.exe into same directory (other files are not required).
http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip
Copy across the following files from nandub:
nandub.exe
ogg.dll
sylia.dll
vorbis.dll
Usage:
Take your avi and load in nandub, save only the first few keyframes e.g. 30 secs - as long as the length exceeds the audio delay. Save this file as clip.avi in the above directory.
Run detectmp3delay.bat and 2 mins or so later you'll have a delay.txt listing the delay range e.g. for a file with a 581 ms delay I tested, the range was 564-587. All avis in this range are 100 percent identical, so it can't be more precise. You'd use the value in the middle (576), which would only be max 12 ms out anyway (in reality, only 5).
I hope this might be of use to someone :)
It's called DetectMP3Delay and it only functions on Windows 2000/XP. It's just a batch file really - I don't know the first thing about programming.
On occasion one will have an avi they want to convert or whatever but it has a big fat unknown delay. It could be 700ms or it could be 1000ms, and constantly remuxing and looking to see if peoples lips match up with sound is a real annoyance.
This tool, which hasn't been tested much, just on single-audio nandub/vdubmod avis with mp3 audio and muxed using the default interleave settings, uses a trial and error approach as well - but it's automated. In other words, it just keeps muxing until all possible delay values are found.
Instructions for first time setup:
Download this zip:
http://members.tripod.com/auntyjacksret/
Extract to a directory which contains no spaces.
Download following zip and place xvi32.exe into same directory (other files are not required).
http://www.handshake.de/user/chmaas/delphi/download/xvi32.zip
Copy across the following files from nandub:
nandub.exe
ogg.dll
sylia.dll
vorbis.dll
Usage:
Take your avi and load in nandub, save only the first few keyframes e.g. 30 secs - as long as the length exceeds the audio delay. Save this file as clip.avi in the above directory.
Run detectmp3delay.bat and 2 mins or so later you'll have a delay.txt listing the delay range e.g. for a file with a 581 ms delay I tested, the range was 564-587. All avis in this range are 100 percent identical, so it can't be more precise. You'd use the value in the middle (576), which would only be max 12 ms out anyway (in reality, only 5).
I hope this might be of use to someone :)