.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MP3CD 1p" .TH MP3CD 1p "2011-01-18" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" mp3cd \- Burns normalized audio CDs from lists of MP3s/WAVs/Oggs/FLACs .SH "SYNOPSIS" .IX Header "SYNOPSIS" mp3cd [\s-1OPTIONS\s0] [playlist|files...] .PP .Vb 10 \& \-s, \-\-stage STAGE Start at a certain stage of processing: \& clean Start fresh (default, requires playlist) \& build Does not clean (requires playlist) \& decode Turns MP3s/Oggs/FLACs into WAVs \& correct Fix up any WAV formats \& norm Normalizes WAV volumes \& toc Builds a Table of Contents from WAVs \& toc_ok Checks TOC validity \& cdr_ok Checks for a CDR \& burn Burns from the TOC \& \-q Quits after one stage of processing \& \-t, \-\-tempdir DIR Set working dir (default "/tmp/mp3cd\-$USER") \& \-d, \-\-device PATH Look for CDR at "PATH" (default "/dev/cdrecorder") \& \-r, \-\-driver TYPE Use CDR driver TYPE (default up to cdrdao) \& \-n, \-\-simulate Don\*(Aqt actually burn a disc but do everything else. \& \-E, \-\-no\-eject Don\*(Aqt eject drive after the burn. \& \-L, \-\-no\-log Don\*(Aqt redirect output to "tool\-output.txt" \& \-T, \-\-no\-cd\-text Don\*(Aqt attempt to write CD\-TEXT tags to the audio CD \& \-c, \-\-cdrdao ARGS Pass the option string ARGS to cdrdao. \& \-S, \-\-skip STAGES Skip the comma\-separated list of stages in STAGES. \& \-V, \-\-version Report which version of the script this is. \& \-v, \-\-verbose Shows commands as they are executed. \& \-h, \-\-usage Shows brief usage summary. \& \-\-help Shows detailed help summary. \& \-\-longhelp Shows complete help. .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-s \s-1STAGE\s0\fR, \fB\-\-stage \s-1STAGE\s0\fR" 8 .IX Item "-s STAGE, --stage STAGE" Starts processing at a given stage. This is used in case you had to stop processing, or a file was missing, or things generally blew up. It is especially useful if a burn fails because then you don't have to start totally over and re-WAV the files. If you just want to perform a single step, use \fB\-\-quit\fR to abort after the stage you request with \fB\-\-stage\fR. Also see \fB\-\-skip\fR. .RS 8 .IP "\fBclean\fR" 8 .IX Item "clean" This is the default starting stage. The temp directory is cleared out. A playlist is required, since we expect to move to the \fBbuild\fR stage next, which requires it. .IP "\fBbuild\fR" 8 .IX Item "build" This stage examines the playlist from the command line, and tries to create a list of symlinks from the given playlist. So far, \f(CW\*(C`mp3cd\*(C'\fR can understand \*(L".m3u\*(R" files, XMLPlaylist files, and lists of files. .IP "\fBdecode\fR" 8 .IX Item "decode" All the files are converted into WAVs. So far, \f(CW\*(C`mp3cd\*(C'\fR knows how to decode \s-1MP3\s0, Ogg, and \s-1FLAC\s0 files. (WAVs will be left as they are during this stage.) .IP "\fBcorrect\fR" 8 .IX Item "correct" The \s-1WAV\s0 files are corrected to have the correct bitrate and number of channels, as required for an audio \s-1CD\s0. .IP "\fBnorm\fR" 8 .IX Item "norm" The \s-1WAV\s0 files' volumes are normalized so any large differences in volume between records will be less noticeable. .IP "\fBtoc\fR" 8 .IX Item "toc" Generates a Table of Contents for the audio \s-1CD\s0. .IP "\fBtoc_ok\fR" 8 .IX Item "toc_ok" Validates the \s-1TOC\s0, just in case something went really wrong with the \s-1WAV\s0 files. .IP "\fBcdr_ok\fR" 8 .IX Item "cdr_ok" Verifies that there is a \s-1CDR\s0 ready for burning. .IP "\fBburn\fR" 8 .IX Item "burn" Actually performs the burn of all the \s-1WAV\s0 files to the waiting \s-1CDR\s0. .RE .RS 8 .RE .IP "\fB\-q\fR, \fB\-\-quit\fR" 8 .IX Item "-q, --quit" Aborts after one stage of processing. See \fB\-\-stage\fR. .IP "\fB\-t \s-1DIR\s0\fR, \fB\-\-tempdir \s-1DIR\s0\fR" 8 .IX Item "-t DIR, --tempdir DIR" Use a working directory other than "/tmp/mp3cd\-\fBusername\fR". This is where all the file processing occurs. You will generally need at least 650M free here (or more depending on the recording length of your destination \&\s-1CD\s0). .IP "\fB\-d \s-1PATH\s0\fR, \fB\-\-device \s-1PATH\s0\fR" 8 .IX Item "-d PATH, --device PATH" Use a device path other than \*(L"/dev/cdrecorder\*(R". .IP "\fB\-r \s-1TYPE\s0\fR, \fB\-\-driver \s-1TYPE\s0\fR" 8 .IX Item "-r TYPE, --driver TYPE" Use a \s-1CDRDAO\s0 driver other than what cdrdao automatically detects. Note that some drivers may not support CD-TEXT mode. In this case, try \*(L"generic-mmc-raw\*(R". .IP "\fB\-c \s-1ARGS\s0\fR, \fB\-\-cdrdao \s-1ARGS\s0\fR" 8 .IX Item "-c ARGS, --cdrdao ARGS" Pass the given option string of \s-1ARGS\s0 to cdrdao during each command. .IP "\fB\-n\fR, \fB\-\-simulate\fR" 8 .IX Item "-n, --simulate" Do not actually write to the disc but simulate the process instead. .IP "\fB\-E\fR, \fB\-\-no\-eject\fR" 8 .IX Item "-E, --no-eject" Don't eject drive after the burn. .IP "\fB\-L\fR, \fB\-\-no\-log\fR" 8 .IX Item "-L, --no-log" Don't redirect output to \*(L"tool\-output.txt\*(R". All information will instead be redirected to the terminal via standard output (\s-1STDOUT\s0). This will cause a lot of low-level detail to be displayed. .IP "\fB\-T\fR, \fB\-\-no\-cd\-text\fR" 8 .IX Item "-T, --no-cd-text" Don't attempt to write CD-TEXT tags to the audio \s-1CD\s0. Some devices and drivers do not support this mode. See \fB\-\-driver\fR for more details. .IP "\fB\-S \s-1STAGES\s0\fR, \fB\-\-skip \s-1STAGES\s0\fR" 8 .IX Item "-S STAGES, --skip STAGES" While processing, skips the stages listed in the comma-separated list of stages given in \s-1STAGES\s0. This would only be used if you really know what you're doing. For example, if the audio is already normalized and you didn't want to burn a \s-1CD\s0, you could skip the normalizing and burning stages by giving \*(L"\-\-skip norm,burn\*(R". See \fB\-\-stage\fR and \fB\-\-quit\fR. .IP "\fB\-V\fR, \fB\-\-version\fR" 8 .IX Item "-V, --version" Report which version of mp3cd this is. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 8 .IX Item "-v, --verbose" Shows commands as they are executed. .IP "\fB\-h\fR, \fB\-\-usage\fR" 8 .IX Item "-h, --usage" Show brief usage summary. .IP "\fB\-\-help\fR" 8 .IX Item "--help" Show detailed help summary. .IP "\fB\-\-longhelp\fR" 8 .IX Item "--longhelp" Shows the full command line instructions. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This script implements the suggested methods outlined in the Linux \s-1MP3\s0 \s-1CD\s0 Burning mini-HOWTO: http://tldp.org/HOWTO/MP3\-CD\-Burning/ .PP This will burn a playlist (.m3u, XMLPlaylist or command line list) of MP3s, Oggs, FLACs, and/or WAVs to an audio \s-1CD\s0. The \*(L".m3u\*(R" format is really nothing more than a list of fully qualified filenames. The script handles making the WAVs sane by resampling if needed, and normalizing the volume across all tracks. .PP If a failure happens, earlier stages can be skipped with the '\-s' flag. The file \*(L"tool\-output.txt\*(R" in the temp directory can be examined to see what went wrong during the stage. Some things are time-consuming (like decoding the audio into WAVs) and if the \s-1CD\s0 burn fails, it's much nicer not to have to start over from scratch. When doing this, you will not need the m3u file any more, since the files have already been built. See the list of stages using \&'\-h'. .SH "PREREQUISITES" .IX Header "PREREQUISITES" Requires \f(CW\*(C`cdrdao\*(C'\fR, and that /dev/cdrecorder is a valid symlink to the /dev/sg device that cdrdao will use. Use .cdrdao to edit driver options. (See \*(L"man cdrdao\*(R" for details.) .PP Requires \f(CW\*(C`sox\*(C'\fR to decode \s-1MP3\s0 and check/correct \s-1WAV\s0 formats. http://www.spies.com/Sox/ .PP Requires \f(CW\*(C`normalize\*(C'\fR to process the audio. http://www.cs.columbia.edu/~cvaill/normalize/ .PP Optionally requires \f(CW\*(C`oggdec\*(C'\fR to decode Ogg to \s-1WAV\s0 files. http://www.gnu.org/directory/audio/ogg/OggEnc.html/ .PP Optionally requires \f(CW\*(C`flac\*(C'\fR to decode flac to \s-1WAV\s0 files. http://flac.sourceforge.net/ .PP Optionally requires \f(CW\*(C`Config::Simple\*(C'\fR Perl module if you want to use the .mp3cdrc file. http://search.cpan.org/~sherzodr/Config\-Simple/ .SH "FILES" .IX Header "FILES" .IP "\fB~/.mp3cdrc\fR" 8 .IX Item "~/.mp3cdrc" Default options can be recorded in this file. The option names are the same as their command line long-name. Command line options will override these values. All options are run through perl's eval. For example: tempdir: /scratch/mp3cd/$ENV{'\s-1USER\s0'} device: /dev/burner .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Kees Cook \& \& Contributors: \& \& J. Katz (Ogg support) \& Alex Rhomberg (XMLPlaylist support) \& Kevin C. Krinke (filelist inspiration, and countless many patches) \& James Greenhalgh (flac support) .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), \fIcdrdao\fR\|(1), \fIsox\fR\|(1), \fIoggdec\fR\|(1), \fIflac\fR\|(1), \fIsox\fR\|(1), \fInormalize\fR\|(1). .SH "COPYRIGHT" .IX Header "COPYRIGHT" .Vb 2 \& Copyright (C) 2003\-2011 Kees Cook \& kees@outflux.net, http://outflux.net/ \& \& This program is free software; you can redistribute it and/or \& modify it under the terms of the GNU General Public License \& as published by the Free Software Foundation; either version 2 \& of the License, or (at your option) any later version. \& \& This program is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \& GNU General Public License for more details. \& \& You should have received a copy of the GNU General Public License \& along with this program; if not, write to the Free Software \& Foundation, Inc., 59 Temple Place \- Suite 330, Boston, MA 02111\-1307, USA. \& http://www.gnu.org/copyleft/gpl.html .Ve