RIPIT(1)

NAME:

ripit - Perl script to create flac, ogg, mp3, m4a (aac), als (mp4), mpc, wv or other files from an audio CD.

SYNOPSIS:

ripit [options]

DESCRIPTION:

This Perl script makes it a lot easier to create compressed sound files from an audio CD. RipIT supports Flac, Lame, Oggenc, Faac, mp4als, Musepack, Wavpack and ffmpeg. Artist and song titles are retrieved either with the CDDB_get.pm from freedb.org or using WebService::MusicBrainz.pm from MusicBrainz.org.

It is possible to submit and edit CDDB entries at freedb.org, submission of MusicBrainz data need a login. Hidden tracks and ghost songs are detected and split into chunks of sound, a toc, cue or inf files permit to burn the WAV files with text and no gaps in DAO mode. Several encoder formats and qualities can be used in the same run (even the same encoder) and encoded into different directories. Distributed ripping and launch of more than one encoder process in the same time is possible.

Several manipulations on tags are supported, e.g. adding coverart, detection of Various Artists style at different levels or album gain; external commands can be launched before and after ripping / encoding is done with all CDDB information, e.g. to ensure presence of coverart, calculation of md5sums and playlistfiles can be done.

VERSION:

RipIT Version 3.9.0

OPTIONS:

[track_selection]
    Tracks to rip from. If not specified, all tracks will be ripped. Specify a single track by using a single number, or a selection of tracks using numbers separated by commas or hyphens, e. g. 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 plus (+) between first and last track number to be merged. Omitting the last number will merge all subsequent tracks. Separate several intervals with commas. Default: not set.

-I, --span start-endtime
    Define an interval to be ripped when using cdda2wav or cdparanoia. The hyphen is mandatory. The format of start and end-time is according to cdparanoia hh:mm:ss.ff in hours/minutes/seconds/frames, but precision is set to seconds, i. e. frames will be ignored. Zero fields need not be specified and the value of seconds may be larger than 60. When using cdda2wav this option translates the values to the -o and -d options of cdda2wav. When using option merge, endtime is related to the last track in the selection. Default: not set.

-o, --outputdir dir
    Where the sound should go. If not set, $HOME will be used. Default: not set.

-d, --device cddevice
    Path of audio CD device, default: /dev/cdrom.

--scsidevice cddevice
    Device name for special devices if the non ripping commands (except eject commands) shall be executed on a different device node. This might be useful for some old SCSI devices. If not set the cddevice of option --device will be used. Default: not set

-r, --ripper number
    CD ripper to use, 0 - dagrab, 1 - cdparanoia, 2 - cdda2wav, 3 - tosha, 4 - cdd. Because cdparanoia and dagrab are the only rippers in this list that immediately fail on data tracks, RipIT can create an error.log if problems are encountered and continues to rip and encode without endless looping! Please use dagrab or cdparanoia, otherwise RipIT might hang while waiting for data tracks. Default: 1 - cdparanoia.

--ripopt options
    User definable options for specific ripper. Quote them if necessary. Default: not set.

--nicerip number
    Set niceness of ripping process, default: 0.

-Z, --disable-paranoia [number]
    When using dagrab, the number of retries will be set to 3, with cdparanoia this option is equal to the -Z option of cdparanoia. The number can be set to 0 (paranoia on), to 1 (paranoia off) or to 2 to switch paranoia off if a track fails or gets a timeout. RipIT will retry that failed track without paranoia or give up. Ripping will then continue with paranoia on. Default: 0 - off, i. e. use paranoia mode.

--ghost
    Analyze each wav for gaps and split it into chunks if gaps are detected and/or try to trim lead-in/out. This may override option merge. Delete blank tracks if only silence ("zero bytes") are found. Experimental! Default: off.

--extend seconds
    When using option --ghost and only if a chunk of sound is detected, enlarge chunk by amount of seconds at end if possible, or track may be trimmed if value is small (e.g. 0.3), use with caution. Default: 2.0.

