You are not logged in.
Pages: 1
i like flac...but mp3 seems to be the most commonly used format (ogg is a closing second)
all the songs on my system are in flac (thanks to the recomendation of a fellow archlinux user from #archlinux)
now to make an mp3 from those files
:: ahem ::
fSlash='/'
function notAForwardSlash
{
if [[ $1 != $fSlash ]]
then
return 0
else
return 1
fi
}
### end notAForwardSlash ###
function getFileName
{
STRING="${1}"
LENGTH=${#STRING}
# echo "${STRING}: is ${LENGTH} long"
for ((n=0;n <= $LENGTH; n++))
do
CHAR=${STRING:$n:1}
if notAForwardSlash $CHAR
then
FileName="${FileName}${CHAR}"
else
FileName=""
fi
# echo "${FileName}"
done
}
### end getFileName ###
# call like
# encode_mp3 "/music/flac/Smile Empty Soul/Shadow Zone/Monster.flac" "/music/mp3/Smile Empty Soul/Shadow Zone"
function encode_mp3
{
old_file="${1}"
new_dir="${2}"
getFileName "${old_file}"
new_file="${FileName:0:${#FileName}-5}.mp3"
# this is the important part of this script
# the actual encoding
# the rest is just stuff to make it easier and less tedious
flac -d -o - "${old_file}" | lame -b 320 -h - > "${new_dir}/${new_file}"
}
i wrote more about this here
you can see this inside my whole script here
hope this helps someone out there
Offline
It's even more simple, install gst-plugins-flac and gst-plugins-lame and then use this:
gst-launch filesrc location=music.flac ! decodebin ! lame ! filesink location=music.mp3
Offline
cool, this is coming in handy. I either have too much music or not enough space to store it as flac files! btw some of your links are dead. but I found it anyway with google. Thanks!
Offline
Pages: 1