Fixing desync in a large, long video file I've got some moderately large, compressed video files (~2+ gigs, over an hour long) from a few Open Broadcaster Software streams to Twitch.tv. All output files (including the twitch archive's export) have the dreaded gradual audio desync.

I have assorted tools to play with audio, but all of them seem to be failing me. Camtassia Studio barely loads the files (sometimes it just plain doesn't), and since the desync is gradual, Camtasia can't really help since I can only shift ALL audio.

I used to be able to fix a similar desync problem in Virtual Dub, which would change the "framerate" or some equivalent timing of the video or audio to make them match up in timing, I did this with small 10 minute AVI files and it worked like a charm. But Virtual Dub doesn't support mp4s with h264, and even after adding a plugin to give VDub support for them it crashes when I load the files in Virtual Dub.

Is there any moderately easy way to correct this audio sync? I have about 6 video files to work with, all over an hour long, so manually adjusting timing with millisecond precision just isn't practical. I have Camtasia Studio and access to any free software for x64/32 bit windows and I'm willing to buy software to fix this as well, I just have no idea what I'm looking for to make this really work.

How can I fix gradually desynced audio in large video files?
I have no idea if this is optimal for you, but one approach using free software would be to first determine the percentage (and direction) of drift by finding a point near the end where you can tell with some precision what the sync error is, in frames.

Demux the video and audio into separate streams, using a free tool like AVI-Mux. Load the audio into Audacity, and apply the time shift determined above, either as a "new length" or a ratio (frame error / total frames).

Export the audio and remux using the new track.