aboutsummaryrefslogtreecommitdiff
path: root/miragextract.1
blob: e7627d93900e9275a33a5e9f1d951b90fb11d81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
.\" Man page generated from reStructuredText.
.
.TH MIRAGEXTRACT 1 "2020-05-13" "0.2.0" "Urchlay"
.SH NAME
miragextract \- extract audio and data tracks from CD images
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" 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.
.
.SH SYNOPSIS
.sp
miragextract [\fB\-l\fP] [\fB\-s\fP] [\fB\-t\fP track] [\fB\-b\fP base] [\fB\-f\fP fmt] [\fB\-p\fP passwd] [\fB\-q\fP quality ] \fBimage\-file\fP
.SH DESCRIPTION
.sp
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).
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-help
Print short usage string.
.TP
.B \-a
Extract only audio tracks. Default is to extract all tracks.
.TP
.BI \-b \ <name>
Sets the base filename for the output files. Default is \fBtrack\fP\&.
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.
.TP
.B \-d
Extract only data tracks. Default is to extract all tracks.
.TP
.B \-f
Sets the format and filename extension for the output audio files.
Choices are \fBwav\fP, \fBogg\fP, \fBflac\fP, \fBcdda\fP (raw CD audio).
Default is \fBwav\fP\&.
.TP
.B \-l
Lists all tracks in the image without extracting them. Currently
does not combine with \-t, \-a, \-d as expected (you can\(aqt list only
audio tracks with "\-l \-a" for instance).
.TP
.B \-L
Lists all tracks in the image without extracting them, with
extra detail (sector sizes, counts, and exact byte sizes).
.TP
.B \-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.
.TP
.BI \-p \ <passwd>
Password for encrypted images. Note that anyone who can run \fBps(1)\fP
on your system may be able to view the password. Also note that password
support in miragextract is \fIcompletely\fP untested: I have no
encrypted images to test with.
.TP
.BI \-q \ <qual>
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.
.TP
.B \-s
Swaps bytes in audio tracks. Use this if your audio files sound
like white noise or gibberish.
.TP
.BI \-t \ <track>
Takes a track number (1\-99), and extracts only that one track.
Default behaviour is to extract all tracks.
.UNINDENT
.sp
Option bundling is not supported (e.g. \fB\-d\fP \fB\-s\fP is OK, \fB\-ds\fP is wrong).
.sp
Always include a space between an option and its argument (e.g. \fB\-b foo\fP, not \fB\-bfoo\fP).
.SH NOTES
.sp
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.
.sp
Output files will be overwritten if they already exist, with no prompting.
.sp
Output audio files are named track01.wav, track02.wav, etc by default. The
\(aqtrack\(aq 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.
.sp
Output data tracks will be named to end in \(aq.iso\(aq by default, or \(aq.hfs\(aq
if they look like Apple disk images (HFS or HFS+), or \(aq.hfs.iso\(aq for
"hybrid" images that can be mounted as either ISO9660 or HFS/HFS+
(such as Blizzard\(aqs combined Mac/PC releases).
.sp
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.
.sp
When extracting raw CD audio tracks, you can test them by listening to
them with the \fIplay\fP command from \fIsox\fP\&. Try:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
play \-x \-t cdda track01.cdda
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\&...possibly without the \-x option if you\(aqre on a big\-endian platform.
.\" other sections we might want, uncomment as needed.
.
.\" FILES
.
.\" =====
.
.\" ENVIRONMENT
.
.\" ===========
.
.SH EXIT STATUS
.sp
As usual, 0 for success, non\-zero for failure.
.SH BUGS
.sp
The \-p option should prompt for a password.
.sp
Not exactly a bug, per se, but miragextract can\(aqt deal with multi\-file
images where one of the files is missing or truncated. This is because
libmirage validates the image when it\(aqs loaded, and is unlikely to change.
.sp
Related to the above, there\(aqs no attempt to recover from errors.
miragextract exits as soon as it encounters an error of any kind.
.sp
libmirage (as of version 3.2.4) also doesn\(aqt really support "wav/cue"
images (or ogg/cue, mp3/cue, etc). If you try to use miragextract on one,
you\(aqll get advised to try audiocue2bincue(1). When (if) libmirage gains
support for these, miragextract should handle them just fine.
.\" EXAMPLES
.
.\" ========
.
.SH AUTHOR
.sp
miragextract was written by B. Watson <\fI\%yalhcru@gmail.com\fP> and
released under the WTFPL: Do WTF you want with this.
.SH SEE ALSO
.sp
cuerecover(1), cdemu(1), bchunk(1)
.\" Generated by docutils manpage writer.
.