Encoding FRAPS AVI Files, Audio Skips

Feb 11, 2012 at 8:38 AM

Hi - I am still learning a lot about video/audio encoding, I recently discovered VidCoder + Handbrake and I love it, it does a really great job for what I need it for.  I have been working on re-encoding huge FRAPS AVI files of game footage, but have come across a problem and haven't been able to figure out a good way around it.  I was hoping someone might help.

I often run the huge FRAPS AVI files through either Avidemux and/or VirtualDub to clip/trim and combine certain scenes.  I output from these to an AVI, been using "copy" or "direct stream copy" for both the audio and video when doing this.  Sometimes it's just the raw FRAPS AVI file itself though.  Then I will attempt to encode to MP4 with VidCoder.

There are certain files where after encoding with VidCoder, there were little audio "glitches" at the same spot every single time I would try to encode, spent a ton of time trying various settings.  The audio sounds fine in the original AVI.

I eventually found that (I'm pretty certain) these audio drops/glitches are due to Handbrake inserting "silence" in an attempt to sync the audio and video, I found this in the VidCoder log for example, and there would be exactly 4 audio glitches/skips in this particular file when played.:
[00:49:15] sync: adding 70 ms of silence to audio 0x1  start 18894000, next 18887700
[00:56:09] sync: adding 70 ms of silence to audio 0x1  start 37695000, next 37688700
[01:03:16] sync: adding 70 ms of silence to audio 0x1  start 56496000, next 56489700
[01:12:15] sync: adding 70 ms of silence to audio 0x1  start 75297000, next 75290700

I have been knocking myself out searching on the Web for some sort of solution to this but I'm afraid I'm perhaps just not advanced enough at encoding video/audio.  On one of the AVI files that had a glitch, I managed to "strip" and "rebuild" the AVI file index (DivFix or DivFix++, can't remember, + VirtualDub) and then when encoding in VidCoder it worked perfectly in the spots where it had audio skips previously, I thought it might be on to something?!  But I also noticed that particular file was just under 2GB... have been having issues attempting to strip/rebuild an AVI index on a file > 2GB because a lot of the tools don't support it.  Also, I'm trying to use freely available or freeware tools to accomplish this, if at all possible (cheap, I know).

Is this perhaps a valid way of "fixing" this problem (strip/rebuild AVI index)?  Or does anyone have any better suggestions.  Thanks for any help on this.

Feb 26, 2012 at 9:10 PM
Edited Feb 26, 2012 at 9:11 PM

Oh well nobody had any suggestions or feedback... :-)  Just to update - I started to notice a pattern on this.   I found that I am able to encode videos that are < 3 minutes with VidCoder just fine.  Anything over 3 minutes, there is a spot around 3:06 where it seems to insert this silence almost every time (and then in certain spots after that, also with something of a pattern).  For videos over 3 minutes my preferred method has become to just use AviDemux, with some effort I was able to write up some batch file to do batch encoding of these the way I wanted and it does a decent job I guess.  Another thing is I used the Handbrake GUI itself to test some of the files > 3 minutes and it also seemed to encode them fine...?  A little puzzled.  I thought inserting the silence was probably a Handbrake thing, but maybe its not.  I just needed to figure out a way to get the files encoded, so this is the general system I ended up with, just to note it down in case it helps anyone else down the line.

Feb 27, 2012 at 1:17 PM

You should try the latest release of VidCoder then, the handbrake core has been updated and your problem may no longer exist.  I was experiencing some problems myself and it appears the current release has resolved them.

Feb 27, 2012 at 2:56 PM

I will try then, thanks for pointing that out!

Feb 27, 2012 at 5:29 PM

Still doing same thing :-(

Feb 28, 2012 at 1:16 PM

That's too bad, and strange.  All the encoding is handled by the Handbrake core, so if it works in Handbrake it should work in VidCoder.  Previously VidCoder was using an older version of Handbrake because it was stable and there didn't seem to be any problems, but the latest version updated it so I was hopeful that it would solve your issues. 

On a personal note, I've moved away from using avi's and software that generates them, because the avi format is ancient now, and doesn't properly support many codecs.  Also, as you noted, there are few tools that support large avi's once you want to convert them to another format.  The only large avi files I've had little trouble with are uncompressed files that are 25GB+ and I certainly don't make those anymore.