Skip to content

Instantly share code, notes, and snippets.

@jblyberg
Created October 9, 2012 13:10
Show Gist options
  • Save jblyberg/3858724 to your computer and use it in GitHub Desktop.
Save jblyberg/3858724 to your computer and use it in GitHub Desktop.
Totally basic script to rip audiobook CDs into a single file.
#!/bin/sh
#
# Totally basic script to rip audiobook CDs into a single file.
# I then use Audiobookbinder to create .m4b files so I can listen to them
# on my iPhone
#
# You'll need to:
# brew install cdparanoia
# brew install shntool
# brew install lame
# brew install afplay
#
# Usage:
# mkdir <audiobook file directory>
# cd <audiobook file directory>
# /path/to/ripper.sh <Disk # with leading zero reccomended>
# Example:
# /usr/local/bin/ripper.sh 01
rm *.wav
cdparanoia -B
shntool join *.wav
mv joined.wav joined-$1.wav
lame -b 64 --tl "Track $1" --tt "Track $1" --add-id3v2 --nogap joined-$1.wav
rm -f joined-$1.wav
rm track*.wav
afplay tada.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment