Most portable audio players can play music encoded in the MP3 audio format, but some consumers also have music in Ogg Vorbis, FLAC, MPC, or even WMA files. How do you change from one format to another when you need to? Here are some of the best audio conversion tools available in Linux.
One of the simplest and most elegant ways to convert audio files is by using the audio-convert script. It makes use of Zenity to display GUI messages and windows, but does the rest of its work from the command line.
When you type audio-convert filename, you are presented with a GUI message asking you to choose the output type for the resulting file. You then specify whether you want to pass the existing metadata tags to the newly created file or would rather input them manually. In the latter case, the script inserts the band name and album title for all the tracks after you enter them once. You have four audio quality choices when converting to MP3: medium (160Kbps), standard (220Kbps), extreme (264Kbps), and insane (320Kbps).
audio-convert makes use of several CLI tools to do its job. It needs MPlayer to decode WMA files, musepack-tools to manipulate MPC audio files, and flac and others in order to convert files to and from Ogg, MP3, FLAC, ACC, WAV, APE, and WMA formats. If you want to keep it simple, use this elegant script.
SoundConverter is another lightweight tool that offers a simple but effective GUI to convert audio files. Just specify a folder or an individual file using drag-and-drop or the buttons from the UI and you can convert it to MP3, Ogg, FLAC, or WAV format, using bitrates ranging from 64 to 256Kbps in the case of the first two filetypes. Optionally, from the Preferences window, you can specify how the resulting files will be named and where will they reside. You can set the application to make a folder based on an artist's name and insert subfolders using the artist's album names that contain the actual songs. Your can select files in three clicks, and all you have to do afterwards is wait for the process to finish.
SoundKonverter is a Qt-based front end to various audio converters that allows you to fine-tune the resulting file in various ways. SoundKonverter also has a Replay Gain Tool that can apply volume correction to files, so that they all play at the same equal volume level.
Drag and drop files or folders containing audio files onto the main window, then from the Simple tab select the output format: Ogg, MP3, MP2, RM, MID, MPC, RA, or any other for which you have an encoder installed. Next to the output format dropdown list is an Info button that explains what benefits each of the formats provide. From the Quality dropdown list choose a quality for the resulting files: from Low, to Very High, to Lossless and user defined. You can specify output filenames and directories be created using the existing metadata or a directory of your choice. In the case of manually specifying the metadata, %b stands for Album, %a for Artist, %n for Track Number, and %t for Title; you can hold your mouse over the output text field for a helpful popup. The Detailed tab allows you to set a bitrate or quality, a resampling rate, and audio channel types (mono or stereo). To convert an MP3 album into Ogg files, click on the Detailed tab, choose Ogg from the Convert dropdown list, set the Quality as desired, and deselect Resample and Channels to use the file defaults. SoundKonverter will start decoding three files at a time, using oggenc in the background, then proceed to encoding the files as soon as one of them has finished.
Gnormalize is a GTK application that can rip, normalize, and encode audio files on the fly. Just select a file or a directory containing audio files and choose an output format from the main window. If you wish to preserve the files' encoding type and bitrate, click on normalize and let the software do its work. If you'd rather change those properties, from the config tab select change properties and set these option manually. The info tab provides an ID3 tag editor that can batch-modify MP3 and Ogg files. The rip tab, besides the ripping function, offers a small player where you can preview your results. Gnormalize can convert to and from MP3, MP4, MPC, Ogg, APE, FLAC, and WAV.
In addition to these multi-format tools, there's a dedicated tool for converting almost every major audio format. OggConvert's purpose is to provide an easy-to-handle GUI for converting different file formats into Ogg. To use it, load a source folder, move the audio conversion bar to pick an audio quality, specify file names and destination folders, then click on Convert.
And then there's the CLI way; you don't need all those GUI tools to do the encoding when you have so many command-line alternatives. All of the above utilities are just front ends that use lame, oggenc, ffmpeg, mppenc, MPlayer, and other applications that can be run from the console. Use lame file.wav file.mp3 to quickly create an MP3 file out of a WAV. Use lame -b 320 file.wav file.mp3 to manually set the bitrate to 320. You can create 212Kbps MPC files by using mppenc --xtreme inputfile.wav outputfile.mpc. To convert WAV files to MID, use Waon: waon -i inputfile.wav -o outputfile.mid. The flac utility can convert a WAV or AIFF file into Ogg FLAC or native FLAC files: flac -8 inputfileoutputfile, where the number represents the compression level. It can vary from 0 (fastest) to 8 (best).
Linux has a tool for almost every audio format you come across. If you can't find one in your distribution's repositories, you can find it on the Internet.