Here's what to do if the sound is not synchronized with the images in a video file. We are going to use Mplayer and Mencoder to fix this.
Play your video file like this:
Play it several times and adjust the delay number (here 0.7 second: it means that the sound will come 0.7 second earlier than in the original file) until everything is synchronized correctly.
Run Mencoder like this:
Replace 0.7 with the delay you determined earlier.