I have a large Xvid avi file with two problems: about eight minutes into the movie there're about 30 bad frames. After this point, the audio is about half a second behind the video. I've been messing around with vdub mp3 freeze and tmpgenc (though when I try to encode this file to mpeg with the latter, there's no sound), but no luck so far.

Is it worth my while to cut the movie into everything before the bad frames and everything after the bad frames, use tmpenc or virtualdub to adjust the audio skew on the second part, and then join them back together, or is there a better way?

Also, on a side note, How come that when I use vdubmp3freeze to extract the wav from this file, it winds up being twenty seconds shorter than the actual movie (i tried this with just the first five minutes of the movie, and sure enough, the audio was still six seconds too short)? And how come when i try to set the audio with 'full compression' instead of direct source copy and save out the wav, I just get a two-second-long file of silence? (the files that were slightly too short used direct stream copy)

Any help would be hugely appreciated!!!