RipIt version 3.7.0-beta20080722 22/07/08 Maintained by Felix Suwald Web Site: http://www.suwald.com/ripit/ripit.html What Is It? ----------- RipIT is used to create MPEG-1 Layer 3 (mp3), Ogg Vorbis (ogg), Flac, Faac and/or Wav (wav) audio files from an audio CD. It is a front-end, written in perl, for these excellent programs: * "cdparanoia", "dagrab" etc. for ripping the audio CD tracks * "Lame", "OggVorbis" "Flac" or "Faac" for encoding the wav files to "mp3", "ogg", "flac" or "m4a" ("aac"). * "CDDB_get" for retrieval of CD information. It runs in text mode (no fancy GUI here) and does everything required to produce a set of mp3/ogg/flac/m4a files without any user-intervention. This program does the following with an audio CD: * Get the audio CD album/artist/track information from CDDB * Rip the audio CD (using cdparanoia or other cdrippers) * Encode the files (using lame, oggenc, flac and/or faac) * ID3 tag them (v1 & v2) * Extracts possible hidden tracks * Optional: creates a playlist (M3U) file * Optional: prepares and sends a CDDB submission * Optional: saves the CDDB file * Optional: creates a toc (cue) file to burn a CD in DAO with text * Optional: anaylze the wavs for gaps and splits them into chunks * Optional: merges wavs for gapless encoding * Optional: creates a md5sum for each type of sound files * Optional: normalizes the wavs before encoding. Different encoding formats or the same format at different qualities can be used at the same time and encoded into different directories. Installation ------------ To install RipIT correctly (with man-page, config file and the ability to call the script by typing ripit only), the single line (as root) make install will perform the installation. Additionally a rpm-package is available, and a deb-package should also be ready. But the following software must be installed to use RipIT: * Perl: perl v5 - will most probably already be installed * A ripper to extract the wavs from the CD: cdda2wav - will most probably already be installed, or cdparanoia - will most probably already be installed, or dagrab v0.3.5 - http://web.tiscalinet.it/marcellou/dagrab.html or tosha or cdd * An encoder to create compressed sound files out of the wavs: lame v3.89 or later - http://lame.sourceforge.net/ to create mp3, or oggenc (from OggVorbis) - http://vorbis.com to create ogg, and/or flac - http://flac.sourceforge.net/index.html and/or faac - http://www.audiocoding.com to create m4a (aac). * CD-Data-Bank software to retrieve CD information: CDDB_get perl module v2.27 or later - http://armin.emx.at/cddb/ To install: -) login as root and connect to the internet, then type -) perl -MCPAN -e 'install CDDB_get' Calling RipIT ------------- Depending on the installation, type ripit or ./ripit.pl in the directory where ripit.pl resides. Configuring RipIT ----------------- A config file is located in $HOME/.ripit or /etc/ripit. It can be edited using options --savenew or --save, or preferably with an editor instead of passing all parameters on the command-line. Of course, being a perl programer, one can easily configure anything in the program. Please inform the maintainer if some improvements have been made! My e-mail address is given at the bottom of this file. Setting the Templates --------------------- The dirtemplate and tracktemplate contain the format of the directory and filename for the output directory and tracks. These variables are later evaluated by RipIT, so one can put any legal characters in here (even / for multi-level directories) and one of the following variables: $album - CD album name $artist - CD artist name $genre - CDDB genre or the genre passed from command line $iletter - initial letter of artist name $quality - encoder options (not the arguments of option --quality) $sufix - the sufix of the encoded file, i.e. mp3, ogg, flac or aac $tracknum - number of the current track $trackname - name of the current track $year - CDDB year or the year passed from command line. The '" and "' are mandatory and must surround the template. Example tracktemplate: --tracktemplate='"$tracknum - $trackname"' would produce: 07 The Game, the default setting. Example dirtemplate: --dirtemplate='"/$iletter/$artist $genre/$year - $album"' would produce a "3-level" directorytree: .../S/Swandive Trip-Hop/1997 - Intuition/ The default is: '"$artist - $album"' The dirtemplate-option is now an array and may be stated more than once in the same order as the encoders passed to option --coder, i. e. for each encoder one can give one dirtemplate. If less dirtemplates than encoders are stated, the last dirtemplate will be used for subsequent encoders and the wav-directory. Using RipIt ----------- Insert an audio CD and type "ripit" or "./ripit.pl" as mentioned above. The program will then merrily go away and rip/encode the whole audio CD unless it encounters a problem. First the album/artist/track/genre/year/category(CDDB) information is retrieved from a CDDB via the internet. If not connected to the internet or no CDDB entry is found, one will be prompted to choose either if the tracks shall be ripped with default names or manually entered names, except if the option --nointeraction was passed. Note that in case the box is offline, the respond of the CDDB_get perl-module may take some time, be patient. With the option --archive, RipIT also checks for local CDDB entries on the machine in the $HOME/.cddb directory. Then one will be asked to make a CDDB submission or correct an existing data-set. In the second case, one can confirm the CDDB settings with Enter. Submission to freedb-submit@freedb.org is gruanted, if at least one single entry is changed and if sendmail works. In this way it is very easy to correct a simple typo somewhere in the DB-entry. If one told RipIT not to be connected to the internet (using option --nosubmission), the file cddb.toc will be saved in the $HOME-directory, and can later be submitted. But even with option --nosubmission RipIT will try to do a CDDB lookup, and if it finds something, one only has to edit the entry, i. e. this option only prevents to send the file directly and overwrite the public entry! Be aware that the subject of the e-mail must be exactly as displayed by RipIT. The sound files will be put into a directory with the format according to the directory template(s), default setting is: $outputdir/$artist - $album/ with the track name consisting of the track number and songname (or whatever is specified in the track template). The sound files will automatically be (id3-) tagged. The tagging is performed by the encoders, Lame uses both id3v1 & id3v2. The following options are available: ripit [--device|d cd-device] [--outputdir|o path] [--ripper|r cdripper] [--dpermission number] [--fpermission number] [--nicerip number] [--ripopt ripper-options] [--rip] [--disable-paranoia|Z] [--wav|w] [--ghost|G] [--extend seconds] [--prepend seconds] [--encode] [--coder|c encoders] [--faacopt options] [--flacopt options] [--lameopt options] [--quality qualities-list] [--bitrate|b rate] [--maxrate|B rate] [--vbrmode|v old or new] [--preset|S mode] [--oggencopt options] [--comment id3-comment] [--genre|g genre-tag] [--utftag|U] [--year|y year-tag] [--lowercase|l] [--underscore|u] [--dirtemplate '\"\$parameters\"'] [--tracktemplate '\"\$parameters\"'] [--cddbserver|C server] [--mirror|m mirror] [--protocol|L level] [--proxy|P path] [--transfer|t cddb or http] [--mail|M address] [--submission|s] [--interaction|i] [--nice|n adjustment] [--halt] [--eject|e] [--ejectcmd command] [--ejectopt options for command] [--help|h] [--lcd] [--lcdhost host] [--lcdport port] [--config] [--save] [--savenew] [--sshlist remote hosts] [--local] [--scp] [--archive|a] [--playlist|p number] [--infolog path] [--md5sum] [--cdtoc number] [--loop] [--verbose|x number] [--chars|W [list]] [--normalize|N] [--normopt|z options] [--version|V] [--resume|R] [--merge list] [--threads numbers] [track_selection] [track_selection] - Tracks to rip from. If not specified all tracks will be ripped. One can also specify a single track by using a single number, or a selection of tracks using numbers separated by commas or hyphens, i.e. 2,6,10, or 3,5,7-9 . Using a number followed by a comma or hyphen will rip from that track to the end of the CD i.e. 3,5- rips track 3 and from track 5 to the last one. Default: not set --merge ordered list of comma separated intervals Place a hyphen or a + between first and last tracknumber to be merged. Separate several intervals with a comma. Default: not set --outputdir directory - Where the sound should go. If not set, $HOME will be used. Default: not set. --dpermission number - Define directory permissions, default: 0755. --fpermission number - Define permissions of sound and log files, default: not set, i.e. depending on the system settings, usually 0644. --device cddevice - Path of audio CD device, default: /dev/cdrom. --ripper ripper - CDripper to use, 0 - dagrab, 1 - cdparanoia, 2 - cdda2wav, 3 - tosha, 4 - cdd, default: 1. --ripopt options - Options for audio CD ripper. --disable-paranoia - When using dagrab, the number of retries will be set to 3, with cdparanoia this option is equal to the -Z option. Usefull for faster ripping, not recommended. Default: off. --ghost - Analyze wav and split into possible chunks of sound or try to trim lead-in/out. This may overrided option merge. Default: off. --extend seconds - Enlarge splitted chunk by number of seconds if possible, or track may be trimmed if value is small (e.g. 0.2), use with caution! Default 2.0. --prepend seconds - Enlarge splitted chunk by number of seconds if possible, or track may be trimmed if value is small (e.g. 0.2), use with caution! Default 2.0. --coder encoder - Encoder to use, 0 - Lame, 1 - Oggenc, 2 - Flac, 3 - Faac, comma separated list! E.g. --coder 2,0,1 --quality 3,4,5 will set Flac-quality to 3, Lame-quality to 4 and Oggenc- quality to 5. --lameopt options - Pass other options to the encoder, quote them with double quotes if needed; semicolon seperat- ed list if same enocder is used more than once. Default: not set. --oggencopt options - More user defined options for Oggenc, see above. --flacopt options - More user defined options for Flac, see above. --faacopt options - More user defined options for Faac, see above. --quality quality - Comma separated list in the same order than the list of encoders passed! Quality for oggenc (1-10) highest = 10; or compression level for Flac (0-8), lowest compression = 0; or quality for Lame in vbr mode (0-9), best quality = 0. The qualitiy can be turned off with the argument "off" not to interfer with different specific encoder options. Default: 5,3,5,100. --vbrmode mode - Variable bitrate, only used with Lame, mode is new or old, see Lame manpage. The Lame-option quality will be changed to -V instead of -q if vbr-mode is used; default: not set. --bitrate rate - Encode mp3 at this bitrate for Lame. If option --vbrmode used, bitrate is equal to the -b option, so one might want to set it off, default 128. --maxrate rate - maxrate (Bitrate) for Lame using --vbrmode is equal to the -B option for Lame or the -M option for Oggenc, default: 0. --preset mode - Use the preset switch when encoding with Lame. With otpion --vbrmode new --preset fast will be used. Default: off. --chars [list] - Exclude characters in filenames and directories but not in tags. The argument is optional. Following characters will be erased, if no argument stated: \:*?$ plus begining and ending blanks and periods. This is identical to argument "NTFS". Passing "HFS" as arguement will result in deleting colons plus begining blanks and periods. Or use any list of chracters one wants to purge. Note that on the command line they probably need to be escaped. Use argument "off" to switch option off. Default off. if your configuration supports it. --comment comment - Specify a comment (mp3, m4a), or a description tag (ogg, flac). Default: not set. --genre genre - Specify (and override CDDB) genre, must be a valid ID3-genre name if using Lame, can (but shouldn't) be anything if using other encoders. Default: not set. --year year - Specify (and override CDDB) year (mp3, m4a) or a date tag (ogg, flac). Default: not set. --dirtemplate '" foo $parameters "' - Use single and double quotes to pass the templates! Allowed are following parameters: $album, $artist, $genre, $iletter, $quality, $sufix, $trackname, $tracknum and $year, e.g. '"/$sufix/$iletter/$artist - $year"' (default dirtemplate: '"$artist - $album"'), (default tracktemplate: '"$tracknum $trackname"'). More than one --dirtemplate allowed, depending on the numbers of encoders. --tracktemplate '" foo $parameters "' --sshlist list - Comma separated list of remote machines where RipIT should encode. The output path must be the same for all machines. Specify the login (login@machine) only if not the same for the remote machine. Else just state the machine names. See EXAMPLES-section of manpage for more information. Default: not set. --scp - If fs can not be mounted on (remote) machine(s), use scp to copy wavs to remote machines. Not redommended. Default: not set. --local - Only used with option --sshlist; if all encodings shall be done on remote machines, use --nolocal, default: on. --cddb server - CDDB server, either freedb.org, freedb2.org or musicbrainz.org. Default freedb.org. Note, the full address is mirror.freedb.org, i. e. default is freedb.freedb.org. Exception: freedb2.org and musicbrainz.org have no mirrors, their full addresses are: freedb2.org and freedb.musicbrainz.org on port 80 (see transfer mode). --mirror mirror - Choose "freedb" or one of the freedb.org mirrors, default: freedb. For more information check the webpage www.freedb.org. There is no list of mirrors available these days. This option might be obsolet as freedb uses random servers, but the default setting is mandatory. --transfer mode - Transfer mode, cddb or http, will set default port to 8880 or 80 (for http), default: cddb. Note: use http mode with CDDB servers freedb2.org or musicbrainz.org. --protocol level - The CDDB protocol level for CDDB query. Level 6 supports UTF-8 and level 5 not. Default: 6 --proxy address - The http proxy to use when accessing the cddb server. The CDDB protocol must be http! Default: not set. --nice value - Set niceness of encoding process, default 0. --nicerip value - Set niceness of ripping process, default 0. --archive - Read and save CDDB files in the directory $HOME/.cddb/"category". Default: off. --eject - Ejects the CD when finished, default off. --ejectcmd command - The command to use for ejecting CD (see --eject) Default: eject. --ejectopt options - Arguments to the ejecting CD command (see --ejectcmd), default: path of CD device. --halt - Powers off the machine when finished if the configuration supports it. --submission - Specify --nosubmission if the machine is offline and the created file cddb.toc shall be saved in $HOME instead of being submitted. With option --archive the data will also be saved in the $HOME/.cddb directory. --mail address - Users return e-mail address, needed to submit a CDDB entry. Default: not set. --playlist number - Create the m3u playlist file, or use --playlist 0. For filenames without paths use --playlist 2. Default: 1 - on. --interaction - Specify --nointeraction if ripit shall take the first CDDB entry found and rip without any questioning, default: on. --lcd - Use lcdproc to display status, default: not set. --lcdhost host - Set host address for lcdproc, default: localhost. --lcdport port - Set port address for lcdproc, default 13666. --infolog path/file - Log operations (system calls, file/directory creation) to file, given with full path; default: not set. --lowercase - Lowercase filenames, default: off. --underscore - Use _ instead of spaces in filenames, default: off. --utftag - If negated decodes Lame-tags to ISO8859-1. Default off. --rip - Prevent ripping (if wavs present) with --norip. Used for debugging. Default: on. --encode - Prevent encoding (generate only wavs) with --noencode. Default: on. --wav - Keep the wav files, default: off. --normalize - Normalize the wav files, default: off. --normopt options - Options passed to normalize, default: -b. Option v (q) will be set according to verbosity. --cdtoc number - Create a cd.toc for CDRDAO (1 yes, 0 no), default: 0 - off. --help - Print a short manpage, default: not set. --version - Print version and exit, default: not set. --verbose number - Verbosity: Run silent (0), with minimal (1), normal without encoder msgs (2), normal (3), verbose (4) or extremly verbose (5). Default 3 --config - Read the config file or use --noconfig, default on. --save - Add parameters passed on command line to config file. An existing config file will be saved in config.old! Default: not set. --savenew - Save only parameters passed on command line to a new config file. An existing config file will be saved in config.old! Default: not set. --loop - Continue ripping and encoding as soon as a new CD is inserted. This option implies that the CD is ejected when done. --resume - Resume a previously started session. Default: not set. --md5sum - Create a MD5-sum file for each type of sound files. Default: not set. --threads number - Comma separated list of numbers giving maximum of allowed encoders to run at the same time. First number for the local machine. Default: 1. Program Notes ------------- Most of the output to the screen is produced by the cdripper program. The encoder output goes to a log-file, since it's important not to clutter the cdripper output. After each track ripped, the encoder messages will be displayed, depending on verbosity. The output can be switched off with option --verbose 0. For questions about the LCDproc feature, please contact max.kaesbauer [at] gmail [dot] com. The encoding is started as a separate thread from the rest of the program so that the encoder works in the background as the cdripper is working. This is not the case if normalize is used. Historical Original Author's Comment ------------------------------------ This is my first bit of perl code and I've only spent a few days writing it so I hope you won't be too critical. I wish I had got around to learning perl much earlier as it is a very powerful but easy to use language. I would be grateful for any suggestions on how to improve the code or write better perl. Why did I write this when there are so many other CD ripper front ends? There are some very good Linux programs out there that all do similar things but none of them did exactly what I wanted, which spurred me into writing this and at the same time learn perl. Cheers Simon Quinn, Lancashire, UK Other maintainers ----------------- Mads Martin Jørgensen, Odense, Denmark Historical Felix Suwald's Comment --------------------------------- The main changes when I started with the 300 line code, were: 1) one can use hyphens (-) in track selection. I missed it, because I often have audio CDs with a data (video) track in the end, so I wanted to avoid failure at ripping that last one! Now, one can enter 1-10 instead of 1,2,3,4,5,6,7,8,9,10. You even may mix commas and hyphens: 1,3-5,9- . 2) As mentioned in "Using RipIt", I excpected ripit to do the job if the box is off-line, but it did not work with me... now it should work! 3) As mentioned in "Using RipIt", I also excpected ripit to do the job if no parameters are given. This did not work, but should work now! 4) I wanted to submit new CDDB entries to freedb.org. After using RipIT I did not want to re-enter the data in grip, kscd or whatever. Now it should work with RipIT. If your submission is not OK, it will be returned to the e-mail address you entered. Edit it and resubmit it. 5) I never could remember the genre numbers for id3v2 tags. Now you can enter (a part of) the genre name, and if there are several possibilities, then you will be prompted to choose the one you want. See HISTORY-file for a more detailed change-log. Thanks to all testers and those who send me feedback or feature requests. Please specify a subject more concise than "RipIT" when sending a mail, thanks! Cheers Felix Suwald, Zürich, Switzerland Please send bugs/comments/wishes to: ripit[_æt_]suwald[_ðöt_]com with a explanatory subject (not only "RipIT").