--prepend seconds
    When using option --ghost and only if a chunk of sound is detected, enlarge chunk by amount of seconds at beginning, if possible, or track may be trimmed if value is small (e.g. 0.3), use with caution. Default: 2.0.

-c, --coder number
    Encoder(s) to use, 0 - Lame (for mp3), 1 - Oggenc, 2 - Flac, 3 - Faac, 4 - mp4als, 5 - Musepack, 6 - Wavpack, 7 - ffmpeg, a comma separated list, or as an array. The same encoder may be stated more than once, but different output-directories must be specified stating the --ditemplate for each encoder or using the $quality parameter in option --dirtemplate or --tracktemplate. See below. Default: 0.

--faacopt Faac-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--flacopt Flac-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--lameopt Lame-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--museopt Musepack-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--musenc Musepack-encoder
    Choose Musepack encoder to be used, either mpcenc or mppenc for older versions; default: mpcenc.

--mp4opt Mp4als-options
    Pass other options to the encoder. Option -MP4 of encoder mp4als is mandatory to enable tagging of sound files. Use the appropriate options to alter compression level and speed. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--oggencopt Oggenc-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--wavpackopt Wavpack-options
    Pass other options to the encoder. If the same encoder has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--ffmpegopt ffmpeg-options
    Pass other options to the encoder. If the ffmpeg has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

--ffmpegsuffix ffmpeg-suffix
    The suffix of the formats to be encoded. If ffmpeg has been stated more than once, use a comma separated list. Quote them with double quotes if needed; default: not set.

-q, --quality quality
    A comma separated list of values or the word "off", passed in the same order as the list of encoders! If no encoders passed, follow the order of the config file! Quality for oggenc: (1-10), highest = 10; compression level for Flac: (0-8), lowest compression = 0; quality for Lame in vbr mode: (0-9), best quality = 0; or quality for Faac: (10-500), highest = 500; mp4als seems not to accept any compression level, set to zero; quality for Musepack: (0-10), best quality = 10; default: 5,3,5,100,0,5. Wavpack and ffmpeg have no quality switch, use encoder options instead. The value "off" turns option quality off.
    E. g. --coder 2,0,1,3 --quality 3,4,5,300 sets compression level for Flac to 3, Lame-quality to 4, Oggenc-quality to 5 and Faac quality to 300.

-v, --vbrmode mode
    Variable bitrate, only used with Lame, mode is new or old, see the Lame manpage. The Lame-option quality will be changed to -V instead of -q if vbr-mode is used; default: not set.

-b, --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"; or set if "off" if all options are passed to --lameopt! Default: 128.

-B, --maxrate rate
    maxrate (Bitrate) for Lame using --vbrmode is equal to the -B option in Lame or the -M option in Oggenc, default: 0.

-S, --preset mode
    Use the preset switch when encoding with Lame. Combined with option --vbrmode new the preset fast will be used. Use --vbrmode old not to use fast VBR. Mode is one of: insane (320 kbps @ CBR), extreme (256 kbps), standard (192 kbps) or medium (160 kbps) or any other valid bitrate. Default: off.

-W, --chars [list]
    Exclude special characters in file names and path. The argument is optional. The argument accepts a list of any characters. One might escape the characters or use double quotes to pass them on the command line. The argument also accepts the words NTFS, HFS or off. Following characters will be erased, if no argument stated or the word NTFS is passed: |\:*?$ plus blanks and periods at beginning and end of file names and directories. When using the word HFS, only colons will be purged plus blanks and periods at beginning of file names and directories. Pass the word "off" as argument to set the option off again. Default: off.

--comment comment
    Specify a comment for the comment-tag for Lame, Faac and Musepack, or the description-tag for Oggenc and Flac. The special comment cddbid or discid will place the cddbid (used by freedb) or the discid (used for MusicBrainz) into the comment. Default: not set.

