This worked great, but make sure you have “lame” and “flac”
sudo apt-get install flac
sudo apt-get install lame
Then in the folder with all the .flac files:
for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done
10 comments on “How to convert FLAC to MP3, Ubuntu command line ”
-
Ubuntoid says:
Nope, what repo are these in? apt-cache and apt-get could find neither flac nor lame.
-
jat255 says:
josh@josh-ThinkPad:/run$ apt-cache policy flac
flac:
Installed: 1.2.1-6build1
Candidate: 1.2.1-6build1
Version table:
*** 1.2.1-6build1 0
500 http://us.archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
100 /var/lib/dpkg/statusjosh@josh-ThinkPad:/run$ apt-cache policy lame
lame:
Installed: 3.99.5+repack1-3
Candidate: 3.99.5+repack1-3
Version table:
*** 3.99.5+repack1-3 0
500 http://us.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages
100 /var/lib/dpkg/statusmain and universe repos, respectively. On raring, at least…
-
gallagherrobby says:
iDealshare VideoGo is just the professional FLAC Converter which can fast and batch convert FLAC files to lossless audio format like Apple Lossless ALAC M4A, AIFF, WAV, AU, APE, or convert FLAC to lossy audio format like AAC, WMA, AIFF, OGG, MP3 and etc
-
gerardglove says:
Another way is to convert FLAC to iPhone supported format. Bigasoft Audio Converter is just the professional FLAC to iPhone Converter which can fast and batch convert FLAC files to iPhone supported format. It can either convert FLAC to iPhone supported lossless audio format like Apple Lossless ALAC M4A, AIFF, WAV; or convert FLAC to iPhone supported lossy audio format like AAC or MP3.
-
Vedavrat says:
Thank you! It works!
But 320 kbps is so much for me… Therefore i put ‘lame -b 320 …’ for speech. -
Bleh says:
Using ffmpeg (and without an ugly for loop).
http://lewisdiamond.blogspot.ca/2012/01/converting-flac-to-mp3.html
find -name “*.flac” -exec ffmpeg -i {} -acodec libmp3lame -ab 128k {}.mp3 \;
Leave a Reply Cancel reply