RipRight
What is it?
RipRight is a minimal CD ripper for Linux modeled on
autorip. It can run as a daemon
and will automatically start ripping any CD found in the drive after which the
disc will be ejected. Ripping is always to FLAC
lossless audio format with tags taken from the community-maintained
MusicBrainz
lookup service and cover art from Amazon
where possible. If a disc is unknown to MusicBrainz, the CD will be ejected without
ripping and can also be optionally rejected if cover art cannot be found.
With RipRight, ripping a CD collection is just a matter of feeding your Linux
PC each CD in turn and waiting while they are ripped. CDs which are immediately
ejected can be checked with the
MusicBrainz Picard tool
which allows CD identifiers to be uploaded to the website database. Any errors or
inaccuracies in the database records can also be edited on the MusicBrainz
website.
How it Works
RipRight is built upon the following libraries:
- cdparanoia
This does the hardwork of ripping CDs. It isn't the fastest ripping library,
but it does try to produce perfect digital extractions. It is configured by
RipRight for full paranoia mode, enabling all verification and correction
features.
- Curl
Used to transfer cover art from Amazon.
- ImageMagick
Processes returned cover art to extract and check image dimensions.
- FLAC
This library encodes the audio and writes the FLAC files complete with tag
information.
RipRight itself merely manages these libraries to automate ripping and encoding
of audio CDs. RipRight uses temporary files and threads to enable multiple
tracks to be encoded in parallel with ripping.
Usage
ripright [-d] [-a] [-s] [-r] [-o format] [outpath]
- -d, --daemon
Run in daemon mode. Ripright will detach from the terminal and direct output
to the syslog.
- -a, --rip-to-all
Normally exactly 1 result is required from Musicbrainz, otherwise the CD
will be refused and ejected. With this option, the CD will be ripped and
tagged to multiple files, once as each result from Musicbrainz. Each rip
will be output under a directory named Ambiguous/mb-release-id>/
where the the Musicbrainz release Id is used to identify each possible release.
- -w, --w32-filenames
Covert characters that are illegal on Windows filesystems to UTF-8
alternatives. If accessing files over Samba, this prevents name mangling
which can lose the file extension. Mapped characters are *, ?, " and |
which are replaced by ӿ, ʔ, ¨ and ǀ respectively.
- -r, --require-art
Refuse to rip a CD if the cover art cannot be retrieved. The correct
ASIN must be added to the MusicBrainz database for art to be fetched from
Amazon.
- -f filename, --folder-art filename
Save cover art (if available) to file, relative to the output directory.
The art file will be converted to the format specified by the filename e.g.
-f folder.jpg or -f folder.gif or -f folder.png. The exact supported formats
depend on those supported by the ImageMagick against which RipRight has been
compiled.
- -s, --allow-skips
Normally ripping attempts to make a perfect copy of a CD by using
all data verification and correction features of the cdparanoia
library. With this option, each bad sectors will be skipped after
20 failed attempts to read the data. Without this option, ripping
of scratched or damaged CDs may take a very long time and possibly
may not complete.
- -o, --output-file
Set the format used to produce output filenames and paths. This should
be a string containing the following special tokens:
Token | Meaning | FLAC Tag |
%N | Track number | TRACKNUMBER |
%A | Track artist | ARTIST |
%a | Track artist sort name | ARTISTSORT |
%B | Album artist | ALBUMARTIST |
%b | Album artist sort name | ALBUMARTISTSORT |
%C | Track artist if present, else album artist | ARTIST, else ALBUMARTIST |
%c | Track artist sort name if present, else album artist sort name | ARTISTSORT, else ALBUMARTISTSORT |
%D | Album/CD name | ALBUM |
%T | Track name | TITLE |
%Y | Release type | MUSICBRAINZ_TYPE |
%% | A single percent sign | - |
The release type is will be substituted as one of Albums, Audiobooks,
Compilations, EPs, Interviews, Live, Remixes, Singles, Soundtracks,
Spokenword and Other.
Slashes and colons in the '%' output fields are converted to UTF-8
equivalents to avoid creating subdirectories or causing problems
with Windows shares mounted via Samba. Slashes and colons given in
the format string will be literally preserved.
Downloads
RipRight is released as source with a configure script.
The following commands will verify the signature on downloaded files:
$ gpg --recv-keys EBF7AC52
gpg: requesting key EBF7AC52 from hkp server subkeys.pgp.net
gpg: key EBF7AC52: public key "Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
$ gpg --verify ripright-0.11.tar.gz.sig ripright-0.11.tar.gz
gpg: Signature made Wed 16 Jan 2013 08:04:41 PM GMT using RSA key ID EBF7AC52
gpg: Good signature from "Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 77C1 9FCA 3734 C864 F68F 332C 4F7B 32E3 EBF7 AC52
The following commands will configure, build and install the software:
$ ./configure
$ make
$ make check
$ make install
The following libraries/packages must also be installed or available, otherwise the
configure will fail:
RedHat/Fedora | Debian/Ubuntu |
flac-devel >= 1.1.4 | libflac-dev |
ImageMagick-devel | libmagick-dev, libmagickwand-dev |
libcurl-devel | libcurl4-gnutls-dev |
libdiscid-devel | libdiscid0-dev |
cdparanoia-devel | libcdparanoia-dev |
RipRight has been built on Fedora, Ubuntu and CentOS (although
flac-devel has to be manually installed on CentOS 5 as the packaged version is
too old).
Packages
Pre-built packages for Fedora have been kindly contributed and maintained. These
can be found on the Fedora project website.
RipArrange
It's possible that after ripping a number of CDs, you might change your mind
about the format string used to layout the FLAC files. In such a case, the
RipArrange application can be used to move the FLAC files based on a
new format string.
RipArrange is part of the RipRight release and takes the following options:
riparrange [-m|-c|-h] [-f] [-v] [-o format] file.flac ...
- -m
Move files to new location. This only works within a mount.
- -c
Copy files to new location.
- -h
Hard link files to new location. This only works within a filesystem.
- -f
Remove existing destination files before operation.
- -w, --w32-filenames
Covert characters that are illegal on Windows filesystems to UTF-8
alternatives as per the RipRight option.
- -v, --verbose
Output information about files which will not be moved because they are
already in the correct location. Normally only things that would be changed
are reported.
- -o, --output-file format
Set the format used to produce output filenames and paths. This option
takes the same special tokens as the RipRight --output-file option.
The following example command will re-arrange FLAC files found in the current
directory, making a new directory structure under /media/newmusic
containing hard links to the current files:
riparrange -h -f "/media/newmusic/%Y/%B - %D/%N-%T.flac" *.flac
Find and xargs can be used to call riparrange for files in
different directories:
find /media/music/ -name "*.flac" -print0 |
xargs -0 riparrange -h -f "/media/newmusic/%Y/%B - %D/%N-%T.flac" *.flac
Licence
RipRight and RipArrange are released under the GNU GPLv2.
Bugs
Bugs, patches, and suggestions can either be emailed directly to
me.
Since this is hobby project it can take a long time for me to respond, but I try
to review every patch and respond to all emails.
References
This page is maintained by
Michael McTernan