-g, --genre genre
    Specify (and override CDDB) genre, must be a valid ID3-genre if using Lame, can (but shouldn't) be anything if using other encoders, default: not set.

-y, --year year
    Specify (and override CDDB) the year of year-tag for Lame, Faac and Musepack, or the date-tag for Oggenc and Flac. Default: not set.

--coverart number
    a comma separated list of numbers (if several encoders are used) according to option --coder with values 0 (no) or 1 (yes), default 0.

--coverpath path
    Path to the coverart picture to be included in the metadata of the sound files. The picture must be present or e.g. acquired using the --precmd option. Default: not set.

--mp3tags FRAME=tag
    Additional tags to be added to the mp3 file(s) if encoder does not support the frame or if some unofficial FRAMEs shall be used (e.g. a compilation tag set to 1: TCMP=1). More than one --mp3tags can be used if several tags shall be added. Default: not set.

--vatag number
    Analyze tracknames for "various artists" style and split the metadata in case one of the delimeters (colon, hyphen, slash or parenthesis) are found. Use unpair numbers for the scheme "artist ? tracktitle" and pair numbers in the opposite case. The artist will be compared to the argument of option --vastring (see below). If the artist must be like --vastring and each track have a delimeter, use 1 (2), if the artist must be like --vastring while only some tracks contain the delimeter, use 3 (4), if no restrictions apply for the artist but all tracknames must have a delimeter, use 5 (6) and finally, if only a few tracks contain a delimeter to be used as splitting point, set --vatag to 7 (8). Default: not set.

--vastring string
    A string (regular expression) that defines the "various artists" style, e.g. Varios|VA. Default: \bVA\b|Variou*s|Various\sArtists

-D, --dirtemplate '"foo parameters"'
    Use single and double quotes to pass the parameters of the templates! Allowed are any legal characters, slashes for multi-level directories and following parameters: $album, $artist, $iletter, $genre, $quality, $suffix, $trackname, $tracknum, $year and $trackno; example: '"$suffix $quality/my_snd_dir/$iletter/$artist/$year - $album"'. The parameter $iletter is the initial letter of the artist name; $trackno is the total number of tracks of the release, this might be helpful to distinguish different releases with exactly the same name; $quality is needed, if one wants to encode the same format at different qualities in the same run. Note that $quality reflects the encoder options and not the arguments of option --quality which might be set to "off". Or state different dirtemplates: the option is an array, so one can use several different dirtemplates in the same order as the encoders. If less dirtemplates than encoders are stated, the last dirtemplate will be used for subsequent encoders and the wav-directory, see EXAMPLES below. Default: '"$artist - $album"'.

-T, --tracktemplate '"foo parameters"'
    See above. The tracktemplate is not an array, only one can be stated. Default: '"$tracknum $trackname"'.

--trackoffset number
    Give a trackoffset to be added to the $tracknum variable (see above). Default: 0.

--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 for more information, default: not set.

--scp
    If the file system can not be accessed on the remote machines, scp (copy) the WAV files to the remote machines, default: off.

--local
    Only used with option --sshlist; if all encoding shall be done on remote machines, use --nolocal, default: on.

--mb
    Access MusicBrainz DB via WebService::MusicBrainz module instead of the http protocol (see below). One needs the discid calculation perl module or command to be installed and in the path. Negate to switch option off again. A non interacitve freedb lookup will be done to retrieve a genre. Default: off.

--mbname login
    Give the users MusicBrainz login name to submitt ISRCs to the database. Saved in plain when using a config, default not set.

--mbpass password
    Give the users MusicBrainz password to submitt ISRCs to the database. Saved in plain when using a config, default not set.

--isrc number
    Enable ISRC detection with number = 1 (using icedax) and submission to MusicBrainz; default: 0

-C, --cddbserver 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).

-t, --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.

