Sunday 18 March 2007

Workshop

In this workshop, we will talk about choosing the best codec for your needs be it for encoding your files or making your own recordings. Although here we are only looking at four major codecs which are MP3, AAC, WMA and Ogg Vorbis (not necessarily in that order). For our experiments, we will take a source file that is an uncompressed PCM .wav file approximately worth 43MB of disk space. Using software that is freely available on the Internet, for instance the LAME MP3 encoder we will encode this file to a smaller size both using lossy and lossless formats and compare these results. So let’s get on with it.

Windows Media Player 10

We have chosen this particular version of Windows Media Player since it lets you encode files in the MP3 format too, other than Windows Media Audio.

Windows Media Player does not let you encode .wav files off your hard drive. What you can do is rip music of a CD. Nevertheless, here is how you can compare your results. First off, rip the song that you want to encode to a .WAV file using a free software such as EAC or dBPowerAmp to your hard drive. Next use Windows Media Player to rip the same song from the CD to a .WMA file and compare the results. The steps below will make this more clearer for you.

In Windows Media Player 10, click on the Rip tab in the default Window or from the Menu Bar, click on View-Go To- Rip. This will take you to the CD track list window.

Now click on Tools-Options. This will open a new window. Click on the Rip Music tab in this Window. In the Rip Settings box, under the Format drop down list you will see the options available for ripping the track from the CD.

Choose any of the option that you want. If you are of the audiophile kind, the best would obviously mean choosing the Windows Media Lossless. As part of the Microsoft DRM program, this option lets you choose if you want to copy protect the music. You can check this box if you want. Now, that we are done with the settings lets start with the ripping. For this, just press the Rip Music in the Windows Media Player window.

Lets compare the sizes now. After ripping the song using the lossless codec, the file size 30.1MB is about 11MB lesser than the original .WAV file. What about the sound quality? Much, much better than the regular 128Kbps MP3 file. The average bit rate for this file is 1041Kbps which is much higher than the even the highest MP3 encoding rate which is 320Kbps.

In a similar manner, you can choose MP3 to be the file type of the music that you are ripping in the Rip Music options and rip the song. Our 43MB file in this case is compressed to approximately 10MB file at a bit rate of 320Kbps. Sound quality is good but if you listen really closely, there will be points where you can make out the difference between the original and the compressed files.

AAC

AAC or Advanced Audio Coding is a MPEG-2/MPEG-4 and is the audio codec of choice for Internet, wireless and digital broadcast. This is a good option if you want to stream audio or want your audio to consume a smaller footprint of your total data. AAC encoding is extremely efficient and easily surpasses the MP3 codec and provides surround sound options. The MPEG group that includes Dolby, Fraunhofer (FhG), AT&T, Sony and Nokia developed AAC, top of the line companies, also involved in manufacturing equipment that affects our daily lives.

For converting our .WAV audio file to an AAC file, we will need to use iTunes which is freely downloadable from the Apple website. Once you have downloaded and installed the software, follow these instructions to create your AAC file.

First click on File -> Add File to Library, then browse, and locate the file that you want to encode.

After adding the file, we will need to set the settings for encoding this file. For this go to Edit-Preferences and in the new window that opens click on the Importing Tab. Here you will see that, similar to Windows Media Player, above there are a lot of codec options including Apple Lossless for you to encode your .WAV file with. You will also see a WAV file encoder that will let you encode your Audio CD tracks to WAV files using iTunes. Next, we choose the AAC Encoder option. By default the option is set to 128 Kbps which we will not choose. Click on the drop down list and choose Custom which will pop up a new window asking you to configure the various settings as you like.

Once you are done making the changes, click on OK twice. Now right click on the file that you want to encode to AAC and then click on the Encode to AAC option. This will start the process. After encoding the file at 320Kbps, the file size is similar to the MP3 file that we made earlier. The sound quality, though, is better than the MP3 file.

Ogg Vorbis

Ogg Vorbis is an open-source audio codec that is still being developed as an answer to both MP3 and AAC. It supports multi-channels and also high bit-rate encoding that rivals the sound quality of any MP3 or for that matter any AAC file. For our workshop, we will use a tiny utility called the oggdropXPdV.

This is a tiny (literally) GUI utility that lets you encode your WAV files to Ogg Vorbis format files.

For this simply drag your .WAV files in the fish box as seen in the screenshot to start encoding.

But before we start encoding we will need to set the encoding quality options, that will let us compare it with our previous files. For doing this, simply right click on the Fish icon box and then click on Encoding options. The above image is what you will see. Here click on the radio button under Bitrate Management and choose CBR mode and choose the nominal bitrate as 320Kbps. You can also go higher, but lets keep it at this to be able to compare the resultant file with the previous files. Now, drag your .WAV file in to the Fish icon box and the encoding process starts. Even this file is the same file size at 320Kbps. The sound quality is better than MP3 and easily comparable to the AAC file.

This workshop was intended to provide you with a glimpse of what you can do and what options are available for you to use when encoding music. Of course, audio is very subjective and you will need to carry out your own experiments to come up with the best solution for your specific needs.

No comments: