Results 1 to 6 of 6

Thread: Flac to mp3?

  1. #1
    Join Date
    Dec 2006
    Location
    Southend, Essex, UK
    Beans
    605
    Distro
    Ubuntu 12.04 Precise Pangolin

    Flac to mp3?

    Hi this might be an easy question. How do you convert a flac file to mp3? Well I have an entire album to convert actually.

    Thanks in advance.
    "We are what we think. All that we are arises with our thoughts."

    Buddha The Dhammapada

  2. #2
    Join Date
    Jun 2007
    Beans
    1,279
    Distro
    Ubuntu Development Release

  3. #3
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Flac to mp3?

    Quote Originally Posted by chrispche View Post
    ... How do you convert a flac file to mp3? Well I have an entire album to convert actually.
    Easiest way with Ubuntu is
    Applications > Sound & Video > Sound Converter

  4. #4
    Join Date
    Feb 2007
    Location
    Hilversum, NL
    Beans
    595
    Distro
    Ubuntu

    Re: Flac to mp3?

    Quote Originally Posted by chrispche View Post
    Hi this might be an easy question. How do you convert a flac file to mp3? Well I have an entire album to convert actually.

    Thanks in advance.
    I always use this little script for that:
    Code:
    #!/bin/sh
    
    for file in */*.flac
    do
    	flac -d "$file"
    	lame -V 0 "${file%\.*}.wav" "${file%\.*}.mp3"
    	rm "${file%\.*}.wav" "${file%\.*}.flac"
    done
    
    exit 0
    Note that this script also removes the original!

  5. #5
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Flac to mp3?

    I prefer ffmpeg, as it gives you so many possibilities for control of the quality. Perhaps lame does as well, but I have never used that on its own, always through ffmpeg.

    You also may need the following lib files from medibuntu to enable mp3 encoding in ffmpeg.
    libavcodec-extra-52 (4:0.5.1-1ubuntu1+medibuntu1)
    libavdevice-extra-52 (4:0.5.1-1ubuntu1+medibuntu1)
    libavfilter0 (4:0.5.1-1ubuntu1)
    libavformat-extra-52 (4:0.5.1-1ubuntu1+medibuntu1)
    libavutil-extra-49 (4:0.5.1-1ubuntu1+medibuntu1)

    To convert audio flac file to mp3.
    Code:
    ffmpeg -i file.flac -acodec libmp3lame -ab 128k file.mp3
    -acodec is the audio codec libmp3lame
    -ab is audio bitrate

    Or:
    Code:
    ffmpeg -i file.flac -acodec libmp3lame -aq # file.mp3
    -aq # is vbr quality - 1(high) - 9(low)

  6. #6
    Join Date
    Dec 2006
    Location
    Southend, Essex, UK
    Beans
    605
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Flac to mp3?

    Thank you all.
    "We are what we think. All that we are arises with our thoughts."

    Buddha The Dhammapada

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •