Rip Your CDs At The Command Line

Are you looking for a fast, efficient, and easy way to rip music from your CDs in Linux? Then look no further than the command line. Yes, you read that correctly. The command line.

For a variety of reasons, the Linux command line has a reputation for being difficult and unwieldy. In some cases, that’s true. But a script called ripit turns the command line into an excellent and deceptively simple environment for ripping CDs.

Let’s take a look at how ripit works.

ripit?

ripit isn’t a program. It’s a Perl script that acts as an interface to a number of command line CD utilities including dagrab, cdparanoia, and cdda2wav. The default is cdparanoia.

Instead of having to remember long string of options, ripit walks you through the steps required to rip a CD. You can include a number of command line options if you want or, if you frequently use certain options, save them to a configuration file. More on this later. You can also run ripit with no interaction.

Installation

Obviously, you’ll need to download and install the script. If you don’t have one of the CD utilities mentioned earlier, you can install it using your distro’s package manager. You’ll also need to install a Perl module called CDDB_get, which gets information about each track on the CD from an online database called CDDB.

1. Download ripit-3.9.0.tar.gz to your home folder.

2. Open a terminal and run the commands:

tar xvvfz ripit-3.9.0.tar.gz
cd ripit-3.9.0
sudo make install

Usage

Once ripit is installed, just pop a music CD into your computer’s CD-ROM drive, open a terminal, and type

ripit

ripit in action

You’ll be asked to pick a title from a list. Press 1 on your keyboard and then press Enter. Next, ripit will ask if you want to add or edit information from CDDB. With most CDs, you can just press Enter to skip this step.

If you want to skip those steps, type

ripit --nointeraction

.
In either case, ripit will rip all songs on the CD. Each song will be saved as an MP3 file in your /home directory.

Getting fancy

But what if you don’t want to rip every track on a CD? You can tell ripit to rip only certain tracks or a range of tracks. So, if you want to rip tracks 2, 5, and 9 on a CD, type

ripit 2,5,9

.
Or, if you want to rip tracks 4 to 8, type

ripit 4-8

Ripping specific tracks

By default, ripit will save files in a folder in your /home directory with the name of the CD — for example, Various Artists – Putumayo Presents… Turkish Groove. If you’d rather save the files to, say, the folder /home/(yourName)/music, use the command:

ripit --outputdir /home/(yourName)/music

Saving in other formats

So what if MP3s aren’t to your liking? ripit can output files in several other formats, including Ogg, FLAC, MP4, FAAC, and WAV.

Add the option --coder= followed by one of the following numbers to the command line:

  • 1 (Ogg)
  • 2 (FLAC)
  • 3 (FAAC)
  • 4 (MP4)
  • 6 (WAV)

For example:

ripit --coder=1 #rip in Ogg format

Using a configuration file

Nobody wants to remember a bunch of command line options. Especially if you don’t use ripit all that often. You can get around that by specifying the options that you need along with the --config option. ripit will save a configuration file, called config, to the folder .ripit in your /home directory.

You only have to do this once. Whenever you run ripit, the script reads the configuration file.

Is that all?

Definitely not. This post only scratches the surface of ripit’s capabilities. Just type ripit --help to get a full list of options. Then, choose the ones that you use most and save them to a configuration file.

If you’re a command line junkie who rips a lot (or even a little) music, then you’ll find ripit to be an indispensable tool. It’s easy to use and gets the job done quickly and efficiently.

Photo credit: grz3gorz

Do you like what you read here?

Receive the latest update in your inbox.

Or connect with us: