cdsuite: Convert audio CDs to collections of audio files. Adam Sampson cdsuite is a tool written in Python to read audio from a CD, encode it to another format, and name the generated files appropriately using MusicBrainz. It supports reading audio via cdparanoia and converting files to wav, Ogg Vorbis, MP3 (using LAME) and FLAC formats. cdsuite's job is done in two stages: in the first stage, audio is captured and encoded (at the same time, using buffering for efficiency), and written to files with names based on the disc ID; in the second stage, the disc ID is looked up using MusicBrainz's web service, and the files are renamed to match. The two stages can be seperated so that you can batch-rename albums if you've only got intermittent Internet access. Typical usage: "cdsuite". This will convert the disc in your CD drive to a load of files in a directory named after the album. MusicBrainz disc ID information will be written to a file called "discid" in the album directory, which you can remove later if you don't want to keep it. Disconnected usage: "cdsuite offline=1" to capture the audio, then "cdsuite rename=disc-abcdefgh" to rename the files (where disc-abcdefgh is the directory name the first pass generated; a trailing / is fine). If you want to check that the names it's picked are correct, you can do "cdsuite rename=disc-abcdefgh dryrun=1" to just print the new names rather than renaming the files. If cdsuite can't find an exact match for the disc ID, it'll print a list of the possibilities and ask you to run the same command again with an extra "release=xyz" argument specifying the MusicBrainz release identifier. If it doesn't find any matches at all, you can look up the identifier (it's a UUID, a long string of letters and numbers) on the MusicBrainz web site and pass it the same way. To submit your disc to MusicBrainz, do "cdsuite submit=1", which'll scan the disc and print out a URL for you to visit. If you're encoding an album that consists of multiple CDs, then by default cdsuite will produce one directory per CD. If (like me) you'd rather have all the tracks that make up a double album in one directory, you can specify something like "prefix=1-" to make cdsuite put that prefix before all the names it generates, so it's then safe to move all the files into one directory. (I'd make it do this automatically, but the MusicBrainz data doesn't yet provide a good way of detecting multi-CD releases.) Since I can't agree with anybody about how audio files should be named -- I've converted most of my CDs to audio files, and my naming convention is different from everybody else's -- the name formats, along with a lot of other options, are configurable. You can either specify options on the command line ("cdsuite someoption=somevalue ..."), or you can place them in a file called .cdsuiterc in your home directory (blank lines and lines starting with # will be ignored). Default values for all the options can be found at the top of the cdsuite script; the defaults are to encode with vorbis, quality 7, using cdparanoia, from /dev/cdrom (which should be acceptable for most people, although you'll probably want to change the naming format). The options supported are: reader: the audio reading method to use (currently, only "default" and "cdparanoia", which are equivalent, are supported). Do "reader=help" to list possible readers. encoder: the encoding method to use ("vorbis" (same as "default"), "wav", "lame", "flac"). Do "encoder=help" to list possible encoders. buffersize: the size of the memory buffer between the reader and the encoder when converting. 500000 bytes by default; you shouldn't need to change this. device: the name of the CDROM device to use. vorbis.quality, vorbis.bitrate: the -V and -b options to oggenc. (You should only specify one of these; if you specify both, bitrate will take priority.) lame.stereomode, lame.bitrate, lame.quality, lame.highquality: the -m, -b, -V and -h options to lame. Again, only specify one of bitrate and quality. flac.quality: the compression arguments to flac. eject: if this isn't empty, cdsuite will eject the CD once it's done. trackformat, albumformat, nogroupalbumformat: the formats used for track names, album names, and album names where no group name is provided. In these strings, the following things will be replaced by their expansions: %n The track number. %t The track title. %g The group name. %a The album name. The defaults will produce files with names that look like: "Greatest Hits - Adam Sampson/01 Twenty-Five Hours - Adam Sampson.ogg". If you specified "trackformat=%n. %g - %t" and "albumformat=%g - %a", then you'd get: "Adam Sampson - Greatest Hits/01. Adam Sampson - Twenty-Five Hours.ogg". That should be all you need to know. It should be straightforward, if you know a bit of Python, to add other audio-reading methods or convertors for other formats; look at the classes defined in the script. If you do so, please send them to me, and I'll merge them into the source.