How to rip your audio CDs to MP3 from the Linux terminal with abcde

4 days ago 5
MP3 Linux
(Image credit: Tom's Hardware)

I love music! I have hundreds of CDs in my collection, a few of which have survived since from the late 1980s. I have an original copy of Nirvana’s Nevermind, Foo Fighters debut album, and many compilation CDs that cover generations of groups and artists. I also have a Spotify streaming account, but I want to own the music I listen to. Having the CDs is great, but that isn’t much use when I am out walking the dog. So how can I take my music with me when out and about? I need to rip the audio CDs.

Ripping CDs was a popular activity around 15 to 20 years ago. Heck, I remember ripping audio CDs to MP2 (not a typo!) on an AMD K6-2 333. It took plenty of computing power back then, but now even a Raspberry Pi can rip an audio CD and convert the output to MP3 without breaking a sweat.

In this how-to, I show you how to use abcde A Better CD Encoder, a terminal application, to rip an audio CD and then convert the audio to an MP3 along with full album and track details. I’m using a Raspberry Pi 5 16GB, but this project can use any Raspberry Pi model from Pi 3 upwards. We also tested it on a laptop running Ubuntu 24.10 and everything was just as smooth.

For this project you will need

  • A Raspberry Pi 3/4/5 or a Zero 2 W
  • Keyboard, mouse, HDMI and power for your Raspberry Pi
  • A USB CD / DVD / Bluray drive
  • Audio CDs

Yes, there are alternative applications. I use freac to rip CDs on Windows, and it does a great job. On Linux, K3B is a KDE-based CD toolbox, and my favorite burning tool. K3B can also be used to rip CDs, but with abcde we can do it all with just a few commands, and very little system resources. We could even script the process to detect, rip and save the audio files to a specific location. But first, let's learn how to use abcde.

Please bear in mind that laws may prohibit you from ripping your audio CDs. Please consult your local laws before ripping your CDs.

1. Open a terminal and update the software repositories and upgrade the software installed on your machine.

Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.

sudo apt update && sudo apt upgrade -y

2. Install abcde CD ripping software.

sudo apt install abcde

3. Install eyed3 MP3 ID3 metadata (song info) management and lame MP3 encoder. We need eyed3 to write the MP3 metadata from the online databases for our audio files. The Lame MP3 encoder is the application called after abcde rips the audio CD to WAV format.

sudo apt install eyed3 lame

4. Connect a CD / DVD / Bluray drive to your computer and insert the CD that you wish to rip.

5. In the terminal run the command to rip the audio and encode to an MP3 at 320kbps. Change the 320 value to match your requirements. Anything above 192 is great for most devices.

abcde -o mp3:”-b 320”

6. The application will check online for the album details and then suggest three options. Choose the option that matches the album and track details for your CD, press Q to exit, and then enter the number of your choice.

MP3 Linux

(Image credit: Tom's Hardware)

7. When asked to edit the CDDB, it is your call. If the data looks correct, select N and press Enter. If incorrect, press Y and Enter to edit.

MP3 Linux

(Image credit: Tom's Hardware)

8. Is the album a multi-artist production? If yes, then select Y and Enter, then edit accordingly. No is the default, and nine times out or ten it is correct.

MP3 Linux

(Image credit: Tom's Hardware)

9. Wait for the CD to rip. The CD / DVD / Bluray drive will spring into life and start the ripping process. The application will automatically encode the audio tracks to MP3 as the process progresses.

MP3 Linux

(Image credit: Tom's Hardware)

10. Navigate to the folder containing the MP3s, and test the tracks in VLC or another media player.

MP3 Linux

(Image credit: Tom's Hardware)

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

Read Entire Article