implement MP3 encoding

This commit is contained in:
Vincent Riquer 2013-03-14 14:11:57 +01:00
parent 3e1b6bc1c0
commit a59a9915ce

26
atom
View File

@ -1068,14 +1068,24 @@ getDestFile() {
fi
}
transcodeFile() {
#sox -> wav
for format in $targets["format"]
do
#encodeFile::$format
:
done
#signal and of encoding to parent
encodeFile::mp3() {
lameopts="--quiet -v --abr ${destinationquality[$destination]}"
[ -n "$album" ] && lameopts+=" --tl \"$album\""
[ -n "$artist" ] && lameopts+=" --ta \"$artist\""
[ -n "$genre" ] && lameopts+=" --tg \"$genre\""
[ -n "$title" ] && lameopts+=" --tt \"$title\""
[ -n "$track" ] && lameopts+=" --tn \"$track\""
[ -n "$year" ] && lameopts+=" --ty \"$year\""
encodetaskid=$(
Insert tasks <<-EOInsert
key ${fileid}lame$destination
requires ${soxtaskid:-$decodetaskid}
command_line lame $lameopts "$tempdir/$tmpfile.wav" "$destdir/$destfile.mp3"
source_file $fileid
status 0
EOInsert
)
progressSpin
}
checkFinished() {