Log on
Main page Graphics Photography Audio Video Tools Web Design Documents Space & Astro Amiga Funny Surreal Gallery Links & Contact

Audio/video sync

How to make a temporary .avi file in a proper format for doing audio timing work.

The format:

When using an audio application to create sound effects for a movie clip, you should make a working copy of the movie clip in an special format. This format should:
  • Not consume too much CPU when playing
  • Have the ability to have keyframes very often in the video stream (for seekability)
  • Compress the video enough so that the harddrive won't suffocate

The reason you should have so many keyframes, is so that you can search through the video very quickly. Having a keyframe or "i-frame" for every frame is best, if the codec can handle this.

Having tested quite a few codecs, i've come to the conclusion that XviD is the best choice. For very old PCs you might want to try Intel Indeo5 (which comes with Windows). This codec works better with an i-frame for every 4th or 6th frame.

Be warned. Encoding a video file this way will not give you the best quality. Not at all. That's not the purpose of this guide. For that, you should do like this.


Settings for XviD:

The important thing here is the target quantizer and the i-frame interval. You might as well also scale the image size down to something like 160x120 pixels, as quality is not really important. You just have to be able to see what's going on. Don't reduce the frame rate, as this would affect your ability to syncronize properly.

Good values for this kind of encoding should be within these ranges:
  • Target quantizer: 10-20
  • Max. i-frame interval: 1

Tip: Because you output only i-frames this way, you don't need motion search, GMC (global motion compensation) or even Qpel (quarter pixel motion detection). You can safely disable these without loosing any quality, to save encoding time.


Xvid 2.1


Xvid 2.1


Xvid 2.1


Transferring the audio to the final XviD:

You should never distribute a video file encoded like the above, because using this many i-frames gives you a rather large and ugly file. So the correct workflow will usually be like this:

  1. Encode source material into a high quality XviD.
  2. Also encode source into a work dummy (using the above settings.)
  3. Sync the audio to the work dummy
  4. Export the audio to a .wav file
  5. Use VirtualDub to multiplex .wav into high quality XviD.
  6. Use Direct Stream Copy for video and Full Processing for audio.
  7. Choose Lame MP3, cbr xxx kbit/sec as audio codec.

Website by Joachim Michaelis