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:
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.
Now you can convert the files with:
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.
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.