Difference between revisions of "User:PBryan/cd2flac"
m (12 revision(s))
Revision as of 16:34, 15 March 2009
- 1 cd2flac
The cd2flac script performs secure extraction of audio tracks from a compact disc, and encodes them in FLAC format. This script sports the following notable features:
- multiple passes, MD5 hashing and matching to ensure accurate extraction
- track 1 pregap "hidden" track detection and extraction
- metadata editing, populated from MusicBrainz, based on calculated disc ID
- track number offsetting to allow multi-disc releases to be compiled into a single album
- sector offset correction
- Device-Cdio module (Ubuntu package: libdevice-cdio-perl)
- Getopt-ArgvFile module (Ubuntu package: libgetopt-argvfile-perl)
- cdparanoia utility (Ubuntu package: cdparanoia)
- flac and metaflac utilities (Ubuntu package: flac)
- mbdiscid script hosted at this site (not required if you use --nometadata option)
- metaedit script hosted at this site (not required if you use --nometadata option)
- This script is tested on Ubuntu 8.10; mileage may vary on other platforms.
- This script is licensed under the GPL 2.0 or later.
Usage: cd2flac [options] [tracks]
Option Description Default --cdparanoia=program Program to extract audio from CD cdparanoia --device=device CD-ROM device to extract from. /dev/cdrom --dir=directory Directory to output files. --flac=program Program to encode extracted audio into FLAC format. flac --help Display this help message. --log=file File where cd2flac appends logs results to. --[no]metadata Fetch and edit track metadata from MusicBrainz. metadata --metaedit=program Program to edit album metadata. metaedit --metaflac=program Program to manage metadata in FLAC files. metaflac --matches=number Extractions that must match identically to succeed. 2 --offset=number Force shift of sector offset. 0 --[no]overwrite Overwrite previous extract of tracks nooverwrite --passes=number Number of attempts to extract before failing 3 --quiet Quiet operation, no screen output. --speed=number Speed to extract track from the disc. --tmp=directory Directory to store temporary files in. /tmp --trackadd=number Add track offset for multi-disc releases. 0 --verbose Verbose output of progress information.
This script supports a flexible way of expressing the track numbers to extract. Ranges and commas supported. Example: 1-2,4,6-8,11-. If no tracks are specified, all are extracted.
The --trackadd option allows multiple discs to be easily compiled into a single album. Set the value to what should be added to the track number of tracks on the disc. Negative values are also permitted.
An album template allows a template of metadata to be established so that the appropriate tags are displayed in the context. For more information, see the metaedit command help.
You can store persistent command-line options in a file called .cd2flac in your home directory. They will be read as defaults prior to processing any passed command-line options.
- Minor changes to output formatting.
- Removed (unused) tag template functionality.
- Added --log option to log extraction results to file. (IRC: warp)
- Minor changes to output messages.
- Now supports suppression of MusicBrainz metadata retrieval and editing via --nometadata option. (IRC: warp)
- Initial version released to MusicBrainz.