-
Notifications
You must be signed in to change notification settings - Fork 0
/
jack.man
609 lines (609 loc) · 18.4 KB
/
jack.man
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH JACK 1 "November 22, 2004"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
Jack \- rip and encode CDs with one command
.SH SYNOPSIS
.B jack
.RI [ options ]
.SH DESCRIPTION
.B Jack
transforms your audio-CDs to FLAC, MP3 or Ogg Vorbis files. It uses several
helper programs in order to achieve functions such as ripping, encoding and,
tagging files with meta information. Ripping is either done via
.B cdparanoia
(in which case the ripping status is displayed by Jack as well) or
.B cdda2wav.
Jack works with several encoders, namely
.B oggenc, flac, lame, gogo, bladeenc, l3enc, mp3enc
and
.B xing.
Any time during operation (and even when everything is finished and
the original CD lost) you can let Jack look up the track names at
.B freedb.org
and rename the tracks accordingly. Tagging of audio files with meta
information about artist, track title, etc. is performed as well.
.PP
If no freedb-lookup has been performed, Jack drops all files in a
directory
.BR ~/jack/jack-xxxxxxxx ,
with
.B xxxxxxxx
representing the CD's CDDB/FreeDB disc ID.
This directory is renamed by Jack when the appropriate information is known.
.PP
Most options like ripper, encoder, preferred FreeDB-Server, directory
and sound file format, etc. can be user defined by changing the
defaults in
.B /etc/jackrc
or by saving them to
.BR ~/.jack3rc .
Additional rippers, encoders and FreeDB servers can be defined by users
through the help of a plug-in directory (as defined by the
.BR plugin_path
option which defaults to
.BR ~/.jack_plugins ).
.PP
While Jack is running, these keyboard commands are available:
.RS
.TP
.BR q " or " Q
quit
.TP
.BR p " or " P
disable ripping (for example, if you need the CD drive)
.TP
.BR p " or " P " (again) or " c " or " C
resume ripping
.TP
.BR e " or " E
pause/continue all encoders
.TP
.BR r " or " R
pause/continue all rippers.
.TP
.BR ?
toggle the copyright/help box
.RE
.SH OPTIONS
Different options need different data-types as arguments:
.TP
.B bool
can be "yes" or "no", like in
.B \-\-vbr=yes
.TP
.B string
can be anything, like in
.B \-\-rename\-fmt
"%n.%t"
.TP
.B int
an integer number, like in
.B \-\-bitrate 192
(or
.B \-\-bitrate=192
)
.TP
.B list
multiple strings, delimited by the final ";".
Example:
.B \-\-guess\-toc file1.mp3 file2.mp3 ... fileN.mp3
\\;
.PP
Jack understands the following options:
.TP
.B \-\-append-year string
append this string to the directory name (useful with %y to add the year
an album was released)
.TP
.B \-b, \-\-bitrate int
target bitrate (in kbit/s, default is 160).
.TP
.B \-\-char-filter string
convert file names using a python method
.TP
.B \-\-charset string
charset of filenames (defaults to your locale).
.TP
.B \-c, \-\-check-toc
compare toc-file and cd-toc, then exit. Jack caches the TOC of a
CD in a file ("jack.toc"). If you want to know if the inserted CD
matches the toc-file in the current directory, use this option.
.TP
.B \-C, \-\-claim-dir
rename directories even if they were was not created by Jack.
.TP
.B \-\-cont-failed-query
continue without FreeDB data if query fails.
.TP
.B \-D, \-\-create-dirs
tells Jack to create sub-directories in which Jack puts all the
files for the current CD. If no FreeDB data is available, i.e.
when not using
.B -Q
, these directories will be named "jack-xxxxxxxx"
where "xxxxxxxx" stands for the CD's FreeDB ID. Otherwise
dir_template (see above) will be used. This option is turned on
by default.
.TP
.B \-\-device string
The device-name of your cdrom-drive. The default is
.B /dev/cdrom
.TP
.B \-\-dir-template string
if directories are renamed, this is the format used (default "%a/%l")
.TP
.B \-d, \-\-dont-work
don't do DAE, encoding, tagging or renaming. This may be useful if you only
want to do a FreeDB query, e.g. while another jack is running.
.TP
.B \-\-edit-freedb
open an editor to change the CDDB information which has been obtained
previously (only useful with \-Q).
.TP
.B \-\-encoder-name, \-E string
use which encoder (default "oggenc")
.TP
.B \-e, \-\-encoders int
encode how many files in parallel. If you have a SMP machine or
simply want to stress your system, you can have Jack encode
several files at once (default 1).
.TP
.B \-x, \-\-exec
run predefined command when finished. The command is defined by "exec_rip_done"
configuration variable.
.TP
.B \-\-extt-is-artist
the artist is contained in the EXTT fields. The EXTT fields are lines in the
FreeDB file which contain additional data for each track. As it's the
submitting user's choice what to use them for, Jack can't determine by itself
what they were intended for. You have to provide this information.
.TP
.B \-\-extt-is-title
the track title is contained in the EXTT fields.
.TP
.B \-\-extt-is-comment
a track comment is contained in the EXTT fields.
.TP
.B \-\-force
do not ask. Like when deleting incomplete files.
.TP
.B \-f, \-\-from-tocfile string
rip from a cdrdao created CD image on hd. The specified toc-file
contains the name of the image file. Use
.B \-F
if jack can't find the image file.
.TP
.B \-F, \-\-from-image string
read audio data from image file. Like
.BR \-\-from-tocfile ,
but the
image itself is specified instead of the tocfile. If you
do not have a toc-file (or don't specify a toc-file),
the TOC is read from the CD itself.
.TP
.B \-g, \-\-guess-toc list
make up a TOC from the list of sound file given. The format is
.B track_01.ogg ... track_nn.ogg ;
Note that the trailing "
.B ;
" is only necessary if you want to
append more options to your command line.
You can use it to do a FreeDB query based on your sound files
alone - no need for the CD. Very useful if you have no idea
which CD the songs are from. The songs must be given in the same
order as they were on their CD. The generated TOC file is
similar, but not identical to the TOC of the CD - do not submit
these!
.TP
.B \-G, \-\-id3-genre string
set ID3 genre. Use 'help' to get a list of all known genres. (You can also specify the ID3v1 genre as an int)
.TP
.B \-Y, \-\-id3-year int
set the year of the album (the term ID3 comes from MP3 but this option also
works with other audio formats, such as OGG Vorbis and FLAC)
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-k, \-\-keep-wavs
do not delete WAVs after encoding them.
.TP
.B \-m, \-\-mail-submit
submit FreeDB entry via e-mail. HTTP submission is preferred.
You will have to enter the category of the CD.
.TP
.B \-l, \-\-max-load float
only start new encoders if your system's load is below the specified value.
/proc/loadavg must be readable by you for this to work.
.TP
.B \-\-multi-mode
try to query FreeDB for all dirs in searchdirs which
have no FreeDB data.
.TP
.B \-\-my-mail string
your e-mail address, needed for FreeDB submissions.
.TP
.B \-n, \-\-nice int
nice-level with which the encoders are started. Default is 12
which shouldn't hurt your system much.
.TP
.B \-o, \-\-overwrite
overwrite existing files, i.e. do not check if already
ripped WAVs or an already encoded file seem to be OK. Use this if
you
.B know
something went wrong last time. This is off by default.
.TP
.B \-O, \-\-only-dae
only produce WAVs, implies
.B \-\-keep-wavs.
This is off by default.
.TP
.B \-\-otf=bool
On-the-fly operation. Only on some encoders/rippers. Do not
create WAVs, pipe ripper output through the encoder. Default is
no as it's a torture for the CDROM drive.
.\" .TP
.\" .B \-\-playorder
.\" use the FreeDB PLAYORDER field to limit the tracks to
.\" rip (non-functional, sorry)
.TP
.B \-\-quality int
vbr encoding quality. \-1 is lowest, 10 highest (default 6). You can also specify a float.
.TP
.B \-q, \-\-query
do FreeDB query when all is done. This is useful if Jack was previously
run without a FreeDB query. If all tracks are done you don't even
have to have a CD inserted as the TOC is cached by Jack. After
having finished ripping and encoding, Jack will rename the files
and tag them.
.TP
.B \-\-query\-if\-needed=bool
like \-\-query-now, but only if FreeDB data hasn't been successfully
queried before.
.TP
.B \-Q, \-\-query-now
do FreeDB query when starting. Use this if you are connected to
the Internet when starting Jack. Know that the query may need
user-interaction. After having finished ripping and encoding, Jack
will rename the files and tag them.
.TP
.B \-a, \-\-read-ahead int
read how many WAVs in advance. At most read_ahead + num_encoders
WAVs are ripped before a track has completely been encoded.
Default is 99 which will read the whole CD, provided there is
enough disk space.
.TP
.B \-\-remove-files
have Jack remove its temp jack*\-files.
Be careful - don't delete them too early!
.TP
.B \-R, \-\-rename
rename and tag files according to FreeDB file. On startup, Jack
creates a blank FreeDB entry file (except if
.B \-\-query-now
is used,
then the file is queried from your FreeDB server). If you have
changed its contents (e.g. because the CD was unknown to FreeDB)
and want to rename and tag your audio files accordingly, use this option.
Give all other needed options too, like
.B \-t
,
.B \-E
, ...
.TP
.B \-\-rename-dir=bool
rename directory as well (default).
.TP
.B \-\-rename-fmt string
format of normal files (default "%n - %t")
.TP
.B \-\-rename-fmt-va string
format of Various Artists files (default "%n - %a - %t")
.TP
.B \-\-rename-num string
format of the track number (%n, printf() style) used to rename the files (default "%02d")
.TP
.B \-r, \-\-reorder=bool
optimize track-order for disk space. This can save you some peak
disk space during the encoding process; this may make it possible
to do a CD which would otherwise fail to be encoded.
.TP
.B \-\-replacement-chars list
unusable chars are replaced by the corresponding list item (default "%").
.TP
.B \-\-ripper string
which program to use for extracting the audio data (default "cdparanoia").
.TP
.B \-\-save
save options to \fI~/.jack3rc\fP file and exit. The following options are
.BR NOT
saved:
.BR \-\-todo ,
.BR \-\-check-toc ,
.BR \-\-undo-rename ,
.BR \-\-dont-work ,
.BR \-\-update-freedb ,
.BR \-\-tracks ,
.BR \-\-query-now ,
.BR \-\-query ,
.BR \-\-various ,
.BR \-\-various-swap ,
.BR \-\-extt-is-artist ,
.BR \-\-extt-is-title ,
.BR \-\-extt-is-comment ,
.BR \-\-submit ,
.BR \-\-mail-submit ,
.BR \-\-rename ,
.BR \-\-id3-genre ,
.BR \-\-id3-year ,
.BR \-\-from-tocfile ,
.BR \-\-from-image ,
.BR \-\-toc-file ,
.BR \-\-upd-progress ,
.BR \-\-multi-mode ,
.BR \-\-claim-dir ,
.BR \-\-save.
.TP
.B \-\-scan-dirs int
Scan this many
levels from the current working directory for a matching toc-file (0
to disable, default 2).
.TP
.B \-\-search list
add these directories to the list of directories searched when looking for the
workdir (default ".").
.TP
.B \-\-server string
which FreeDB server to use. Don't forget to set your HTTP proxy.
Currently either "freedb" (default) or "freedb-de".
.TP
.B \-\-silent-mode=bool
be quiet (no screen output).
.TP
.B \-s, \-\-space int
forcibly set usable disk space, in bytes. This option lets you
limit the disk space Jack uses, maybe you need it for something
else? Be careful: if set too high or too low, ripping and encoding will
probably fail. The default is to look how much is free and to use
this value.
.TP
.B \-\-submit
submit FreeDB entry via HTTP. You will have to enter the category
of the CD.
.TP
.B \-S, \-\-swab=bool
swap byte order from image file. As cdrdao momentarily only
outputs "raw" .cdr files, you quite likely want to swap the
byte order. Try this option if your WAVs and encoded files contain
only noise.
This is on by default as cdrdao currently generates .cdr files
that are "wrong".
.TP
.B \-\-todo
print what would be done and exit.
.TP
.B \-t, \-\-tracks string
limit ripping and encoding to the specified tracks, use comma to
separate tracks. Ranges are also possible; 5-9 is equivalent to
5,6,7,8,9; 12- is like specifying track 12,...,last_track. The
default is to process the whole CD.
.TP
.B \-u, \-\-undo-rename
undo file renaming and exit. If you don't like how Jack renamed
your files, use this option to restore the previous state.
Several levels of undo are possible. Note
that meta information tags are not restored.
.TP
.B \-\-unusable-chars list
characters which can't be used in filenames (default "/").
.TP
.B \-\-upd-progress
have Jack re-create its temp files. Use this if you deleted them
too early.
.TP
.B \-\-update-freedb, -U
update the FreeDB info and exit.
.TP
.B \-\-usage\-win=bool
show the help screen while running.
.TP
.B \-v, \-\-vbr=bool
Generate variable bitrate files, only on encoders which support
this. Default is yes.
.TP
.B \-\-various=bool
when parsing FreeDB data, Jack assumes that if the disc\'s artist
is set to "Various" the track titles have the format
"[artist] - [title]". If the disc title is set to something else
and you still want the above behaviour, use
.B \-\-various.
.TP
.B \-\-various-swap
exchange artist and title, many FreeDB entries have them wrong.
.TP
.B \-\-wait=bool
wait for key press before quitting.
.TP
.B \-w, \-\-workdir string
where to create directories and put the files.
.TP
.B \-\-write\-id3v1=bool
write a smart id3v1 tag to the encoded file.
.TP
.B \-\-write\-id3v2=bool
write an id3v2 tag to the encoded file.
.TP
.B \-\-write-m3u
create a playlist in .m3u format. This has bugs, don't rely on it.
.SH CONFIG FILE OPTIONS
In addition the the command line options, there are some options that
can only be set directly in the config file.
.TP
.B freedb_dir
all FreeDB queries will be done in this (local) directory; failed local
queries will be done via the network. Example: /var/spool/freedb
.SH EXAMPLES
Insert a CD, fire up jack:
.RS
jack
.RE
.PP
Now watch it work. It's fun for a while. After having finished, you have
the following files on your HD: track_01.mp3, track_02.mp3, ...,
track_nn.mp3 plus jack.toc, jack.freedb, jack.progress. The last three are
used to store the state jack is in so it can resume work when interrupted.
.PP
Jack will create a directory called jack\-xxxxxxxx for you, there it
stores all the file for the CD whose id is xxxxxxxx. After a FreeDB query
this directory is renamed to something human readable, like "Artist -
Title".
.PP
When jack is interrupted, call it again using the same command line as
before to resume work, in this case
.RS
jack
.RE
.PP
Now let's try a FreeDB query:
.RS
jack \-q
.RE
If the query is successful the files will be renamed to something more readable
and will be tagged accordingly using ID3 or Vorbis tags. The file jack.freedb
will contain the queried FreeDB entry, and the original file will be backed up
as jack.freedb.bak.
.PP
You can use the
.B \-\-rename\-fmt
option in order to specify the format of the name which will be given to
your audio tracks. A list of valid options can be found below. You may
also want to specify a set of characters which are not usable and should
be replaced. For example, on Unix systems the slash
.B (/)
should most certainly be replaced with something else. The VFAT filesystem
also does not support double quotes
.B (").
In order to replace such characters, you can specify the options
.B unusable_chars
together with
.B replacement_chars.
For example,
.RS
jack \-Q \-\-rename-fmt "%n-%t" \-\-unusable-chars A I \; \-\-replacement-chars a i \;
.RE
will query the FreeDB server, rip and encode all tracks of the CD and save
the files in a format which will contain the track number and the title.
All occurrences of the letters
.B A
and
.B I
will be replaced with their lower-case versions. These options can also be
put in one's configuration file using the following format:
.RS
unusable_chars:[\(aq \(aq, \(aq/\(aq]
.RE
.RS
replacement_chars:[\(aq_\(aq, \(aq_\(aq]
.RE
This will replace whitespace and slashes with underscores. If you want to
convert all characters to lower-case, you don't have to manually specify
all of them but can use the following option instead:
.RS
char_filter:.lower()
.RE
.PP
All in one: query, rip, encode, cleanup:
.RS
jack \-Q \-\-remove-files
.RE
.PP
Editing / normalizing / stripping the WAV files before encoding:
.RS
jack \-O \-D \-\-remove-files ; gnoise *wav ; jack \-g *wav ; jack
.RE
Just replace gnoise by the operation you'd like to perform.
.SH PLUG-INS
Additional rippers, encoders and FreeDB servers currently not known by jack
can be defined using jack's plug-in mechanism. Plug-ins have to be put in
the
.BR ~/.jack_plugins
directory (or the path defined by the
.BR plugin_path
option). The plug-ins are simple Python scripts which define a hash with
the values for your ripper, encoder or FreeDB server. For rippers and
encoders, the hash
.BR plugin_helpers
has to be defined while additional FreeDB servers are specified in
.BR plugin_freedb_servers .
Both expect another hash whose names corresponds to the entry you want to
add (prefixed by
.BR plugin_ )
and have to define certain values. Two examples are provided,
.BR jack_plugin_cddb.py
(to define a new FreeDB server) and
.BR jack_plugin_lame.py
(to show how rippers and encoders can be defined). After defining
plug-ins, you have to manually select them by specifying the ripper,
encoder, or CDDB server. An example would be:
.RS
jack \-\-encoder-name plugin_lame \-\-ripper plugin_foo \-\-server plugin_cddb
.RE
Plug-ins can also be used to define your own rippers and encoders which
uses different options than those used by default by jack.
.SH ENVIRONMENT VARIABLES
There are several environment variables which can be used in jack's exec
hooks:
.IP JACK_BASE_DIR
lists jack's base directory in which files are stored.
.IP JACK_CUR_DIR
lists the current directory of jack in which files of the current album are
put.
.IP JACK_JUST_ENCODED
lists all track names which have just been encoded.
.IP JACK_JUST_RIPPED
lists all track names which have just been ripped.
.SH FORMAT STRINGS
.IP %n
Track number
.IP %a
Artist
.IP %t
Track title
.IP %l
Album title
.IP %y
Album release year
.IP %g
Album genre
.SH FILES
.IP \fI/etc/jackrc\fP
Site-wide configuration file.
.IP \fI~/.jack3rc\fP
User-specific configuration file. Use the
.B \-\-save
option to save your configuration to this file.
.SH AUTHOR
Arne Zellentin <[email protected]> is the author of Jack.
.SH SEE ALSO
.BR cdparanoia (1),
.BR cdda2wav (1),
.BR flac (1),
.BR oggenc (1)
and
.BR lame (1)