Digital Digest
 
DVD DIGEST|DivX DIGEST |
 
.
Introduction
  • About the Author
  • Email
  • Disclaimer
  • Essential Links
  • Essential Tools
  • Ethics, Piracy & Philosophy
    Convert DVDs with Flask Mpeg
  • Extracting the DVD
  • Using FlasK Mpeg
  • Resizing in Flask
  • Convert DVDs with Mpeg2avi
  • Extracting the DVD
  • Using Mpeg2avi
  • Resizing in Mpeg2avi
  • Advanced DVD Conversion
    Convert DVDs with DVD2AVI
    Nandub SBC Encoding
  • Using Nandub
  • Using DivX 4.0
  • Audio / Video Editing
    Advanced VirtualDub
    Digital Video Capture
  • Video Capture: Part 1
  • Special FX Tutorials
  • Morphing Buffy Style
  • Star Wars LightSaber Effects
  • The Exorcist Effect
  • Other Video Formats
    VCD & SVCD Guides
  • DVD to VCD
  • AVI to VCD
  • Multimedia Guides
  • DivX with Subtitles
  • Mutilanguage DivX
  • Multimedia DivX Pt 1
  • Multimedia DivX Pt 2
  • Appendix / Tips
  • Aspect Ratio's
  • Resizing DVD's
  • DivX Quality Guide
  • Bicubic vs Bilinear Resizing
  • Deinterlace Method Test
  • Video Comparisons
  • WM8 Quality
  • Basic DVD Structure
  • NTSC / PAL & Interlace
  • AVI 4GB Limit
  • Key Frames & Delta
  • Monitor Setup Guide
  • FAQ's
  • Questions Answered
  • Downloadable PDF Guides
  • Glossary
  • Word Definitions
  • My Guides Translated
  • Go Here
  • Fixing Bad Audio

    Uncompressed audio quality is usually dependent on the samplerate and bit depth that it was sampled with. Lets me first explain what these are:

    Samplerate

    When you record sound into the PC it is broken up into a series of slices. These can be likened to the framerate of a video file, each moment in time is frozen and the information about it is recorded. In the same way, each audio slice represents a number that defines how high or low the audio is at that moment in time. These slices are called samples and the number of samples per second is measured in Hertz (Hz).

    Bit Depth

    A 'Bit' is a standard storage size used by your computer just like kilobytes and megabytes, it is actually the smallest unit of storage. Each bit can define itself as on or off (1 or 0). Eight bits make a byte, 1024 bytes make a kilobyte (1K) and 1024K make a megabyte (1 MB).

    Going back to our video analogy, if the Samplerate is how many "frames" the audio has, then the bit depth is how large the frames are, the resolution or the amount of memory allocated to each frame. The large the bit depth the more possible amplitudes each audio 'slice' can have. Eight bit audio uses 256 amplitudes, 16-bit allows 65536 and 24-bit can have 16 Million!

     

    Flask Mpeg and Samplerates

    Firstly, it means that the higher the samplerate and the higher the bit depth the higher the quality audio you will get. It also means it will take much more storage space too! 44100Hz 16-Bit represents CD quality audio and 48000Hz is actually even higher than CD quality. This means to get the best quality audio you should also aim for the highest samplerate and bit depth your sound card can handle. But more seriously the analogy to framerate and samplerate is almost perfect because just as a higher framerate will produce a smaller video length a higher samplerate will produce a smaller audio length!!

    I know it sounds strange because if you record an hours audio at 44100Hz or at 48000Hz its should still last an hour! And in fact it usually does because it was recorded that way. But when you start converting samplerates that is a completely different matter. Unless the converter takes into account this framerate change there will by audio synch problems.

    This is a very common reason Flask Mpeg will give audio synch problems. If you convert a DVD 48000Hz audio down into 441000Hz will very often result in audio synch problems. If you find the audio has been recorded at the wrong samplerate with Flask Mpeg it may fix it if you convert it back to the original DVD samplerate i.e. 48000Hz. Theoretically, the same film of 60 mins recorded both separately at 44100Hz and 48000Hz will play for exactly 60 minuets. But when it comes to ‘downsampling’ i.e. converting 48000Hz down to 441000Hz, then problems arise because many programs do not seem to keep the file length the same! Solution? Grab a DVD audio at 48000Hz 16 Bit only! You may then use VirtualDub to convert the audio down to 44100Hz after because VirtualDub is able to keep the audio length perfect!

     

    Fixing that Dull Sound

    Because many sound cards cannot handle 48000 Hz very well you may find that any method you use to extract the sound will give a fairly dull sound output. This can be prevented by converting the audio to 44100 Hz in VirtualDub. This can be done at the same time that you multiplex the audio and video files together or after when the movie is finished. I'm assuming you are fixing a finished movie here. So open VirtualDub as usual by going to File > Open video file...

    We don't want to effect the video itself so we use Video > Direct stream copy. Whenever we select an option, VirtualDub adds a black dot by it to tell us it is selected.

    Then select Audio > Full processing mode.

    Choose Audio > Conversion...

    Choose 44100Hz and make sure the 'High quality' is selected, and press OK.

     

    Fixing Crackly Sound!

    Actually, cracks pop's and hiss are usually a result of badly decoded sound and cannot be fixed other than getting the sound all over again! Ac3Dec is usually the culprit, and since Flask Mpeg uses the same decoding engine as Ac3Dec then it is possible that it will also get some crackly sound.

    To be fair I think perhaps Ac3Dec has improved since it was first made, so you may not need to worry. But nevertheless, if you do get bad audio from it I suggest you try another method. The best way I have found is to get the audio with GraphEdit, the quality is much better in my option. Check out my 'Audio with Graphedit' section for details on this. Then follow the 'multiplexing' guide to merge it to the video file.

     

    Fixing Very Quiet Sound!

    As you would expect, DVD audio has a much higher Dynamic Range than normal TV or Video. This means that it can go from mind-numbingly loud to so quiet that you cannot hear anything! This is fine for our DVD systems but usually a PC will not be able to give enough range. So what you end up with is a soundtrack that is mostly quiet with some very loud bits in it! Software DVD players such as WinDVD have a built in 'Dynamic Normalizer' which usually makes sure the audio is loud enough to hear at all times.

    Since you probably used Flask Mpeg or Ac3Dec to create your audio it may be the case that your audio is just too quiet to hear. Again, the best way (in my opinion) to fix this is to get the audio again using GraphEdit and the WinDVD audio filters. Of course, if the audio is badly quiet this still may not be enough! The alternative (slower way) is to normalize the sound. Normalizing is a way to make the sound as loud as it will go without clipping. Clipping is when the audio goes off the scale and looses parts of its information. Clipping would cause pops, clicks and other annoying glitches that we obviously don't want. So normalizing is a much better method than amplification.

    The old method I suggested was to use Cool Edit or SoundForge or a similar audio editing software to normalize because they have this option built in. But there is a more effective way and it doesn't require you buy such expensive software like Cool Edit either =). There is a really good free tool called DeDynamic. It does standard normalization, but it is also able to perform dynamic normalization! What this means is instead of just normalizing the whole file, it normalizes and also adjusts the quiet to loudness ratios. So a loud sound will remain just as loud but a normally quiet sound will be made louder, cool huh! Whatever method you use, the only problem with fixing the audio by normalizing is that it takes anything upto about 4GB of hard drive space to do for a whole movie!

    Step 1. Extracting the Audio

    I'm assuming you used Flask Mpeg to create your movie so before we go any further we need to extract the audio from your finished movie. Open the movie in VirtualDub:

    Choose File > Save Wav...

    Don't worry about size yet, it shouldn't be larger than about 100MB; in fact, its usually only about 60MB. VirtualDub doesn't change the audio to uncompressed PCM audio, it literally takes out whatever is in there. So if you used Mp3 that is exactly what it will extract...although it will still call it a something.wav and not something.mp3.

    Step 2. Converting it to a PCM Wave

    Now we must convert it to uncompressed PCM. For this we can use Winamp because everyone knows how to use Winamp and its free of course ;^). Open your Wav file and press the stop button to stop it playing. Right-click and choose:

    Options > Preferences...

    Choose the Audio I/O tab. Now instead of the normal OUT_WAVE.DLL option, choose OUT_DISK.DLL. Press 'Apply' and Winamp will ask where you wish to save the file.

    Choose a location and wait until the audio is converted into a huge one and a half Gigabyte wave file :(.

    Step 3. Normalizing

    The bad news is DeDynamic is a DOS operated tool. The good news is I'm gonna show ya how to use it :). Make a folder on your main hard drive (usually C:) and call it something simple like dynamic. Cut an paste the gigabyte Wave file you just created with Winamp into it (if you didn't already extract it to there). Also put the DeDynamic.exe file in there as well, so you will have something like this in your dynamic folder:

    Great! Now go to Start Menu > Run and type Command.com to bring the DOS Prompt up i.e.:

    Type: CD\ and press Enter. Type: CD dynamic and press Enter. Now, cut and paste the following line into the DOS prompt:

    DeDynamic.exe -a 6 C:\dynamic\audio.wav C:\dynamic\final.wav

    (I have encircled the DOS paste button in red in the picture below).

    Obviously the text will not be those colours, I'm just using colours so you can see what the line you pasted means. The -a 6 (highlighted in green text) is the amount of dynamic normalization. You can probably quite happily use anything from a setting of 1 to 50 without any problems. If, for example, you wanted to dynamically normalize by 50 you'd put -a 50 where the -a 6 was in my above line. If you just want to normalize without the extra dynamics just put -a 0.

    Using an amount of 50 is severe overkill and it wasn't really designed to do that much. But I've tried it at 50 and above and it sounds quite good, very loud and there is no audio corruption either. But this is a very powerful program, so I would suggest you try a setting of between 4 and 6 and see how that goes. If you still want it louder then you can keep going up until you are happy with it :).

    Anyhoo, when you've decided on the setting, paste it, press the 'Enter' key and it will ask what output you'd like it converted into with the following box:

    I would choose the same as the input. So if you had 48000Hz audio originally (all DVDs use this format), then I would choose it again. You can choose another format such as MP3 if you want but this may cause synch troubles and/or difficulty on merging the audio back to the video.

    In the end we should end up with another huge gigabyte file, but this time it will be normalized to a really loud kick ass level! That's it! Now go to my 'multiplexing' guide to see how we use VirtualDub to recombine the new audio to the old video file =o).


    Duplication of links or content is strictly prohibited. (C) NICKY PAGE 2000