Python CD-DA ripper preferring accuracy over speed
Python CD-DA ripper preferring accuracy over speed
Whipper is a Python 3 (3.6+) CD-DA ripper based on the morituri project (CDDA ripper for *nix systems aiming for accuracy over speed). It started just as a fork of morituri - which development seems to have halted - merging old ignored pull requests, improving it with bugfixes and new features. Nowadays whipper's codebase diverges significantly from morituri's one.
Whipper is currently developed and tested only on Linux distributions but may work fine on other *nix OSes too.
In order to track whipper's latest changes it's advised to check its commit history (README and CHANGELOG files may not be comprehensive).
For a detailed description, see morituri's wiki page: The Art of the Rip.
See CHANGELOG.md.
For detailed information, please check the commit history.
Whipper still isn't available as an official package in every Linux distributions so, in order to use it, it may be necessary to build it from its source code.
You can easily install whipper without needing to care about the required dependencies by making use of the automatically built images hosted on Docker Hub:
docker pull whipperteam/whipper
Please note that, right now, Docker Hub only builds whipper images for the amd64 architecture: if you intend to use them on a different one, you'll need to build the images locally (as explained below).
Building the Docker image locally is required in order to make it work on Arch Linux (and its derivatives) because of a group permission issue (for more details see issue #499).
To build the Docker image locally just issue the following command (it relies on the Dockerfile included in whipper's repository):
optical_gid=$(getent group optical | cut -d: -f3) uid=$(id -u) docker build --build-arg optical_gid --build-arg uid -t whipperteam/whipper .
It's recommended to create an alias for a convenient usage:
alias whipper="docker run -ti --rm --device=/dev/cdrom \
--mount type=bind,source=${HOME}/.config/whipper,target=/home/worker/.config/whipper \
--mount type=bind,source=${PWD}/output,target=/output \
whipperteam/whipper"You should put this e.g. into your .bash_aliases. Also keep in mind to replace the path definitions to something that fits to your needs (e.g. replace … -v ${PWD}/output:/output … with … -v ${HOME}/ripped:/output \ …).
Essentially, what this does is to map the /home/worker/.config/whipper and ${PWD}/output (or whatever other directory you specified) on your host system to locations inside the Docker container where the files can be written and read. These directories need to exist on your system before you can run the container:
mkdir -p "${HOME}/.config/whipper" "${PWD}/output"
Please note that the example alias written above only provides access to a single disc drive: if you've got many you will need to customise it in order to use all of them in whipper's Docker container.
Finally, you can test the correct installation as such:
whipper -v
whipper drive listThis is a noncomprehensive summary which shows whipper's packaging status (unofficial repositories are probably not included): NOTE: if installing whipper from an unofficial repository please keep in mind it is your responsibility to verify that the provided content is safe to use.
If you are building from a source tarball or checkout, you can choose to use whipper installed or uninstalled but first install all the required dependencies.
Whipper relies on the following packages in order to run correctly and provide all the supported features:
cd-paranoia versions ≥ 10.2+0.94+2libcdio-utils, available on older Debian and Ubuntu versions, is affected by a bug: it doesn't include the cd-paranoia binary (needed by whipper). Starting with Debian bullseye (11) and Ubuntu focal (20.04), a separatecd-paranoia package is available which provides the aforementioned binary. For more details on this issue, please check the relevant bug reports: #888053 (Debian), #889803 (Debian) and #1750264 (Ubuntu).pycdio version with the corresponding libcdio release or, if stuck on old pycdio versions, 0.20/0.21 with libcdio ≥ 0.90 ≤ 0.94. All other combinations won't probably work.Some dependencies aren't available in the PyPI. They can be probably installed using your distribution's package manager:
PyPI installable dependencies are listed in the requirements.txt file and can be installed issuing the following command:
pip3 install -r requirements.txt
embed and complete option values won't work otherwise).These dependencies are not listed in the requirements.txt. To install them, just issue the following command:
pip3 install Pillow docutils
Change to a directory where you want to put whipper source code (for example, $HOME/dev/ext or $HOME/prefix/src)
git clone https://github.com/whipper-team/whipper.git
cd whipperInstall whipper: python3 setup.py install
Note that, depending on the chosen installation path, this command may require elevated rights.
To build the man pages, follow the instructions in the relevant README which is located in the man subfolder.
Whipper currently only has a command-line interface called whipper which is self-documenting: whipper -h gives you the basic instructions.
Whipper implements a tree of commands: for example, the top-level whipper command has a number of sub-commands.
Positioning of arguments is important:
whipper cd -d (device) rip
is correct, while
whipper cd rip -d (device)
is not, because the -d argument applies to the cd command.
A more complete set of usage instructions can be found in the whipper man pages.
The simplest way to get started making accurate rips is:
Pick a relatively popular CD that has a good chance of being in the AccurateRip database
Analyze the drive's caching behavior
whipper drive analyze
Find the drive's offset.
Consult the AccurateRip's CD Drive Offset database for your drive. Drive information can be retrieved with whipper drive list.
whipper offset find -o insert-numeric-value-here
If you omit the -o argument, whipper will try a long, popularity-sorted list of drive offsets.
Please note that whipper's offset find feature is quite primitive so it may not always achieve its task: in this case using the value listed in AccurateRip's CD Drive Offset database should be enough.
If you can not confirm your drive offset value but wish to set a default regardless, set read_offset = insert-numeric-value-here in whipper.conf.
Offsets confirmed with whipper offset find are automatically written to the configuration file.
If specifying the offset manually, please note that: if positive it must be written as a number without sign (ex: +102 -> 102), if negative it must include the sign too (ex: -102 -> -102).
Rip the disc by running
whipper cd rip
The configuration file is stored in $XDG_CONFIG_HOME/whipper/whipper.conf, or $HOME/.config/whipper/whipper.conf if $XDG_CONFIG_HOME is undefined.
See [XDG Base Directory Specific
No open issues yet, or sync has not completed.