-m, --mirror mirror
    Choose "freedb" or one of the possible freedb 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 obsolete as freedb uses random servers, but the default setting is mandatory.

-L, --protocol level
    CDDB protocol level for CDDB query. Level = 6 supports UTF-8 and level = 5 not. Use level = 5 to suppress UTF-8. Cf. option --utftag below. Default: 6.

-P, --proxy address
    The http proxy to use when accessing the cddb server. The CDDB protocol must be http! Default: not set.

-n, --nice number
    Set niceness of encoding process, default: 0.

-a, --archive
    Read and save CDDB files in $HOME/.cddb/"category" directory, where the "category" is one of the 11 CDDB categories. Default: off.

-e, --eject
    Ejects the CD when finished, if hardware supports it. Use --noeject to switch it off. Default: off.

--ejectcmd command
    Command to be used for ejection or loading of CD tray. Should be specified within FreeBSD even if option --eject is not used to enable RipIT to load the CD tray. One does not need to mention the words close or eject or options like -t, RipIT does it. Default: eject.

--ejectopt options
    Options for ejection command to be used for ejection or loading of CD tray. Default: the path to the CD device.

--halt
    Powers off the machine when finished if configuration supports it, default: off.

-s, --submission
    Specify --nosubmission if the computer is offline and the created file cddb.toc shall be saved in the home directory instead of being submitted. With option --archive it will also be saved in the $HOME/.cddb directory. Note: it is really easy to resubmit incomplete CDDB entries! One can confirm each existing field with Enter and add a missing genre or year. The purpose of this option is also to permit the user to edit the CDDB data for the own filenames & tags and not to overwrite the original CDDB entry! Default: on.

-M, --mail address
    Users return email address, needed for submitting an entry to freedb.org. Default: not set.

-p, --playlist number
    Create the m3u playlist file, or use --playlist 0. For filenames without full path use --playlist 2. Default is full path for filenames. Default 1 - on.

-A, --book number
    Create an audiobook file, i. e. merge all tracks into one sinlge file, option --ghost will be switched off and file suffix will be m4b instead of m4a. Make sure to use encoder faac, ripit will not check for the encoder used. The installed version must support the -w option to write tags. A chapter file will be written for chapter marks. Default: off.

-i, --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
    Specify the lcdproc host, default: localhost.

--lcdport
    Specify the lcdport, default: 13666.

--infolog file
    Log operations (system calls, file/directory creation) to file given with full path; default: not set.

-l, --lowercase
    Lowercase filenames, default: off.

-u, --underscore
    Use underscores (_) instead of spaces in filenames, default: off.

--uppercasefirst
    Uppercase first letter of each word in filenames and tags. Use this option if the CDDB entry is uppercase only. Default: off.

-U, --utftag
    Keep Lame-tags in UTF-8 or decode them (but not the filenames) from UTF-8 to ISO8859-1. Applies only to mp3 (Lame). May be useful for tags with special characters and if mp3-player doesn't support Unicode. Using Musepack one might want to pass the Musepack option --unicode to option museopt. Default: off.

--rip
    Rip the CD, to be used as --norip if wav-files are present. Used for debugging. Default: not set.

--encode
    Do encode the wavs. If only the wav-files shall be created, prevent encoding with --noencode (and use option --wav, see below). Default: on.

-w, --wav
    Keep the wav files after encoding instead of deleting them, default: off.

-N, --normalize
    Normalizes the wave-files to a given dB-value (default: -12dB). Default: off.
    This is useful when encoding

    *   for hardware or software that doesn't support the replaygain-feature

    *   to audio formats without replaygain capabilities.

--normcmd
    Command to use for normalizing, default: normalize.

