From 6fba8f1211e36abc72e6c6b61523b419c4ca2d4e Mon Sep 17 00:00:00 2001 From: data Date: Thu, 6 Oct 2005 22:01:39 +0000 Subject: [PATCH] r195@frost: data | 2005-10-07 01:01:30 +0300 Reverted replaygain as an action, since it can be performed uniquely. Added -B to disable batch replaygain. Still not introduced the code. Other typos and bugs? Documentation changes. Added mp3gain as a Suggests: git-svn-id: http://abcde.googlecode.com/svn/trunk@140 a0fa61bc-5347-0410-a1a9-7f54aa4e1825 --- abcde | 31 ++++++++++++++----------- abcde.1 | 59 ++++++++++++++++++++++++++++++------------------ debian/changelog | 4 +++- debian/control | 2 +- 4 files changed, 59 insertions(+), 37 deletions(-) diff --git a/abcde b/abcde index def090c..21dff41 100755 --- a/abcde +++ b/abcde @@ -20,9 +20,10 @@ echo "Usage: abcde [options] [tracks]" echo "Options:" echo "-1 Encode the whole CD in a single file" echo "-a " -echo " Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)" +echo " Actions to perform (cddb,read,normalize,encode,tag,move,replaygain,playlist,clean)" #echo "-A Experimental actions (retag, transcode)" echo "-b Enable batch normalization" +#echo "-B Disable batch replaygain (do file by file)" echo "-c " echo " Specify a configuration file (overrides system and user config files)" echo "-C " @@ -50,7 +51,7 @@ echo "-p Pad track numbers with 0's (if less than 10 tracks)" echo "-P Use UNIX pipes to read+encode without wav files" echo "-r " echo " Also encode on these remote hosts" -echo "-R Add replaygain values to the tag info (only for vorbis,flac)" +#echo "-R Add replaygain values to the tag info (only for vorbis,flac,mp3)" echo "-s " echo " Show dielfs from the CDDB info (year,genre)" echo "-S <#> Set the CD speed" @@ -366,7 +367,6 @@ do_replaygain() if checkstatus replaygain; then :; else run_command "" echo "Adding replygain information..." for OUTPUT in $( echo $OUTPUTTYPE | tr , \ ) - # THE OUTPUT NEEDS TO BE CORRECTED WITH THE CONTAINER? do case $OUTPUT in vorbis|ogg) @@ -400,10 +400,13 @@ do_replaygain() vorbis|ogg) run_command replaygain-vorbis $VORBISGAIN --album $OUTPUTFILES ;; + mp3) + run_command replaygain-mp3 $MP3GAIN -a $OUTPUTFILES + ;; *);; esac done - if checkerrors replaygain-.{3,6}; then :; else + if checkerrors "replaygain-.{3,6}"; then :; else run_command replaygain true fi fi @@ -2399,6 +2402,7 @@ METAFLAC=metaflac NORMALIZE=normalize-audio CDSPEED=eject VORBISGAIN=vorbisgain +MP3GAIN=mp3gain MKCUE=mkcue MKTOC=cdrdao DIFF=diff @@ -2528,12 +2532,13 @@ fi # Parse command line options #while getopts 1a:A:bc:C:d:Dehj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W: opt ; do -while getopts 1a:bc:C:d:Defghj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W:z opt ; do +while getopts 1a:bBc:C:d:Defghj:klLmMnNo:pPr:s:S:t:T:vVxw:W:z opt ; do case "$opt" in 1) ONETRACK=y ;; a) ACTIONS="$OPTARG" ;; A) EXPACTIONS="$OPTARG" ;; b) BATCHNORM=y ;; + B) NOBATCHREPLAYGAIN=y ;; c) if [ -e "$OPTARG" ] ; then . "$OPTARG" ; else log error "config file \"$OPTARG\" cannot be found." ; exit 1 ; fi ;; C) DISCID="${OPTARG#abcde.}" ;; d) CDROM="$OPTARG" ;; @@ -2557,7 +2562,7 @@ while getopts 1a:bc:C:d:Defghj:klLmMnNo:pPr:Rs:S:t:T:vVxw:W:z opt ; do p) PADTRACKS=y ;; P) USEPIPES=y ;; r) REMOTEHOSTS="$OPTARG" ;; - R) REPLAYGAIN=y ;; + R) DOREPLAYGAIN=y ;; s) SHOWCDDBFIELDS="$OPTARG" ;; S) CDSPEEDVALUE="$OPTARG" ;; # t) PREPROCESSFORMATS="$OPTARG" @@ -2672,7 +2677,7 @@ done if [ "$DONORMALIZE" = "y" ] && [ "$DOREPLAYGAIN" = "y" ]; then # FIXME # should we abort on error or just inform the user? - : + log warning "selected both normalize and replaygain actions" fi for SHOWCDDBFIELD in $(echo $SHOWCDDBFIELDS | tr , \ ); do @@ -2838,17 +2843,18 @@ do vorbis|ogg) [ "$OGGENCODERSYNTAX" = "default" ] && OGGENCODERSYNTAX=oggenc [ "$DOTAG" = "y" ] && NEEDCOMMENTER=y - [ "$REPLAYGAIN" = "y" ] && NEEDVORBISGAIN=y + [ "$DOREPLAYGAIN" = "y" ] && NEEDVORBISGAIN=y OGGOUTPUTCONTAINER=ogg ;; mp3) [ "$MP3ENCODERSYNTAX" = "default" ] && MP3ENCODERSYNTAX=lame [ "$DOTAG" = "y" ] && NEEDTAGGER=y + [ "$DOREPLAYGAIN" = "y" ] && NEEDMP3GAIN=y ;; flac) [ "$FLACENCODERSYNTAX" = "default" ] && FLACENCODERSYNTAX=flac - [ "$REPLAYGAIN" = "y" ] && NEEDMETAFLAC=y [ "$DOTAG" = "y" ] && NEEDMETAFLAC=y + [ "$DOREPLAYGAIN" = "y" ] && NEEDMETAFLAC=y ;; spx) [ "$SPEEXENCODERSYNTAX" = "default" ] && SPEEXENCODERSYNTAX=speexenc @@ -3043,7 +3049,6 @@ if [ "$USEPIPES" = "y" ]; then log error "On a Debian system, it is under /usr/share/doc/abcde/USEPIPES.gz" exit 1; fi - vecho PIPES: "$( eval echo "\$$PIPEENCODERSVARCHECK" )" if [ "$( eval echo "\$$PIPEENCODERSVARCHECK" )" = "$" ] ; then log error "no support for pipes with given encoder" log error "read the USEPIPES file from the source tarball to help" @@ -3059,8 +3064,8 @@ for X in $CDROMREADER $CDDISCID ${NEEDTAGGER+$TAGGER} $MP3ENCODER \ ${NEEDCOMMENTER+$VORBISCOMMENT} ${NEEDMETAFLAC+$METAFLAC} \ ${NEEDNORMALIZER+$NORMALIZER} ${NEEDEJECT+$EJECT} \ ${NEEDDISKTOOL+disktool} ${NEEDCDSPEED+$CDSPEED} \ - ${NEEDVORBISGAIN+$VORBISGAIN} ${NEEDCUEREADER+$CUEREADER} \ - ${NEEDCUE2DISCID+$CUE2DISCID} + ${NEEDVORBISGAIN+$VORBISGAIN} ${NEEDMP3GAIN+$MP3GAIN} \ + ${NEEDCUEREADER+$CUEREADER} ${NEEDCUE2DISCID+$CUE2DISCID} do # Cut off the command-line options we just added in X=$(echo $X | cut -d' ' -f2) @@ -3440,7 +3445,7 @@ if [ "$DOENCODE" = "y" -a "$USEPIPES" != "y" ]; then fi # If the above didn't catch the stragglers, this will wait -if [ "$REPLAYGAIN" = "y" ]; then +if [ "$DOREPLAYGAIN" = "y" ]; then do_replaygain fi # Check to see if run_command logged any errors diff --git a/abcde.1 b/abcde.1 index ece9eb7..18a766d 100644 --- a/abcde.1 +++ b/abcde.1 @@ -16,16 +16,22 @@ Audio Codec (FLAC), Ogg/Speex or MPP/MP+(Musepack). With one command, it will: Do a CDDB query over the Internet to look up your CD or use a locally stored CDDB entry .TP .B * -Grab a track from your CD +Grab an audio track (or all the audio CD tracks) from your CD .TP .B * -Compress it to Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) format +Normalize the volume of the individual file (or the album as a single unit) .TP .B * -Comment or ID3 tag it +Compress to Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) format(s), all in one CD read .TP .B * -Give it an intelligible filename +Comment or ID3/ID3v2 tag +.TP +.B * +Give an intelligible filename +.TP +.B * +Calculate replaygain values for the individual file (or the album as a single unit) .TP .B * Delete the intermediate WAV file (or save it for later use) @@ -41,14 +47,19 @@ the file can be used as a source for creating other formats. .TP .B \-a [actions] Comma-delimited list of actions to perform. Can be one or more of: -cddb, read, normalize, encode, tag, move, playlist, clean. Normalize +cddb, read, normalize, encode, tag, move, replaygain, playlist, clean. Normalize and encode imply read. Tag implies cddb, read, encode. Move implies -cddb, read, encode, tag. Playlist implies cddb. The default is to -do all actions except normalize and playlist. +cddb, read, encode, tag. Replaygain implies cddb, read, encode, tag and move. +Playlist implies cddb. The default is to do all actions except normalize, +replaygain and playlist. .TP .B \-b Enable batch mode normalization. See the BATCHNORM configuration variable. .TP +.B \-B +Disable batch mode replaygain. It processes file by file to add the replaygain +information. See the NOBATCHREPLAYGAIN configuration vatiable. +.TP .B \-c [filename] Specifies an additional configuration file to parse. Configuration options in this file override those in /etc/abcde.conf or $HOME/.abcde.conf. @@ -112,11 +123,11 @@ If the cuesheet is embeded in a flac single file it can be used as source for encoding other formats. .TP .B \-o [filetype][:filetypeoptions] -Select output type. Can be "vorbis" (or "ogg"), "mp3", "flac", "spx" or "mpc". -Specify a comma-delimited list of output types to obtain all specified types. -See the OUTPUTTYPE configuration variable. One can pass options to the encoder -for a specific filetype on the command line separating them with a colon. The -options must be escaped with double-quotes. +Select output type. Can be "vorbis" (or "ogg"), "mp3", "flac", "spx", "mpc" or +"wav". Specify a comma-delimited list of output types to obtain all specified +types. See the OUTPUTTYPE configuration variable. One can pass options to the +encoder for a specific filetype on the command line separating them with a +colon. The options must be escaped with double-quotes. .TP .B \-p Pads track numbers with 0\'s. @@ -125,10 +136,6 @@ Pads track numbers with 0\'s. Remote encode on this comma-delimited list of machines using distmp3. See the REMOTEHOSTS configuration variable. .TP -.B \-R -Add replaygain information to the id3 or tag information for play -normalization. Only works with Ogg/FLAC and Ogg/Vorbis. -.TP .B \-s [fields...] List, separated by comas, the fields to be shown in the CDDB parsed entries. Right now it only uses "year" and "genre". @@ -172,7 +179,7 @@ Each track is, by default, placed in a separate file named after the track in a subdirectory named after the artist under the current directory. This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT variables in your abcde.conf. Each file is given an extension identifying -its compression format, 'vorbis' for '.ogg', '.mp3', '.flac', '.spx', or '.mpc'. +its compression format, 'vorbis' for '.ogg', '.mp3', '.flac', '.spx', '.mpc', or '.wav'. .SH CONFIGURATION abcde sources two configuration files on startup - /etc/abcde.conf and $HOME/.abcde.conf, in that order. @@ -260,7 +267,7 @@ we only support \'mkcue\', but in the future other readers might be used. .B KEEPWAVS It defaults to no, so if you want to keep those wavs ripped from your CD, set it to "y". You can use the "-k" switch in the command line. The default -behaviour with KEEPWAVS set is the keep the temporary directory and the wav +behaviour with KEEPWAVS set is to keep the temporary directory and the wav files even you have requested the "clean" action. .TP .B PADTRACKS @@ -319,8 +326,9 @@ over 100MB for a machine that can encode music as fast as it can read it). Specifies the encoding format to output, as well as the default extension and encoder. Defaults to "vorbis". Valid settings are "vorbis" (or "ogg") (Ogg/Vorbis), "mp3" (MPEG-1 Audio Layer III), "flac" (Free Lossless Audio -Codec), "spx" (Ogg/Speex) and "mpc" (MPP/MP+ (Musepack)). Values like -"vorbis,mp3" encode the tracks in both Ogg/Vorbis and MP3 formats. +Codec), "spx" (Ogg/Speex), "mpc" (MPP/MP+ (Musepack)) or "wav" (Microsoft +Waveform). Values like "vorbis,mp3" encode the tracks in both Ogg/Vorbis and +MP3 formats. .br For each value in OUTPUTTYPE, abcde expands a different process for encoding, tagging and moving, so you can use the format placeholder, OUTPUT, to create @@ -476,7 +484,10 @@ An HTTP retrieval program: wget, fetch (FreeBSD) or curl (Mac OS X, among others (optional) distmp3, a client/server for distributed mp3 encoding. .TP .B * -(optional) normalize, a WAV file volume normalizer. +(optional) normalize-audio, a WAV file volume normalizer. +.TP +.B * +(optional) a replaygain file volume modifier (vorbisgain, metaflac, mp3gain), .TP .B * (optional) mkcue, a CD cuesheet extractor. @@ -488,16 +499,20 @@ An HTTP retrieval program: wget, fetch (FreeBSD) or curl (Mac OS X, among others .BR oggenc (1), .BR vorbize (1), .BR flac (1), +.BR toolame (1), .BR speexenc (1), .BR mppenc (1), .BR id3 (1), +.BR id3v2 (1), .BR wget (1), .BR fetch (1), .BR cd-discid (1), .BR distmp3 (1), .BR distmp3host (1), -.BR curl (1) +.BR curl (1), .BR mkcue (1), +.BR vorbisgain (1), +.BR mp3gain (1) .SH AUTHORS Robert Woodcock , Jesus Climent and contributions from many others. diff --git a/debian/changelog b/debian/changelog index 588a32e..a77c600 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,8 +12,10 @@ abcde (2.3.99-1) unstable; urgency=low -b, to use the -a normalize in all the files at once, and NOGAP, that by using -g, introduces the lame's --nogap extension. * Added replygain using the appropiate tags with Ogg/Vorbis and Ogg/FLAC. + * Replaygain is an action, not a flag, since it can be performed individualy + in the chain of events. - -- Jesus Climent Thu, 6 Oct 2005 15:38:04 +0300 + -- Jesus Climent Fri, 7 Oct 2005 00:59:07 +0300 abcde (2.3.4-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 61b0068..77fb970 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper Package: abcde Architecture: all Depends: cd-discid, wget, cdparanoia | cdda2wav, vorbis-tools (>= 1.0beta4-1) | lame | flac | bladeenc | speex -Suggests: eject, distmp3, id3 (>= 0.12), id3v2, eyed3, normalize-audio, vorbisgain, mkcue +Suggests: eject, distmp3, id3 (>= 0.12), id3v2, eyed3, normalize-audio, vorbisgain, mkcue, mp3gain Description: A Better CD Encoder A frontend program to cdparanoia, wget, cd-discid, id3, and your favorite Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) encoder (defaults -- 2.20.1