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

audio problem if an .AVI is converted to a (S)VCD/DVD .MPG

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by aldaco12, Nov 24, 2004.

Thread Status:
Not open for further replies.
  1. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    To fix some audio problems:
    1) sound that was in-sync in the original .AVI which becomes out-of-sync if the .AVI is converted into a MPEG movie with TMPGenc
    2) TMPGenc's output without sound!
    3) sound apparently OK which becomes un-sync of a constant amount from a certain point of the movie till the end

    [bold]To Fix 1) [/bold]
    The problem is due to a bad MP3 compression in the AVI's audio stream, which used VBR instead of CBR. To correct this, open the movie with VirtualDub. When you open it, VirtualDub will give some audio warnings, but we knew it, isn't it? With Audio set on Full processsing mode (default), without choosing any compression of the sound, if you do, in VirtualDub, File___Save WAV, you'll save an uncompressed WAV stream, so you will skip the 'VBR problem' of the MP3 audio stream.

    - If you use TMPGenc (or a similar encoder which leaves you to choose A/V input separately), you'll use that WAV as 'audio input' in TMPGenc instead of the original AVI (which has VBR audio).
    - Otherwise, load that WAV with FFMPEG GUI and convert that stream in the desired format (MP2 224 kbps 44100 Hz for (S)VCD or AC3 192 kbps 48000 Hz for DVD).
    Then you'll author the video made by your movie encoder with the new audio you just made with FFMPEG GUI [or, for (S)VCD, multiplex that MP2 with the MPV video of the mpeg you made, then author the new mpeg into the (S)VCD].

    [bold]To Fix 2) [/bold]
    If TMPGenc's output has no sound, the AVI had, probably, AC3 sound.
    Then:
    - if you need to make a DVD open the AVI with VirtualDub, do Stream, Stream List, DEmux and Demux the AC3 stream. Later you'll author the DVD wihth the video and the audio.
    - If you need to make a (S)VCD, open the AC3 with HeadAc3he or FFMPEG GUI.
    In any case, choose, as output, "MP2" (MPEG Layer II).
    On HeadAC3he, just check the box 'downconvert sample rate' and convert to 44.1 kHz the sampling rate (AC3 is from a DVD and has 48 kHz. (S)VCD have 44.1 kHz.
    On FFMPEG GUI set 'Bitrate' = 224 (kbps) and 'Sampling Rate' = 44100 (Hz), which is the standard for 'MP2 for
    (S)VCD'.

    [bold]To Fix 3) [/bold]
    This is a very hard thing to solve, and requitres this hard procedure. Also, since very probably this comes to a corruption point in the AVI, you cannot extract the uncompressed audio stream from it with VirtualDub. Therefore you have to:
    1) make a 'dummy mpeg' with TMPGenc, setting 'motion search precision = lowest quality (very fast)'. From that mpeg, you can extract the audio stream in uncompressed WAV form with VirtualDub.
    2) open that movie with VirtualDub. Set Audio__Full processing mode and do File___Save WAV. You'll extract the whole uncompressed WAV stream.
    3) observe, using that 'dummy mpeg' the point at which the corruption point comes, e.g. 35' 23", and calculate 'by ear' the amout of the constant delay that adds to in that point (e.g. 21.5").
    4) open that uncompessed WAV stream with Exact Audio Copy (EAC), doing Tools__Process WAV. Select the corruption point (you should also observe a flatness there, but it's not important anyway) and do File__ Insert Silence adding the gap you observed. Probably it will need to take lot of time, due to the 'undo' possibility (which forces EAC to save a 1.2 GB file every time you modify the WAV file). After that, do File___Save WAV.
    5) make a mpeg, this time with TMPGenc set on 'motion search precision = very high quality (very slow)' using the WAV stream you just made as 'Audio input' in TMPGenc. Just to be sure the stream has been made correctly, you can, before everything, make another test file with 'motion search precision = very fast'.
    If the .WAV file you just prepared has been properly made (and the AVI movie was corrupt just in one point, of course), the resulting mpeg now won't have that un-sync point you observed (just some secs of silence).
     
    Last edited: Jun 22, 2006
Thread Status:
Not open for further replies.

Share This Page