My wife loves listening to audiobooks. I'd rather not give more money to Amazon via Audible, so we use the local library often.
The library offers audiobooks on CD. Over the years, my method for converting the CD's into a usable digital format has changed. I thought I would share my current workflow. It isn't perfect, and could probably be simplified further. But it works for me.Software Required:ABCDE
- A command line CD rippersox
- A command line audio processing toolopusenc
- A command line encoder for the Opus audio codec.Kid3-QT
- a tag editor for numerous audio formats. You could probably use something else if you wish.
You will need a bit of space for this method, as we will be ripping up to 15 CD's worth of audio to WAV.
As an aside, my desktop PC is running Archlinux, with Gnome as the desktop environment.Step One: Ripping The Discs
When you obtain audiobooks on CD, you generally get a plastic clamshell of five to fifteen discs.
First, I open the file manager (Nautilus) and navigate to a work folder where I will be ripping the discs to. Then, right clicking in Nautilus gives an option to open a terminal to that location.
After inserting the first disc, I enter the following in the open terminal:
abcde -1 -o wav -x -N
The flags at the end will do the following:
: Rips the disc to a single file.
: WAV audio format will be use for output.
: eject the disc when complete
: Do not prompt for anything additional, and begin ripping immediately. ABCDE will rip the disc into a folder named something like "Unknown". Once complete, I tab to the file manager window, and open the folder. Click on the audio file and press "F2" to rename. I will rename the first file to "01.wav".
This is repeated for the remaining discs. All that is needed, is to insert the next disc, and tab back to the terminal window. Pressing the up arrow key will bring up the last command entered. Press enter, and when finished rename the output file to the next increment (02.wav, 03.wav, etc.)Step Two: Bundling the files
When you have completed ripping the CDs, you should have a folder of sequentially numbered WAV files (representing the discs). You will either navigate to this folder using your command line window, or you can right click in the Nautilus file manager window and open a terminal here. We are going to use the Sox audio processing tool to combine all of the WAV files into a single FLAC file. I do it this way, because FLAC is lossless, and we want to lose no quality before our final compression. Also, Sox can't encode to
Opus, so we are unable to combine steps. In the terminal window, type
sox 01.wav 02.wav 03.wav
.... etc. I just have to type the sequence number, then hit tab to have the Linux terminal autocomplete the ".wav" at the end. Once you have all of the WAV file names in sequence, the last file name will be the name of your book and ".flac". Here is an example:
sox 01.wav 02.wav 03.wav 04.wav 05.wav 06.wav 07.wav 08.wav 09.wav final.flac
. Pressing enter will make Sox read all of the WAV files in sequence, and compress the output into a single lossless FLAC file.Step Three: Encoding and Finishing Touches
Now that you have a single FLAC file containing your entire audiobook, we can compress it using the Opus codec. Opus is a FOSS codec that provides exceptional compression and quality for speech. In the terminal window you had previously used for the last step, type the following:
opusenc --speech --bitrate 24 final.flac final.opus
. This will optimize output for spoken word content, set the bitrate to 24kbps, and make the final output file name "final.opus". Opusenc has a nice little progress meter so you can see if you have time to grab a drink or not. Once encoding is complete, I tab back to the Nautilus file manager window, and right click on the final output file. Then choose to open it in the Kid3 tag editor. From here, I add the book name, author, performer, year, set genre as audiobook, and drag and drop the cover art. Once you save, you can rename the final output file how you wish.
Congrats! You have converted 15 CDs worth of material to a single file that is under 200MB. For playback, my wife uses Alex Kravchenko's Smart AudioBook Player
. It has some nice features such as being able to set only a specific folder for audiobook storage (as opposed to scanning all media), easy to browse library, good cover art support, and an internal system for bookmarking the audio.