1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cutting stuff out of an avi with AC3 audio produces sharp loud squeal

Discussion in 'DivX / XviD' started by agg, Mar 8, 2005.

  1. agg

    agg Member

    Mar 8, 2005
    Likes Received:
    Trophy Points:
    I am writing a response to the following (very old) thread:

    The basic problem here is that I was trying to merge an AVI with AC3 audio, that was split into two halves. For the life of me, I could not combine them into one AVI without generating terrible artifacts in the audio. A fix was suggested in the forum, but it did not work for me. After struggling with this problem for several hours, I finally found my own solution. (Note that my solution will only work if the file was in one piece to begin with.)

    1. Using VirtualDub-MPEG2 1.5.10, set the video processing mode to Direct stream copy. Make sure to cut on a keyframe. (Any version of VirtualDub should work fine, except for VirtualDubMod. VirtualDubMod does not have an important audio interleave setting that we'll get to in the next step.)

    2. Here's the meat of the deal. Before you trim the two halves of the file, make sure to set this option. In VirtualDub, go to Audio | Interleaving. The default is to preload 500ms of audio before video starts. That's bad for merging AC3 audio. Change it to 0ms. While you're at it, set Interleave to every 1 frame and Delay/Skew to 0ms.

    3. Save each half of the video to new files. Make sure you're got the frames exactly aligned. The file I was working with had several seconds of overlap at the beginning of the second half, and I had to experiment a little to make sure I wasn't skipping or duplicating frames. Basically, I trimmed the end of the first half and/or the beginning of the second half so that there was no overlap at all... I'm all set up now to Append the second half and it'll be perfect.

    4. Open the newly-saved first half. Use File | Append AVI segment to add on the second half.

    5. Change the Interleave setting back to 500ms preload. Now save the merged AVI.

    When I did this, the resulting AVI worked perfectly. No more glitches in the audio. Hopefully y'all can benefit from the agonizing trial-and-error I went through before finding this solution.

  2. The_OGS

    The_OGS Active member

    Feb 18, 2004
    Likes Received:
    Trophy Points:

Share This Page