--- /dev/null
+#!/bin/bash
+
+# default = 4. 0 = highest quality.
+VBR_QUALITY="-V4"
+LAME_OPTS="--noreplaygain ${VBR_QUALITY} --add-id3v2 --pad-id3v2 \
+ --ignore-tag-errors"
+
+print_usage()
+{
+ echo "$(basename $0) -- Translates FLAC file to MP3."
+ echo "Usage: $(basename $0) flac-file"
+}
+
+if [ $# = 0 ]; then
+ print_usage
+ exit 1
+fi
+
+a=${1}
+
+# Checking if input file exist.
+if [ ! -f $1 ]; then
+ echo "$0: File $a not found."
+ print_usage
+ exit 1
+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`
+
+flac -c -d "$a" | lame ${LAME_OPTS} \
+ --tt "$TITLE" --tn "${TRACKNUMBER:-0}" --ta "$ARTIST" \
+ --tl "$ALBUM" --ty "$DATE" --tg "${GENRE:-12}" \
+ - "$OUTF"
--- /dev/null
+#!/bin/bash
+
+# default = 3.
+OGG_QUALITY="4"
+OGGENC_OPTS="-q ${OGG_QUALITY}"
+
+print_usage()
+{
+ echo "$(basename $0) -- Translates FLAC file to OGG."
+ echo "Usage: $(basename $0) flac-file"
+}
+
+if [ $# = 0 ]; then
+ print_usage
+ exit 1
+fi
+
+a=${1}
+
+# Checking if input file exist.
+if [ ! -f $1 ]; then
+ echo "$0: File $a not found."
+ print_usage
+ exit 1
+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`
+
+flac -c -d "$a" | oggenc ${OGGENC_OPTS} \
+ -t "$TITLE" -N "${TRACKNUMBER:-0}" -a "$ARTIST" \
+ -l "$ALBUM" -d "$DATE" -G "${GENRE:-12}" \
+ -o "$OUTF" -
dos2unix dvd-ram-format fix-avi gztobz2 hv-backup hv-video-dvd \
mail-files mail-if-fail mail-statistics media-write pstopdf \
replace.pl rotatelogs setdate strip-debug-symbols tarbz2 \
- tildes-clean vd vs"
+ tildes-clean vd vs flac2ogg flac2mp3"
for program in ${BIN_UTILITIES}; do
install -v ${SRCDIR}/${program} ${BINDIR}