From: gobo72 Date: Fri, 30 Dec 2011 17:10:42 +0000 (+0000) Subject: Améliorations scripts conversion flac X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=8e53f0b487073f1ccfa7e59484e9b926881bad2d;p=hvlinux.git Améliorations scripts conversion flac --- diff --git a/stage2/hv-utilities/flac2mp3 b/stage2/hv-utilities/flac2mp3 index 1dcf400..5846f73 100755 --- a/stage2/hv-utilities/flac2mp3 +++ b/stage2/hv-utilities/flac2mp3 @@ -1,9 +1,11 @@ #!/bin/bash -# default = 4. 0 = highest quality. -VBR_QUALITY="-V4" +# default = 4 +# 0 = highest quality. +VBR_QUALITY="-V0" LAME_OPTS="--noreplaygain ${VBR_QUALITY} --add-id3v2 --pad-id3v2 \ --ignore-tag-errors" +METAFLAC="metaflac" print_usage() { @@ -27,14 +29,18 @@ fi OUTF=`echo "$a" | sed s/\.flac$/.mp3/g` -ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g` -TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g` -ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g` -GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g` -TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g` -DATE=`metaflac "$a" --show-tag=DATE | sed s/.*=//g` +ARTIST=`${METAFLAC} "$a" --show-tag=ARTIST | sed s/.*=//g` +TITLE=`${METAFLAC} "$a" --show-tag=TITLE | sed s/.*=//g` +ALBUM=`${METAFLAC} "$a" --show-tag=ALBUM | sed s/.*=//g` +GENRE=`${METAFLAC} "$a" --show-tag=GENRE | sed s/.*=//g` +TRACKNUMBER=`${METAFLAC} "$a" --show-tag=TRACKNUMBER | sed s/.*=//g` +DATE=`${METAFLAC} "$a" --show-tag=DATE | sed s/.*=//g` flac -c -d "$a" | lame ${LAME_OPTS} \ - --tt "$TITLE" --tn "${TRACKNUMBER:-0}" --ta "$ARTIST" \ - --tl "$ALBUM" --ty "$DATE" --tg "${GENRE:-12}" \ + --tt "$TITLE" \ + --tn "${TRACKNUMBER:-0}" \ + --ta "$ARTIST" \ + --tl "$ALBUM" \ + --ty "$DATE" \ + --tg "${GENRE:-12}" \ - "$OUTF" diff --git a/stage2/hv-utilities/flac2ogg b/stage2/hv-utilities/flac2ogg index 528ebb4..08495d9 100755 --- a/stage2/hv-utilities/flac2ogg +++ b/stage2/hv-utilities/flac2ogg @@ -3,6 +3,7 @@ # default = 3. OGG_QUALITY="4" OGGENC_OPTS="-q ${OGG_QUALITY}" +METAFLAC="metaflac" print_usage() { @@ -26,14 +27,18 @@ fi OUTF=`echo "$a" | sed s/\.flac$/.ogg/g` -ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g` -TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g` -ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g` -GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g` -TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g` -DATE=`metaflac "$a" --show-tag=DATE | sed s/.*=//g` +ARTIST=`${METAFLAC} "$a" --show-tag=ARTIST | sed s/.*=//g` +TITLE=`${METAFLAC} "$a" --show-tag=TITLE | sed s/.*=//g` +ALBUM=`${METAFLAC} "$a" --show-tag=ALBUM | sed s/.*=//g` +GENRE=`${METAFLAC} "$a" --show-tag=GENRE | sed s/.*=//g` +TRACKNUMBER=`${METAFLAC} "$a" --show-tag=TRACKNUMBER | sed s/.*=//g` +DATE=`${METAFLAC} "$a" --show-tag=DATE | sed s/.*=//g` flac -c -d "$a" | oggenc ${OGGENC_OPTS} \ - -t "$TITLE" -N "${TRACKNUMBER:-0}" -a "$ARTIST" \ - -l "$ALBUM" -d "$DATE" -G "${GENRE:-12}" \ + -t "$TITLE" \ + -N "${TRACKNUMBER:-0}" \ + -a "$ARTIST" \ + -l "$ALBUM" \ + -d "$DATE" \ + -G "${GENRE:-12}" \ -o "$OUTF" -