Question:
Converting FLAC files to mp3?
?
2011-03-20 21:56:22 UTC
Basically, how do I do it? I found this thing online that says it will convert them... some coding script or other, but I have NO idea how to use it. I mean, it's just a bunch of words on a page... I'll paste it here. So, what do I do with it? Or better yet, is there some other way to change the files? Cause I have an ipod and itunes won't even recognise the FLAC files.
#!/bin/bash
ncpu=`cat /proc/cpuinfo | grep "cpu MHz" | wc -l`
if [ "${2:0:2}" = "-n" ]; then
ncpu_=${2:2}
ncpu_=${ncpu_//[^0-9]/}
if [ -n "$ncpu_" ]; then
ncpu=$ncpu_
fi
fi
echo "Parallel encoding: using $ncpu CPUs"
parms=${1:--v0}
proclist=()
procin()
{
proclist=( ${proclist[@]} $1)
}
procout()
{
proclist=(${proclist[@]/$1/})
}
procref()
{
for pid in ${proclist[@]}; do
if ! kill -0 $pid 2>/dev/null; then
procout $pid
fi
done
}
nproc()
{
echo ${#proclist[@]}
}
queue()
{
local f="$1"
# wait until a cpu is available
while [ "`nproc`" -ge $ncpu ]; do
procref
sleep 0.5
done
echo "$f"
flac2mp3 "$f" "mp3$parms/${f%.flac}.mp3" $parms 2>/dev/null &
procin $!
}
while read f; do
mkdir -p "mp3$parms/`dirname "$f"`"
queue "$f"
done

# wait for remaining processes to exit
while [ "`nproc`" -gt 0 ]; do
procref
sleep 0.5
done
Three answers:
Nobody
2011-03-20 22:08:06 UTC
That's a *nix shell script. I have no idea if it will even preform a conversion from flac to MP3 (I can't read BASH shell scripts, yet). If you're using windows just download a program that will do it for you. If you insist on using the script check the Script Documentation (RTFM). If you're using windows, use the program I linked.
2011-03-21 18:04:51 UTC
have you tried to convert flac to mp3 using audio converter, i often convert flac, ogg, wma to mp3 using audio converter
2016-04-28 04:18:10 UTC
Download and use the program Audacity.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...