aboutsummaryrefslogtreecommitdiff
path: root/cuerecover.1
blob: ff4e1365f214228c29c2b1b219bcda6a5126fbc2 (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
191
192
193
194
195
196
197
198
199
.\" Man page generated from reStructuredText.
.
.TH CUERECOVER 1 "2020-05-13" "0.2.0" "Urchlay"
.SH NAME
cuerecover \- generate .cue file for CD image .bin
.
.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 cuerecover(1) man page. Convert with:
.
.\" rst2man.py cuerecover.rst > cuerecover.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
cuerecover [\-o output] [\-s sec] [\-t thresh] \fBbin\-file\fP [\fBbin\-file\fP ...]
.SH DESCRIPTION
.sp
cuerecover attempts to generate a usable cue sheet for CD images which
are missing their .cue (or .ccd, .mds, etc) files.
.sp
If a single .bin file is given, it\(aqs assumed to hold all the tracks (which
might only be one). If multiple .bin files are given, each one is assumed to
represent one track of the same CD image.
.sp
For data tracks, the recovered track should be correct, provided the
bin file wasn\(aqt truncated or otherwise corrupted.
.sp
For audio tracks in a single .bin file, silence detection is used to
find the split points between tracks. This means that in cases where
one track segues into another, the two tracks will be combined in the
resulting cue sheet. Also, if there are long periods of silence within
a single track, this track will be split into two or more tracks.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-help
Print short usage string.
.TP
.BI \-o \ <file>
Write cue file to \fIfile\fP rather than standard output. If
\fIfile\fP already exists, cuerecover will refuse to overwrite it,
which makes this safer than redirecting stdout. It\(aqs customary
for cue files to have the same filename as their bin file(s),
with the .bin replaced by .cue, but it\(aqs not actually required.
.TP
.BI \-s \ <sec>
Minimum amount of silence for detecting the split point between
two audio tracks. Argument is in seconds, and decimals
are allowed. The default is 2, which is the standard sized
gap between tracks in the Redbook standard and in most CD
authoring software. 0 means to disable splitting tracks:
all the audio tracks will be combined into one in the
.cue sheet. This option is ignored when multiple .bin file
arguments are given, since they\(aqre already split into tracks.
.TP
.BI \-t \ <thresh>
Silence threshold, 0 to 100. Default is 0. This is
the percentage of non\-zero bytes allowed in a sector for it
to be considered silent. Sometimes audio tracks have random
data in the pregap (before the INDEX 01), which will fool
cuerecover into thinking there\(aqs no pregap. This option can
help with those, but don\(aqt set it too high. This option is ignored
when multiple .bin file arguments are given, since they\(aqre already
split into tracks.
.TP
.B \-v
Verbose mode. Prints (on stderr) some extra messages about what
cuerecover is doing. Probably only of interest to the author.
.UNINDENT
.sp
Always include a space between an option and its argument (e.g. \fB\-s 1\fP, not \fB\-s1\fP).
.SH NOTES
.sp
cuerecover works a lot better when it\(aqs reading a split image (one file
per track).
.sp
When reading a monolithic image (multiple tracks the same file),
cuerecover has to make some assumptions. These are usually valid, but
should be mentioned here:
.INDENT 0.0
.IP \(bu 2
The disc image is a single session. Actually multisession discs might
work too, but I have no examples to test with. If you\(aqre dealing with
an image of a commercial release (a game, probably), it\(aqll be single
session.
.IP \(bu 2
The tracks are all MODE1 (data), MODE2 (also data, usually video CDs) or
CD\-DA (regular CD audio). Extended format CDs like XA or CD+I are not
supported, though you might still get listenable audio tracks from them.
.IP \(bu 2
If there\(aqs a data track, it will be the only data track, and it will be
track 1. This is almost always the case, since most operating systems
from the CD\-ROM era (and even modern ones) don\(aqt provide access to
data tracks that aren\(aqt the first track on the disc.
.IP \(bu 2
If there\(aqs a data track, it\(aqs a raw image (2352 bytes per sector, includes
the sync pulse, address, CRC, ECC, etc). If the data track was stored as
\(aqcooked\(aq data (2048 bytes/sector, MODE1/2048 in the original .cue
file), it\(aqll be treated as an audio track (or more likely 20 or 30
audio tracks), and you\(aqll get a warning that it looks like \(aqcooked\(aq
data. You can check for this by trying to mount the .bin file as an
ISO or HFS image: if it mounts, the first track is \(aqcooked\(aq.
.IP \(bu 2
If a data track gets mis\-identified as a file, it\(aqll be obvious if
you use the .cue sheet to extract the image into files: you\(aqll
probably get way too many tracks, since most filesystem images have
long stretches of "silence" (long runs of zeroes). If you try to listen
to these, you\(aqll notice that ISO images don\(aqt sound musical at all!
The last few tracks will be the largest, and these will be valid audio,
if there were any audio tracks.
.IP \(bu 2
Audio tracks are separated by at least 2 seconds of silence (or whatever
you set \-s to). If not, there\(aqs no way to detect where one track ends
and the next begins, so they\(aqll get merged together.
.IP \(bu 2
In the best case scenario, cuerecover will generate \fIa\fP cue file, which
will be valid... but it may not match the original (missing) one
exactly. This is because cuerecover has to look for silent sections
of the image and use those as split points for the tracks. If there\(aqs
a 3\-second silent section between tracks 2 and 3, is that 1 second of
silence at the end of track 2 and 2 seconds of silence at the start of
track 3, or vice versa, or 1.5 seconds each, or...?
.UNINDENT
.\" other sections we might want, uncomment as needed.
.
.\" FILES
.
.\" =====
.
.\" ENVIRONMENT
.
.\" ===========
.
.SH EXIT STATUS
.sp
As usual, 0 for success, non\-zero for failure.
.\" BUGS
.
.\" ====
.
.\" EXAMPLES
.
.\" ========
.
.SH AUTHOR
.sp
cuerecover 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
miragextract(1)
.sp
The manual for GNU ccd2cue(1) has useful information on the .cue
file format:
.INDENT 0.0
.INDENT 3.5
\fI\%https://www.gnu.org/software/ccd2cue/manual/html_node/CUE\-sheet\-format.html\fP
.UNINDENT
.UNINDENT
.sp
More information on the CD\-ROM data formats:
.INDENT 0.0
.INDENT 3.5
\fI\%https://wiki.osdev.org/User:Combuster/CDRom_BS\fP
\fI\%https://en.wikipedia.org/wiki/CD\-ROM\fP
.UNINDENT
.UNINDENT
.\" Generated by docutils manpage writer.
.