Help - Search - Members - Calendar
Full Version: Autogk For Audio Encode Of Your .avi For Lower-end Audio Systems
Darkside_RG > Technical Discussions > Guides/How To > Audio
ukb007
Using AutoGK for audio transcode of your .avi

1.36 GB rips often (and also 700 MB rips sometimes) have ac3 audio. It's a wonderful format to have, but only if you have a somewhat higher-end audio system. The beauty of the dynamic range offered by ac3 is that explosions are quite loud, normal conversation truly life-like - but that's in your higher-end system. In ordinary $10 speakers you really have to strain your ears to hear the dialogues.

I don't have a $5000 audio system; so what I do is this:

I transcode the ac3 in my .avi into ABR (Average bitrate - a kind of Variable Bitrate) mp3 at 192 kbps; that by itself boosts audibility. (Why 192 kbps? I've explained it a little later...) To make matters watertight, I ensure that the "normal" volume of the audio is 90 dB.

You can do all this in 3 steps:

Step 1. Demuxing the audio from your .avi and transcoding it into ABR mp3:

Since AutoGK is an excellent front-end for a number of renowned audio manipulators, I use this program for this step which, incidentally, is the major step.

Step 2. Raising the volume of the mp3 to 90 dB:

For this, I use the infallible freeware mp3gain. It's very easy to use, and very intuitive, as I'll presently show you.

Step 3. Replacing the ac3 audio in my .avi with the mp3.

This is accomplished the AGK way - perhaps you've already guessed it - with VirtualDubMod.

Now let's travel up the actual steps...

Open AutoGK. Put in your .avi:



Note that the output filename has been suggested by AGK in the location of the input file. Let it be like that. Also note the information that there's one 384 kbps 5.1 channel ac3 soundtrack in your input .avi.

In Select output size, choose Custom size (MB) and type in 50 MB. Yes, I know, it's ridiculous. The reason is, you don't want a video of any size; your purpose is different. AutoGK performs audio operations ahead of video transcoding, and we are taking advantage of just this fact: we are manipulating AGK so that it stops in its tracks after doing audio.

Next click Advanced settings and ensure VBR mp3 at 192 kbps; nothing else matters. Why 192 kbps? It has been seen that 192 kbps provides the optimum listening experience in a properly encoded mp3 stream. Any higher, the file size will grow but your ears will not spot the difference unless you are an X-man living in secrecy; any lower, and you lose information unnecessarily.



Add job, and click Start:



Immediately VirtualDubMod is evoked and the analysis of source video start. You don't care a hoot about analysis at this moment, of course, so you click the red x at upper right corner to close this. Immediately VDubMod requests confirmation:



Of course you click Yes, and at once Audio Demuxing begins, again, by VirtualDubMod:



Just one thing to remember about closing VDubMod Dub Operations windows: they are so similar-looking that it is easy to confuse which is which: closing the Demuxing window instead of the Analysis one (which may not be launched at all in dome instances) may put a nasty cog in the wheel.

Sit back and relax. After demuxing is completed, Azid is called up for decoding the ac3 audio to the uncompressed .wav form. AZID is a win32-command-line ac3 decoder that does correct Dolby Surround downmixing and more ... you may also be interested in getting a graphical user interface for this excellent command-line based program here.



After decoding is complete, the volume normalized, i.e., gain elevated to a more audible level, with Normalize.exe, another tool for adjusting the volume of audio files to a standard level. This is also useful for things like creating mixed CD's and mp3 collections, where different recording levels on different albums can cause the volume to vary greatly from song to song.



This normalization is, in most cases, sufficient, but a number of users may find it a wee bit inadequate. We'll see about that later. After normalization is complete, the celebrated Lame is launched. Today, LAME is considered the best MP3 encoder at mid-high bitrates and at VBR, mostly thanks to the dedicated work of its developers and the open source licensing model that allowed the project to tap into engineering resources from all around the world. Both quality and speed improvements are still happening, probably making LAME the only MP3 encoder still being actively developed. For those who love tidbits, LAME originally stood for LAME Ain't an Mp3 Encoder. LAME started life as a GPL'd patch against the dist10 ISO demonstration source, and thus was incapable of producing an mp3 stream or even being compiled by itself. But in May 2000, the last remnants of the ISO source code were replaced, and now LAME is the source code for a fully LGPL'd MP3 encoder, with speed and quality to rival and often surpass all commercial competitors.



As soon as Lame finishes, AutoGK gets the wind up that the audio itself is bigger than the target output size. Stunned and disgusted, it quits:



Read the part of the log in the Log window of the AGK interface. Your audio file will be neatly deposited in the agk_tmp folder of the parent directory where the input file is kept:



Now launch mp3gain, and drag and drop your mp3 on the gui. Then press the Track analysis button to beging analysis of the file:



After the process of analysis finishes, you can see the volume-level in dB. It is quite close to our target of 90 dB level, so you don't need to do anything. Otherwise, press the next button: Track gain, and the volume will be adjusted.

Now open your .avi in VirtualDubMod, and click Streams > Stream list:



The available audio stream is displayed for you. Note that sometimes your file may contain more than one audio; in such cases all the streams will be displayed.



Click Disable located at the right lower corner, and immediately the audio file will be disabled:



Click the Add button (second from the top on the right) and select the external source which is the new mp3 located inside the agk_tmp folder:



Immediately in the upper left corner of your screen the MPA import widow will appear; this is where VDubMod decides the sanctity of the audio stream and whether it is respectable enough for import...



Since our mp3 stream is a VBR (variable bit-rate) one, the conservative VDubMod will issue a statutory warning:



The warning says that, in comparison with VBR, the "current preference" to go for a CBR (costant bit-rate) stream; VDubMod will do that for you, but the procedure will introduce skew from the .avi video stream. What do you do? What you do is simple; You have already decompressed the ac3 into .wav, and then recompressed it with a world-class operator (LAME) - so what do you care? You decline the offer gracefully and click No.

Immediately your mp3 will be added to the stream-list. You will note that the original ac3 stream is also listed, but is shaded, indicating that it is disabled.



Click OK to return to the VDubMod interface. Go to Video > (click) Direct stream copy.



You do this because you don't want VDubMod to encode the video stream; all you want to do is replace the existing ac3 soundtrack with your mp3, keeping the video stream untouched.

Now click File > Save as, and choose the directory and filename as usual. Immediately, the dub operation will start, muxing the video and audio streams.

This concludes the procedures. Thanks for your patience and regards.

datsun
Thank you for an excellent tutorial

yahoo.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.