How to convert FLAC to MP3, Ubuntu command line

12 Flares Filament.io Made with Flare More Info

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
Twitter 4 Facebook 4 Google+ 2 LinkedIn 0 inShare Buffer 1 Email — Email to a friend Filament.io Made with Flare More Info 12 Flares
Tagged with: 2013 , Ubuntu
Posted in Rambling
10 comments on “How to convert FLAC to MP3, Ubuntu command line 
  1. Ubuntoid says:

    Nope, what repo are these in? apt-cache and apt-get could find neither flac nor lame.

  2. 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/status

    josh@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/status

    main and universe repos, respectively. On raring, at least…

  3. 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

  4. 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.

  5. Vedavrat says:

    Thank you! It works!
    But 320 kbps is so much for me… Therefore i put ‘lame -b 320 …’ for speech.

  6. 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 

 

How to convert FLAC to MP3, Ubuntu command line was last modified: July 13th, 2017 by Jovan Stosic