-z, --normopt
    Options to pass to normalize. Possible values:
     | -a -nndB : | Normalize to -nn dB, default is -12dB,
     | Value range: | All values <= 0dB
     | Example : | normalize -a -20dB *.wav
     | -b : | Batch mode - loudness differences between
     |  | individual tracks of a CD are maintained
     | -m : | Mix mode - all track are normalized to the
     |  | same loudness
     | -v : | Verbose operation
     | -q : | Quiet operation

    For further options see normalize documentation (http://normalize.nongnu.org). Please note that normalizing to a high dB value, e.g. -6dB or less will lead to severe compression of the audio signal, thus losing sound quality. Keeping the default value of -12dB is recommended.
    Default: -b Option v (q) will be set according to verbosity chosen.

--cdtoc number
    Number n = 1 to create a toc file to burn the wavs with CD-Text using cdrdao or cdrecord. Default: off.

--inf number
    Number n = 1 to create inf files to burn the wavs with CD-Text using wodim or cdrecord. Default: off.

--cdcue number
    Number n = 1 or 2 to create cue sheets to burn the wavs with CD-Text. The cue sheets will be copied to the other file formats. Number 1 will swith option --ghost on to eliminate chunks of silence. Number 2 is experimental but does not switch option --ghost on and may be used if number 1 fails. Default: off.

-h, --help
    Print this and exit.

-V, --version
    Print version and exit.

-x, --verbose number
    Run silent (do not output comments, status etc.) (n = 0), with minimal output (n = 1), normal without encoder messages (n = 2), normal (n = 3), verbose (n = 4), extremely verbose (n = 5). Default 3.

--config
    Read parameters from config file or specify --noconfig to prevent reading it. A local config file in $HOME/.ripit/ will have higher priority, only if the local file does not exist, ripit will try to read /etc/ripit/config. Default: on.

--save
    Add parameters passed on command line to an existing config file. This does not overwrite other existing settings. Options of an existing config file will be adopted and the old file saved as config.old. Default: off.

--savenew
    Save all parameters passed on command line to a new config file, backup an existing file to config.old. Creates a default config file if no options are passed on command line. Default: off.

--loop value
    Continue ripping and encoding as soon as the previous CD finished. This option forces ejection (--eject). The value is either 0 for normal use or 1 for standard looping. Experimental value 2 migth be used to force immediate restart of ripping process. This will spoil the output, this will show the prompt although a child process is running (waiting for a new CD) and must be terminated manually. Default: off.

--quitnodb value
    Give up CD if no CDDB entry found. Useful if option --loop or --nointeraction are on. Default behaviour is to let operator enter data or to use default artist, album and track names. Possible values: 0 - off, 1 - on, default: off

--resume
    Resume a previously started session. Default: off.

-O, --overwrite argument
    Default behaviour of Ripit is not to overwrite existing directories, a suffix will be added if directory name exists. Use option overwrite to prevent this and either overwrite a previous rip (y) or force Ripit to quit (q) or even eject the disc (e). If ejection is chosen, the disc will be ejected even if option --eject has not been switched on. Default: off (n)

--dpermission number
    Change the directory permission to number. Default: 0755.

--fpermission number
    Change the file permission to number. Default: 0644.

--md5sum
    Create a MD5-sum file for each type of sound files.

--threads number
    Comma separated list of numbers giving maximum of allowed encoders to run at the same time. In conjunction with option sshlist the number for the local machine is mandatory and must be stated first. Default: 1.

-X, --execmd command
    State a command to be executed when ripit finshed. The same variables as in the dirtemplate can be stated. When using MusicBrainz one can try to use $cd{asin} to get the ASIN. Make sure to escape the command if needed. Default: not set.

--precmd command
    State a command to be executed before ripping started. The same variables as in the dirtemplate can be stated. When using MusicBrainz one can try to use $cd{asin} to get the ASIN. Make sure to escape the command if needed. Can be used to execute a script to retrieve coverart. Default: not set.

EXAMPLES
To specify a CD device, type

    ripit --device /dev/sr1

To specify the output directory, type

    ripit --outputdir /foo/paths/

To rip and encode a special track selection, type

    ripit 1,3-6,8-11

To use several encoders in the same run, type

    ripit --coder 1,0,2 --quality 3,5,6

To use Lame with variable bitrate (VBR), type

    ripit --vbrmode new --bitrate 0

Note, one should reset the --bitrate to 0 (zero) if the -b option of Lame is not desired. According to VBR mode in Lame, use "new" or "old".

It is recommended to use the preset switches for Lame, (see Lame man-page) and specify fast encoding with --vbrmode new (use --vbrmode old to switch off the fast encoding)

    ripit --preset extreme --vbrmode new

To pass options related to the encoder use the according encoder option switch: e.g. to use the managed mode with oggenc:

    ripit -c 1 --oggencopt "--managed -b 192 -M 224 -m 96" --quality "off"

Normalize your wave-files prior to encoding:

    ripit --normalize

Normalize your files to -18dB using "mix mode" (see normalize documentation)

    ripit --normalize --normopt "-m -a -18dB"

To define a directory template where the sound files should go, type

    ripit --dirtemplate '"$artist - $year"'

To create 2 directory levels, as used in other environments, type

    ripit --dirtemplate '"$artist/$album"'

To save a config file in ~/home/.ripit/ with options: to use Lame and Oggenc, don't create a m3u file, archive the CDDB entry files in ~/.cddb/"category"/ and to eject CD when done, type

    ripit --coder 0,1 --playlist 0 --archive --eject --save

To do the job without any interaction, type

    ripit --nointeraction

To use a network for encoding, make sure that the output paths are equal on all machines!

    ripit --sshlist sun,saturn,earth

where sun, saturn and earth are remote machines on which a user can login via ssh without entering a password or passphrase! Note that the paths must be equal for the user on all remote machines! If the login is different on some machines, try

    ripit --sshlist login1@sun,login2@saturn,login3@earth

If there is "no" identical path on the remote machines, then the user might enter e.g. /tmp/ as output directory. If the file-system is not mounted on each remote machine, one can try to copy the wavs to the remote machines using option --scp.

    ripit --sshlist sun,saturn,earth --scp

Check for ghost songs and trim very long lead-in/out:

    ripit --ghost --prepend 1.0 --extend 1.0

Rip only first 30 seconds of each track (useful for testing)

    ripit --span 0-30

Encode the same format in 2 qualities, at low quality for a portable, at high quality for home:

    ripit --dirtemplate '"cbr/$artist/$year - $album"' \
          --dirtemplate '"preset/$artist - $album"' \
          --coder 0,0 --bitrate off --quality off,off \
          --lameopt "-b 128 -q 2;--preset extreme"

Force RipIT to use one and the same directory for all sound files:

    ripit --dirtemplate '"/"' --outputdir="/media/sound" \
          --resume

FILES
User config file (/etc/ripit/config will only be used if there is no $HOME/.ripit/config):

    $HOME/.ripit/config
    /etc/ripit/config

    /usr/share/doc/packages/ripit/README
    /usr/share/doc/packages/ripit/HISTORY
    /usr/share/doc/packages/ripit/LICENSE

BUGS
Probably there are more than some.

SEE ALSO
cdparanoia(1), lame(1), oggenc(1), flac(1), normalize(1), cdda2wav(1), ffmpeg(1)

AUTHORS
RipIT is now maintained by Felix Suwald, please send bugs, wishes comments to ripit_[at]_suwald_[dot]_com with a concise subject.
For bugs, wishes and comments about lcdproc, please contact
max.kaesbauer_[at]_gmail_[dot]_com.
Former maintainer: Mads Martin Joergensen; RipIT was originally developed by Simon Quinn.

This manpage was originally created for the Debian GNU/Linux system by help2man 1.36 and optimized by Elimar Riesebieter <riesebie@lxtec.de>, enhanced and updated by Felix Suwald.