.. RST source for miragextract(1) man page. Convert with: .. rst2man.py miragextract.rst > miragextract.1 .. rst2man.py comes from the SBo development/docutils package. .. note to self: don't forget to check the generated man and html pages .. into git since we don't want to require our users to have rst2man.py. .. |version| replace:: 0.2.0 .. |date| date:: ============ miragextract ============ -------------------------------------------- extract audio and data tracks from CD images -------------------------------------------- :Manual section: 1 :Manual group: Urchlay :Date: |date| :Version: |version| SYNOPSIS ======== miragextract [**-l**] [**-s**] [**-t** track] [**-b** base] [**-f** fmt] [**-p** passwd] [**-q** quality ] **image-file** DESCRIPTION =========== Extracts data and audio tracks from any CD image supported by libmirage. Data tracks are written as-is, and audio tracks can be written as-is or converted to wav, flac, or ogg/vorbis (via libsndfile). OPTIONS ======= --help Print short usage string. -a Extract only audio tracks. Default is to extract all tracks. -b Sets the base filename for the output files. Default is **track**. Can be prefixed with a directory to write files in that dir, but the dir must already exist (example: -b extracted/track). See also the -n option. -d Extract only data tracks. Default is to extract all tracks. -f Sets the format and filename extension for the output audio files. Choices are **wav**, **ogg**, **flac**, **cdda** (raw CD audio). Default is **wav**. -l Lists all tracks in the image without extracting them. Currently does not combine with -t, -a, -d as expected (you can't list only audio tracks with "-l -a" for instance). -L Lists all tracks in the image without extracting them, with extra detail (sector sizes, counts, and exact byte sizes). -n Set the base filename to the input filename, minus its extension. E.g. for foo.cue, this is the same as saying "-b foo". Beware of using input filenames with directory separators in them: the output files will be written in the same dir as the input file. Hopefully you have permission to write there. -p Password for encrypted images. Note that anyone who can run **ps(1)** on your system may be able to view the password. Also note that password support in miragextract is *completely* untested: I have no encrypted images to test with. -q Quality setting for ogg and flac output files. Integer from 0 to 10. Default is 7. Has very little effect on flac, and no effect on wav or cdda output. -s Swaps bytes in audio tracks. Use this if your audio files sound like white noise or gibberish. -t Takes a track number (1-99), and extracts only that one track. Default behaviour is to extract all tracks. Option bundling is not supported (e.g. **-d** **-s** is OK, **-ds** is wrong). Always include a space between an option and its argument (e.g. **-b foo**, not **-bfoo**). NOTES ===== Image-file is e.g. a .cue, .ccd, .nrg, .mds, or anything else supported by libmirage. See the README for your version of libmirage for details. Output files will be overwritten if they already exist, with no prompting. Output audio files are named track01.wav, track02.wav, etc by default. The 'track' part of the name can be set with -b, and the extension will match the encoding set with -f. Note that mp3 is NOT a valid -f option. If you need mp3, extract to .wav and then use a tool like lame or ffmpeg to convert to mp3. Output data tracks will be named to end in '.iso' by default, or '.hfs' if they look like Apple disk images (HFS or HFS+), or '.hfs.iso' for "hybrid" images that can be mounted as either ISO9660 or HFS/HFS+ (such as Blizzard's combined Mac/PC releases). Images with multiple sessions should be supported, but have not been tested. Track numbering just continues, so a disc with 2 sessions of 8 files each will have tracks numbered 1 to 16 as far as the -t option and the output filenames are concerned. When extracting raw CD audio tracks, you can test them by listening to them with the *play* command from *sox*. Try:: play -x -t cdda track01.cdda ...possibly without the -x option if you're on a big-endian platform. .. other sections we might want, uncomment as needed. .. FILES .. ===== .. ENVIRONMENT .. =========== EXIT STATUS =========== As usual, 0 for success, non-zero for failure. BUGS ==== The -p option should prompt for a password. Not exactly a bug, per se, but miragextract can't deal with multi-file images where one of the files is missing or truncated. This is because libmirage validates the image when it's loaded, and is unlikely to change. Related to the above, there's no attempt to recover from errors. miragextract exits as soon as it encounters an error of any kind. libmirage (as of version 3.2.4) also doesn't really support "wav/cue" images (or ogg/cue, mp3/cue, etc). If you try to use miragextract on one, you'll get advised to try audiocue2bincue(1). When (if) libmirage gains support for these, miragextract should handle them just fine. .. EXAMPLES .. ======== AUTHOR ====== miragextract was written by B. Watson and released under the WTFPL: Do WTF you want with this. SEE ALSO ======== cuerecover(1), cdemu(1), bchunk(1)