Exporting, compressing and multiplexing
your audio for mpeg distribution.

Exporting Your Audio

First of all, as you should know by now, when you are exporting your movie from your editing program you should always use uncompressed PCM wav as your audio stream. Also, you shouldn't change the sample rate - if you are using a 44.1kHz source then export it as such. For this guide you should have exported your audio as a separate wav (for reliability more than anything else). See the exporting guide for more info.

Compressing Audio for your MPEG 1/2

Most of you will be wanting to know about encoding audio for MPEG 1 but this guide is also useful for MPEG2 stuff.

MPEG audio

For most people the choice of audio compression will be no choice at all. Mpeg-1 layer 2 audio is what ErMaC recommends in his guide and indeed it is the standard... you should never use Mpeg1 layer 1 audio because it's seriously old and seriously crap (it's pre-vcd which is pre 1993). So, mpeg1 layer 2 it is.

Mind you, it is possible to use MP3 audio in your mpeg video files. The only problem with this is that they aren't compatible with hardware playback - so vcds, dvd players and hardware mpeg players will all have trouble with mp3 audio but in terms of playback in software mode there is no problem whatsoever in using an MP3 stream for the audio (except really really old pcs like P100s etc might get lagged).

[note - do not use mp3 for convention submissions as they often use hardware players]

The choice is yours - I'll describe how to do good encodes with both mp2 and mp3 audio but you need to decide whether you want to have the video more compliant (which, if you are using ErMaC's TMPGenc method it wont be anyway) or smaller/better quality audio-wise. If you are doing an MPEG2 video file for a DVD master then you'll have to choose mpeg layer 2 audio (unless you are DVD authoring where you could possibly use WAV PCM but if you know much about authoring then you know more than me already)

For this, the program used will be TMPGenc which you should know about from ErMaC's guide.

mp2 - TMPG's audio encoding capabilities are ok.. but they're nothing special. There is a better way to get quality audio when encoding with TMPG using an addon program called tooLAME. This is a simple .exe file that you can put anywhere on your computer. Once you've extracted it, load up TMPG and choose Options -> Environmental Settings:

TMPGenc Environmental Settings Window

In the Audio Engine tab you can point TMPG to programs that will do parts of the conversion for you. As you can see I have external programs for layer-2 (mp2), Layer-3 (mp3) and sample rate changing. The one you need is the Layer-2 (mp2) audio which you should point to the tooLAME file you have extracted like I have done.

Audio encoding settings in TMPG are fairly simple and the minimum quality settings I think you should choose are:

Mpeg Layer II, 44100Hz, Joint-stereo, 224kbits/sec

Of course, make sure the sample rate is the same as your input file. If you think that Joint Stereo loses too much of the stereo separation for you then by all means choose normal Stereo for better sound. As for bitrate... well larger is better but for mpeg layer 2 audio you don't really want to be going any less than 192. 128kbps may be ok for mp3s but it's not good for mp2 audio. 224kbps is the standard for vcd audio so that's what I recommend. If you are doing an MPEG2 DVD master of your video then don't skimp on the audio - choose 384kbps.

That should be all you need to know for mp2 audio in your mpeg file.

mp3 - TMPG doesn't have a default option for mp3 encoding, you need to use an external compressing tool. Look at the setup above for the TooLAME mp2 encoder and you will see that I have a LAME mp3 encoder for layer 3 audio compression. This is what you should do for mp3 audio. The lame.exe can be found in the besweet folder in the amvapp directory, alternatively you can  get the LAME mp3 encoder files from here.

Again, the audio settings are the same as before except now you can choose Mpeg1 Audio Layer III as your compression type. So, again choose the correct sample rate and choose Joint Stereo (or Stereo if you want that extra edge with the sound). For the bitrate you should choose 128kbps or above. Personally I think 160kbps is a good value for an acceptable quality/size ratio but if you can go higher, please do - if you do a 224kbps encode it will be the same size as the layer 2 audio version but the quality will be much much better.

AbsoluteDestiny - September 2003