Command Line Basics: Ripping Audio CD’s, Part 2

September 11, 2010 by
Filed under: command line, HowTo, linux, Ubuntu 

In Part 1 of CLB: Ripping Audio CD's, I showed how to rip the audio from a CD and save it as WAV files using cdparanoia. In today's short tutorial I'll show how to convert those WAV files to Ogg Vorbis audio files.

So the first thing we'll need to do is make sure that the proper tools are installed. We're going to use the oggenc command which is part of the vorbis-tools package. You can check your distro's repositories for vorbis-tools. If you're using Ubuntu, you can install it with:

sudo apt-get install vorbis-tools

Now that the proper tools are installed, we can get to the simple task of converting the WAV files to OGG. First, make sure you're in the directory that contains your WAV files from the previous tutorial.

cd rip

Now you can convert the files with:

Affiliate Link
oggenc -q 5 *.wav

The -q 5 option tells oggenc to use a quality setting of 5. You can set this at any value between 1 and 10 including decimal values such as 3.5. A value of 10 will give the highest quality as well as the largest file size. 1 will give the lowest quality and smallest file size. If you leave out the -q option, oggenc will use its default value of 3.

There are many other options that can be used with the oggenc command. You can read the documentation in the manual page.

man oggenc

It is possible to assign tags such as Artist and Title as part of the oggenc command, but I'll show you some easier ways to set the file tags in the next post.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>