Instructions for ripping audio CDs in Linux

Page may contain affiliate links. Please see terms for details.

Shut Up Legs

Down Under Member
I don't advocate music piracy, so the instructions below are purely for backing up your own audio CDs, legally purchased, for the only purpose of playing them on a Linux music player application, or to copy them to a portable music player.

I thought I'd share these 2 audio CD ripping methods, because it took me a while to find some suitable methods, since ripping audio CDs isn't that straightforward in Linux. I'm using Linux Mint, but these 2 methods would also work well enough on other flavours of Linux. The text below is copied straight from a tips text file I keep. Hope you find it useful! :okay: Note: there are heaps of different ways to rip audio CDs in Linux, these methods just happen to use the Amarok music player, but other music players can also be used.

  • Insert audio CD, then:
  • Method 1 (requires installation of: cdparanoia, ffmpeg, amarok, and possibly a few other audio-related packages):
    • Open terminal in desired directory to which you want the files to be ripped, then:
    • Run in command-line, in an empty directory of your choosing: cdparanoia -B
    • Run in command-line, in the above directory:
      • for f in 01 02 ...... ; do
        • ffmpeg -i track${f}.wav -acodec mp3 track${f}.mp3
      • done
    • Edit track tags in Amarok:
    • Select all tracks, edit Album, Artist, Composer, Album Artist, Genre, Year tags.
    • Select each track, edit Title and Track tags.
    • Import tracks into Amarok (for details, see Method 2 below).
  • Method 2 (requires installation of k3b, amarok, and possibly a few other audio-related packages):
  • Use k3b to rip tracks to a filesystem directory:
    • Select CD entry in left pane, to show track list.
    • At top of track list, click "Start Ripping".
    • In Settings tab of "CD Ripping" dialog window, select filetype=mp3, target folder=/tmp
    • In 'File Naming' tab, the following files pattern seems to work well:
      • %A - %T/%n - !a='%A'{%a - }%t
    • Click "Start Ripping" button in "CD Ripping" dialog window.
  • Use Amarok to import the tracks into the audio collection:
    • Double-click home button, then click "Files" button.
    • Select all the tracks to be imported, then select in context menu "Copy to Collection > Local Collection".
    • Click "Copy the tracks without transcoding them".
    • In "Copy Tracks" dialog window, click "Advanced".
    • Set directory/file format to the string:
      • %artist%/%album%/%track%_-_%title%
    • Click "OK" button to do the import.
    • Sometimes, Amarok will put the CD directory under the "Various Artists" node in the "Local Music" tree browser, so if you don't want it there, right-click the directory and select "Album > Do not show under Various Artists".
Note that the major advantage of method 2 is that it properly writes the audio tags (artist, track title, etc.) to the files, so you don't have to manually edit them after doing the rip process. Also, I chose the MP3 format because it gives reasonable audio quality (although I know some would dispute that) and the files aren't too large.

Regards,

--- Victor.
 
OP
OP
Shut Up Legs

Shut Up Legs

Down Under Member
Forgot to mention: the reason I don't use Amarok's "rip CD" feature is that it won't work for MP3 format, which as I said I prefer, not just for the file size, but also because it's more portable than the Linux default format, which is the Vorbis Ogg format. Apparently, MP3 support can be added to Amarok, but I've never been able to work out how to do that (even though I'm a software engineer).
 
Top Bottom