O'Reilly logo

Linux Multimedia Hacks by Kyle Rankin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #35. Convert from One Audio Format to Another

Use command-line tools to convert between audio formats.

While a desktop user may only encounter a few different types of sound formats on an average day, there are tens, if not hundreds, of different audio formats out there, each with its own specific use and set of features. In this hack, I tell you how to use standard command-line tools to convert between the major audio formats you might encounter.

There are different ways you could categorize audio formats, but one easy way is to split them into lossy and lossless categories. Lossy formats (like MP3s, WMA, and Ogg Vorbis files) not only compress audio, but also strip away parts of the sound that are inaudible or mostly inaudible to the listener. The degree of sound-quality loss varies based on the bitrate of the file and which format you use (certain formats are known for generating higher quality sound at the same or lower bitrates), but with any lossy format, there is a loss in sound quality—hence the name.

Lossless formats (like WAV, CDDA, and FLAC) provide maximum sound quality and do not strip away any sound from the file. This results in a (sometimes much) larger file because some lossless formats don't compress the file, while other lossless formats do.

Tip

The distinction between lossy and lossless files is important, especially when you are going to convert between file formats. Generally speaking, converting from one lossy format to another will result in worse quality ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required