VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I'm trying to compression an avi file with VirtualDub.

    A bit about the file:
    The avi is 2.25GB in size, Xvid. The audio for the avi file is in AC3, bitrate 448kbps.

    I'm no expert, I usually just compress my avi files with single pass quantizer 5.09 and it has never given me a problem, but this file, the audio gets screwed up every time. By screw up I mean, all I near is noise and nothing else.

    I've tried compressing the audio with the lamemp3 @ 128kbps setting and also tried AC3 ACM @128kpbs, but it still dosen't work. I've even tried 'direct stream copy' of the audio and only compress the video and the audio still gets broken.

    I also tried Avidemux and the same thing still happens.

    Any suggestions on what I should try next? Did I use the wrong audio compression codec? Should I something like extracting the ac3 audio, and convert it to mp3 and compress it , then re-attach it to the avi with Virtualdub? (If that can be done?)

    Thanks in advance!

    The mediainfo I got from KMPlayer:
    General

    Format : AVI
    Format/Info : Audio Video Interleave
    Format profile : OpenDML
    File size : 2.25 GiB
    Duration : 1h 37mn
    Overall bit rate : 3 309 Kbps
    Writing application : VirtualDubMod 1.5.4.1 (build 2178/release)
    Writing library : VirtualDubMod build 2178/release
    Video #0
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : 1
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Custom
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 1h 37mn
    Bit rate : 2 852 Kbps
    Width : 720 pixels
    Height : 416 pixels
    Display aspect ratio : 1.731
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.318
    Stream size : 1.94 GiB (86%)
    Writing library : XviD 1.2.1 (UTC 2008-12-04)
    Audio #1
    ID : 1
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Codec ID : 2000
    Duration : 1h 37mn
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Stream size : 312 MiB (14%)
    Alignment : Split accross interleaves
    Interleave, duration : 96 ms (2.88 video frames)
    Interleave, preload duration : 96 ms
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    In general, I would recommend not to recode the audio stream, but to pass it in "Direct Stream Copy" audio mode. But you said you already tried that with VirtualDub. So I guess that VirtualDub does not support AC3 audio streams well.

    VirtualDubMod has some special features to handle AC3 better, but overall it is rather outdated; for this specific problem it may still work. If you consider demultiplexing the AC3 audio, converting it externally to MP3, and re-multiplexing the MP3 to the converted video, VirtualDubMod will do that more reliably than the original VirtualDub, providing its "Streams" dialog.

    MeGUI will probably be able to handle AVI sources with AC3 audio streams, it should even be able to recode it to MP3 (you could prefer Pro-Logic II downmixing if size matters that much); you should be able to use either AviSource or the indexer with L-SMASH Source. But it may be a bit complex for a not so experienced user of AviSynth based converter GUIs.

    If you prefer a simpler converter based on ffmpeg/mencoder, you could try TEncoder.
    Quote Quote  
  3. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Does it play properly? 448kbps is a bit much for SD stereo audio, are you sure it's not 5.1 or doesn't switch TO 5.1 somewhere within the file?
    Quote Quote  
  4. I suspect ndjamena is likely correct and somewhere the audio switches from 5.1ch to stereo, or the other way around, and that's causing the problem.

    I don't know anything about encoding audio in VirtualDub, but one way or another I'd try re-encoding the audio with a program which is capable of downmixing 5.1ch audio to stereo, and set it to do just that. Many encoder GUI's will do it. MeGUI's audio encoding section can be configured to downmix. Or you could try TAudioConverter.

    When all else fails, I tend to do the decoding via DirectShow with ffdshow decoding with it's mixer filter enabled and set to output stereo. As an example you could configure MeGUI's audio encoder to use DirectShow as the preferred decoder and leave ffdshow set to output stereo. No matter what goes in you should get stereo out which should re-encode normally as it's being decoded.
    Quote Quote  
  5. Originally Posted by LigH.de View Post
    VirtualDubMod has some special features to handle AC3 better, but overall it is rather outdated; for this specific problem it may still work. If you consider demultiplexing the AC3 audio, converting it externally to MP3, and re-multiplexing the MP3 to the converted video, VirtualDubMod will do that more reliably than the original VirtualDub, providing its "Streams" dialog.

    MeGUI will probably be able to handle AVI sources with AC3 audio streams, it should even be able to recode it to MP3 (you could prefer Pro-Logic II downmixing if size matters that much); you should be able to use either AviSource or the indexer with L-SMASH Source. But it may be a bit complex for a not so experienced user of AviSynth based converter GUIs.
    Thank you for the detail answer!! I'll give VirtualdubMOD a try first since it's similar to Virtualdub. If that doesn't work, I'll move on to MeGUI. I've used it for mkvs before, I guess I'll figure it out with some research

    Originally Posted by ndjamena View Post
    Does it play properly? 448kbps is a bit much for SD stereo audio, are you sure it's not 5.1 or doesn't switch TO 5.1 somewhere within the file?
    Originally Posted by hello_hello View Post
    I suspect ndjamena is likely correct and somewhere the audio switches from 5.1ch to stereo, or the other way around, and that's causing the problem.

    I don't know anything about encoding audio in VirtualDub, but one way or another I'd try re-encoding the audio with a program which is capable of downmixing 5.1ch audio to stereo, and set it to do just that. Many encoder GUI's will do it. MeGUI's audio encoding section can be configured to downmix. Or you could try TAudioConverter.

    When all else fails, I tend to do the decoding via DirectShow with ffdshow decoding with it's mixer filter enabled and set to output stereo. As an example you could configure MeGUI's audio encoder to use DirectShow as the preferred decoder and leave ffdshow set to output stereo. No matter what goes in you should get stereo out which should re-encode normally as it's being decoded.
    The file does play correctly, no glitch or anything, that's why it's so weird when it does not convert properly.

    I really appreciate all the input! I'll definitely need to give MeGUI a try!!
    Quote Quote  
  6. Thank you so much everyone!!! The MeGUI method worked!

    I originally had problem converting the extracted ac3 audio to mp3, I've tried two converter and they both prematurely stopped encoding and only gave me 30 mins of audio. I managed to encode the ac3 perfectly with MeGUI using DirectShow with ffdshow as suggested. Then attached the audio to the video in virtualdub. It works perfectly now, and I managed to compress the video without a problem
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!