Rubyripper is a secure digital audio extraction application ("cd ripper") for Unix-like operating systems. It uses cdparanoia error correcting power and its own secure ripping algorithm to make sure that a CD rip is done successfully and accurately. It is very similar to and inspired by EAC. Rubyripper is written in the ruby programming language.
It's currently available for GNU/Linux, BSD should work but is untested. Mac OS/X is supported for the CLI version. For GNU/Linux systems it may be the most mature native secure ripping application available. The source (same as executable) is published as Free Software under the terms of the GPL version 3.
- 1 Features
- 2 Installation
- 3 Screenshots
- 4 Known bugs & new features
- 5 Development API
- 6 Becoming a Rubyripper developer
- 7 Data files and class structures
- 8 Adding a new frontend
- 9 External links
- Sophisticated error correction mechanism
- Direct read offset support
- Detection of pregaps
- Detection of pre-emphasis
- Create disc images with cue sheets
- Create m3u playlists
- A GTK2 user interface
- A command line interface (CLI)
- Metadata (CDDB-info) is fetched via the cd-discid module. Data can be edited after fetching
- The codecs supported are FLAC, Vorbis, MP3, WAV, and arbitrary command line encoders
- Multiple codecs can be used in one run
- Detailed logfile creation
- A detailed overview of hard-to-correct positions
Error correction mechanism
Rubyripper correction mechanism goes beyond that of cdparanoia. Every track gets ripped at least twice and is byte compared with the
Ruby cmp feature. If any differences are found, each of the 1,000 bytes of the two files is compared. The next trial run looks to see if differing positions or a match can be found. (1,000 bytes is about 0.006 seconds). The main underlying Philosophy is that an erroneous read of an underlying ripper will produce random results. This seems so far to be correct. A possibility still exists that with random results the same result will be wrong.
In theory if the full 1,000 bytes are erroneous, then a false repair seems to be highly unlikely since there are combinations. (As a byte consists of 8 bits, ). The main principle however is, the more trials that are needed, the higher the chance of a false repair. Suppose only 3 bytes in a sample of 1,000 bytes give random information. This would still mean possibilities for these bytes; really 2 bits in each byte could be a problem. This reduces the possibilities to . A correct repair at this point may be possible. One has to wonder though: can 3 bytes actually be heard in a wav file that produces 180.000 bytes per second?
In conclusion: Rubyripper won't guarantee a consequent MD5 checksum hash on tracks that needed correction. However it will repair any files so that it's impossible to successfully blind-test with the original via an ABX test for example. The log file will optionally report any position that needed more than 3 trials, so you can check the position yourself.
General Installation from Source
Make sure to have
cd-discid, ruby-libglade2, libglade2-ruby and cdparanoia installed as a minimum. You can optionally choose for Lame, Vorbis or FLAC, and others via command-line configurations depending upon which codecs you want to encode with i.e Wavpack or Nero AAC (See the official Ubuntu forums for more information).
Then download Rubyripper: http://code.google.com/p/rubyripper/downloads/list
See the README file for installation instructions or just type:
$sudo make install
If Rubyripper doesn't start make sure the dependencies are ok. When launched from the terminal window Rubyripper should tell you which dependency it's missing.
- If you are using Ubuntu 9.10 (Karmic Koala) and below it's important to update all of the necessary dependencies that are required for Rubyripper if you are building from the source! i.e Vorbis-tools package 1.4.0 (as of March 2010) or LAME 3.98 and above. Newer versions are not included via synaptic or in repository channels for Jaunty or Karmic and need to be built manually by downloading from appropriate websites and following the README files within the tarballs. One other solution to fixing this problem is changing the software repository channels from which you are downloading (See the official Ubuntu forums for more information).
Automatic Installation on Ubuntu/Debian
GetDeb has recent versions of Rubyripper packaged for Ubuntu systems. After teaching your system to use the GetDeb software repositories you can conveniently install using your favourite package manager frontend. Read their instructions on how to easily install their package repositories.
You can alternatively use the Debian "Sid Marrilat" repositories.
- Rubyripper 32-bit and 64-bit The latest releases for i386 and x86_64 architecturess.
Automatic Installation on Fedora/Red Hat
Starting with Fedora 15 Rawhide packages Rubyripper 0.6.0 comes packaged under "Add/Remove Software". In order to look for it search for 'rubyripper'. Once it is found you then have the option of installing the GTK+ GUI or CLI interface optionally (depending upon your personal preferences). After you have selected either interface and click apply it will then find all of the necessary dependencies for you i.e some ruby packages, vorbisgain, libvorbis, etc if they are not installed and will reconfigure your packages and install them one by one. Rubyripper should now be installed under
Applications -> Sound & Video on your main menu.
Manual Installation on Ubuntu/Debian
It is strongly recommended you use Ubuntu 10.04 (Lucid Lynx) or greater when compiling from the source!
These instructions were tested with Ubuntu 9.04 ("Jaunty Jackalope“), Gnome 2.26.1, and Rubyripper 0.5.7.
- Make sure Rubyripper has these dependencies as a bare mininum. They can be installed by typing in the terminal window:
$ sudo apt-get install cd-discid cdparanoia
as a bare mininum or
$ sudo apt-get install cd-discid cdparanoia flac lame mp3gain normalize-audio ruby-gnome2 ruby vorbisgain
to get the most out of the currently available distros.
For internationalization: instead of the mentioned
- Download the Rubyripper archive (see above) from the official website.
- Extract the files in the Rubyripper archive (bzipped tarball) into a temporary directory.
- Navigate to the directory in which you extracted the Rubyripper archive (Most likely which will be your desktop) or the directory in which you extracted the archive in, e. g. by typing in terminal window:
$ cd /home/USERNAME/Desktop/rubyripper-0.x.x/
- Rubyripper needs to know what features need to be installed. Install both the GUI and command-line version for to get the most out of the application by typing in the terminal window:
$ ./configure --enable-lang-all --enable-gtk2 --enable-cli
Note: This only prepares/configures installation.
- In order to install the application, type in the terminal window:
$ sudo make install
- Rubyripper should now be installed with your applications under
Applications -> Sound & Video
- If it runs according to your needs you may remove the temporary directory.
- If you have CD-ROM drive problems it is recommended you read this thread
- You can add or drop dependencies as you see fit depending upon what packages you need or already have
- Substitute 'x' above with the latest version of Rubyripper
- You can run the command-line version of Rubyripper be navigating to the source directory and typing in
./rubyripper_cli.rbinto the terminal (This is useful if you want to use it conjunction with shell scripts like BASH and KSH to automate the ripping process for instance)
To point to the correct cdrom drive, you will need to specify both the Cdrom device & Cdrom offset.
- Cd rom device
- To print a list of installed drives:
$ cd-drive | grep Drive
- Cd rom offset
- Click the List with offsets link to lookup the required Correction Offset
- To print a list of installed drives:
$ cd-drive | grep Model
[user@name ~]$ cd-drive | grep Drive Drivers available... Drive: /dev/cdrom Drive: /dev/sr1 [user@name ~]$ cd-drive | grep Model Model : DVDRW LH-20A1L Model : iHAS324 W
Retrieved from the website 3/31/2014:
|CD Drive||Correction Offset||Submitted By||Percentage Agree|
|LITE-ON - DVDRW LH-20A1L||+6||706||100%|
|ATAPI - iHAS324 W||+48||19||100%|
Cdrom device: /dev/cdrom
Cdrom offset: 6
Cdrom device: /dev/sr1
Cdrom offset: 48
These screenshots are taken with the 0.5.5 release:
Known bugs & new features
Add an issue in the bugtracker to discuss any new feature requests:
This section will give some technical information, which should be useful for interested developers. It will outline how the code is structured and what the API of Rubyripper codebase is for adding new user interfaces. Since version 0.2 it is quite simple to add new frontends to the current codebase. Currently there are CLI and GTK2 frontends. A Qt frontend or a Cocoa Mac OS frontend, should not be terribly difficult to implement. The developer won't implement this himself though, due to the fact that he is more interested in fine tuning the Rubyripper logic codebase.
Becoming a Rubyripper developer
To become a developer you should have:
- Some basic knowledge of the Ruby programming language. Read for instance the free online book, at least until the chapter "Until Trouble Strikes". This is a somewhat dated version, but still perfectly usable. The lead developer doesn't use any new features, therefore it should be fine.
- Some basic knowledge of a GUI-toolkit in case you want to add a new frontend.
SVN Checkout now possible.
$svn checkout http://rubyripper.googlecode.com/svn/trunk/ rubyripper to get the latest source code.
If you're interested in becoming a developer, please contact him at rubyripperdev@firstname.lastname@example.org. You can leave out the @nospam part.
Data files and class structures
The 0.5 release has three ruby files and one glade file included:
rr_lib.rb.This contains the Rubyripper codebase. It consists of five classes:
Gui_Support.This class handles all feedback communication with the user interface and is used a lot by the other classes (except Cddb). This is were log file is generated and the error analysis takes place.
Cddb.This class handles the freedb fetching. It uses the Freedb class (dependent on ruby-freedb) to get info about the disc. The server contact is handled in the Cddb class itself. Some problems of the Freedb class made it impossible to rely on it. The biggest problem with using Freedb class is that, it's using an old contact protocol and never gives away any information on the current year. This is the main reason why the Cddb class handles all server contact.
Secure_rip.As might be expected, all error correction logic is put in here.
Encode.As might be expected, this handles the encoding of the different formats supported.
Rubyripper.Handles the usage of the different classes. It also performs some logical checks before starting at all.
rubyripper_cli.rb.It has one class that contains the code for the command line interface frontend.
rubyripper_gtk.rb.MIt has one class that contains the code for the GTK2 user interface frontend.
rubyripper.glade.This is a help file for the GTK interface. It's made with Glade, a program for designing user interfaces for GTK2.
Adding a new frontend
New frontends are encouraged and aren't difficult to make, once you know your GUI toolkit. Take for instance, the current GTK2 frontend, which consists of only 350 lines of code (+ the glade file, but this code is automatically created)'. From a starting point it would be best to use the current GTK2 or CLI code and just plainly rewrite it for the other toolkit. The basic ideas should be more or less the same.
The basic idea is that the GUI first presents the info of a Cddb instance. When the user wants to start, a new Rubyripper instance is started with all the settings in a Hash as a parameter. You can copy most of the code from the other user interfaces. The user interface should also have an update function. The update function is used as a communication channel for the Rubyripper instance.
- Using a new thread for launching instances is an effective way of getting a responsive GUI.
- Rubyripper The next best repository since Google Code closed down
- Hydrogenaudio forum thread the first public release of Rubyripper
- Sid Marillat unstable 32 and 64-bit compiles of Rubyripper for Debian multimedia packages.
- Ubuntu Forums a thread that's consistently updated for installing Rubyripper in Ubuntu including troubleshooting.