How to convert from any format to WAV, MP3 or Ogg

From Commwiki
Jump to: navigation, search

Contents

Introduction

There are many ways of converting audio from one format to another but in this example we will look at how to convert from any format, for example RealMedia, to MP3 using the open source audio application Audacity. As long as you have the appropriate player for your source file, for example Windows Media Player, then you can use this method to convert from any source format to any other format supported by Audacity - that means uncompressed WAV, MP3 or Ogg Vorbis.

The advantages of this method are:

  • open source software is used
  • this method can be used to convert any type of audio file to any format supported by Audacity i.e. WAV, Ogg Vorbis, MP3
  • it does not require the installation of a specific conversion application
  • you can do "post production" on your recording such as further editing or adding effects

The disadvantages of this method are:

  • the procedure is done in realtime so if your source file is 30mins long then you will have to play the entire file through
  • if converting to MP3 then you will need to install a special MP3 encoder for Audacity

Step 1: Download and install Audacity

Download and install Audacity. Audacity can be downloaded from here and is installed the usual way your system demands. In this example we will consider installing Audacity on the Windows platform as that is still the most popular computer platform.

Step 2: Install LAME for MP3 conversion

'Out of the box' Audacity can save files into uncompressed WAV format or Ogg Vorbis. If you wish to convert your source file to MP3 then you will need to install the LAME encoder. LAME is a patent free audio compression codec that supports the MP3 format. LAME stands for "Lame Ain't an MP3 Encoder" which is the developers in-joke.

Details of how to install the LAME encoder for you system may be found here but essentially you need to download a file called lame_enc.dll (for Windows users) and tell Audacity where you have saved it.

Step 3: Open Audacity

Open Audacity - you should see something that looks like this:


Error creating thumbnail: Unable to save thumbnail to destination


Check what preferences have been set for recording to MP3 by going to "Edit | Preferences" and checking that the settings under the tabs "Audio I/O", "Quality" and "File Formats" are set to what you would like e.g. Mono or Stereo, and so on. Usually for most purposes the default settings are astisfactory as they are depending on what you intend to do with the finished output file.

Be sure to have "Stereo Mix" selected from the pull down menu that you can see on the right. Start recording in Audacity by clicking on the red record button that is circled in the diagram.

Step 4: Converting to MP3

In this example we will look at converting an audio file from RealMedia format to MP3 so open up your source file in RealPlayer and click play. You will see that Audacity will begin recording your RealMedia source as the waveform will change from a flat line to a sound wave - as in the example picture below.


Error creating thumbnail: Unable to save thumbnail to destination


In the above example, interestingly, the waveform and level meters (in red) show distortion and the source file has been set to play too loud and/or the recording levels have been set too high. Use this opportunity to set your playback and record levels to reduce distortion when you make your recording. You may have to start your source file a few times before you get the recording levels just right.

In the example below the volume of the input file has been reduced considerably to reduce the recording levels in Audacity and we can see a clear undistorted waveform in Audacity.


Error creating thumbnail: Unable to save thumbnail to destination

Step 5: "Topping and Tailing"

When you have finished playing your source file stop recording in Audacity by clicking the Stop button that is marked with a square. You now need to "top and tail" your recording which means removing unwanted audio from both the start and end of your project.

To remove unwanted audio from the start of your recording in Audacity place the cursor just a little before the audio starts and click on the waveform. Then go to Edit | Select... and then select "Start to Cursor" - Audacity will select the audio from the start of the track to where you placed the cursor. Your screen will now look like this:


Error creating thumbnail: Unable to save thumbnail to destination


Then simply select Edit and then Cut and Audacity will trim the unwanted audio from the start of your recording.

To remove unwanted audio from the end of your recording then click on a point on the waveform immediately after your recording stops, go to Edit | Select... and then choose "Cursor to End" - Audacity will select the audio from where you placed your cursor to the end of the recording. Your screen will now look like this:


Error creating thumbnail: Unable to save thumbnail to destination


Then simply select Edit and then Cut and Audacity will trim the unwanted audio from the end of your recording.

Step 6: Exporting as MP3

Now we have to instruct Audacity to save our recording as an MP3 file.

Choose "File" and then "Export as MP3" - your screen will look like this:


Error creating thumbnail: Unable to save thumbnail to destination


Choose a name for your file and where you want to save it. Audacity might ask you to complete some metadata information about your recording such as Genre and Artist but it is not essential to complete this - just click on "Ok" to bypass the ID3 metadata tag questions and Audacity will start exporting (saving) your recording as an MP3 file like this:


Error creating thumbnail: Unable to save thumbnail to destination


Congratulations - you have now converted a RealMedia file to MP3 format!

Use the above method to convert from any audio format (for which you have a suitable player) to any audio format suppoted by Audacity i.e. WAV, Ogg Vorbis or MP3. This conversion method could also be used to extract the audio from a piece of video or a DVD - there are many possibilities.