Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 111
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    119

    What's the best way to convert FLAC to MP3?

    I've started ripping my CD collection to FLAC using EAC. At some point I'd like to batch convert some of the FLACs to MP3. What's the best way to go about this?

    Thanks,
    Aylwin

  2. #2
    Senior Member pfarrell's Avatar
    Join Date
    Apr 2005
    Location
    Northern Virginia
    Posts
    4,246

    What's the best way to convert FLAC to MP3?

    On Thu, 2005-06-16 at 13:34 -0700, Aylwin wrote:
    > I've started ripping my CD collection to FLAC using EAC. At some point
    > I'd like to batch convert some of the FLACs to MP3. What's the best
    > way to go about this?


    With a Perl program. I've got one you can start with
    on my Slim software page
    http://www.pfarrell.com/music/slimse...msoftware.html

    Look for the text:
    a new, low functionality utlity in Perl to convert flac files to mp3,
    called flac2mp3.pl

    --
    Pat
    http://www.pfarrell.com/music/slimse...msoftware.html



  3. #3
    Senior Member radish's Avatar
    Join Date
    Apr 2005
    Location
    Red Bank, NJ
    Posts
    5,052
    One word of warning - if you have flac files with non-regular characters in the file names (like unicode) then a lot of scripts will choke on them. I had that exact problem, which I could only partly fix. In the end I found that using foobar2000 (on windows) was much easier, although I'd like to be able to run the process from the command line as part of my overall ripping scripts.

  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    119
    Quote Originally Posted by pfarrell
    With a Perl program. I've got one you can start with
    on my Slim software page
    http://www.pfarrell.com/music/slimse...msoftware.html
    Cool! Thanks! I've never installed and run Perl on Windows before but I guess this is part of the fun.

  5. #5
    Although I've never done it before. You might find it easier to use Foobar2000 and Lame to do this... as it doesn't require Perl and it has a GUI.

    All you should need to do is add your flacs to the playlist, select all, right click and convert to MP3... then wait... a long... time.

    ss.

  6. #6
    Robin Bowes
    Guest

    What's the best way to convert FLAC to MP3?

    Pat Farrell wrote:
    > On Thu, 2005-06-16 at 13:34 -0700, Aylwin wrote:
    >
    >>I've started ripping my CD collection to FLAC using EAC. At some point
    >>I'd like to batch convert some of the FLACs to MP3. What's the best
    >>way to go about this?

    >
    >
    > With a Perl program. I've got one you can start with
    > on my Slim software page
    > http://www.pfarrell.com/music/slimse...msoftware.html
    >
    > Look for the text:
    > a new, low functionality utlity in Perl to convert flac files to mp3,
    > called flac2mp3.pl


    Aha! I too have a utility named flac2mp3.pl which, surprisingly enough,
    converts flac files to mp3 format.

    I wrote it for exactly the same situation - I store all my music in flac
    format and needed to convert it to mp3 for my iPod.

    My goal was to write something that I could just point at a directory
    tree full of flac files and have it mirrored into a corresponding
    directory structure full of mp3 files. I also only want to convert those
    files that need converting, i.e. newly-added files. Finally, I didn't
    want to have to re-transcode a file if only the tags have changed, so I
    added a tags-only mode.

    One of these days I'll get round to writing some documentation, but at
    least it's got usage instructions now:

    # flac2mp3
    Usage: flac2mp3 [--quiet] [--debug] [--tagsonly] [--force] <flacdir>
    <mp3dir>
    --quiet Disable informational output to stdout
    --debug Enable debugging output. For developers only!
    --tagsonly Don't do any transcoding - just update tags
    --force Force transcoding and tag update even if not required

    To use the script, you'll need the following:

    flac
    lame
    Perl
    Perl modules:
    - Audio::FLAC::Header
    - MP3::Tag

    Caveat: I've only tested it on Linux (Fedora Core 3), but it should work
    OK on Windows if you can get Audio::FLAC::Header installed.

    flac2mp3 is currently available here:

    http://robinbowes.com/filemgmt/viewcat.php?cid=4

    R.
    --
    http://robinbowes.com


  7. #7
    Senior Member
    Join Date
    May 2005
    Posts
    174

    What's the best way to convert FLAC to MP3?

    Robin Bowes wrote:

    > Aha! I too have a utility named flac2mp3.pl which, surprisingly enough,
    > converts flac files to mp3 format.
    >
    > I wrote it for exactly the same situation - I store all my music in flac
    > format and needed to convert it to mp3 for my iPod.
    >
    > My goal was to write something that I could just point at a directory
    > tree full of flac files and have it mirrored into a corresponding
    > directory structure full of mp3 files. I also only want to convert those
    > files that need converting, i.e. newly-added files. Finally, I didn't
    > want to have to re-transcode a file if only the tags have changed, so I
    > added a tags-only mode.


    Sounds as if it is just what I need!!
    Just a few questions!

    1) can I specify what quality MP3 output to use?
    2) if there are MP3 files in the source directory, will it just copy
    these to the output directory (this is the behavious I am looking for)

    Cheers


  8. #8
    Senior Member
    Join Date
    May 2005
    Posts
    174

    What's the best way to convert FLAC to MP3?

    Robin Bowes wrote:

    > flac
    > lame
    > Perl
    > Perl modules:
    > - Audio::FLAC::Header
    > - MP3::Tag


    I had a lot of difficulty installing audio::flac::header
    CPAN would not install it for me. In the end I just copied the directory
    audio directory from CPAN in slimserver to my perl cpan installation
    which seemed to do the trick.

    MP3::TAG installed easily from webmin CPAN perl module installer.


  9. #9
    Senior Member
    Join Date
    May 2005
    Posts
    174

    What's the best way to convert FLAC to MP3?

    John Gorst wrote:

    >
    > 1) can I specify what quality MP3 output to use?


    I have figured out that I just need to edit line 94 and change the lame
    preset option.
    Maybe this should be a command line option?

    > 2) if there are MP3 files in the source directory, will it just copy
    > these to the output directory (this is the behavious I am looking for)


    Unfortuently this does not seem to happen )-:
    This is a shame as I am trying to replicate (automatically) my music
    collection from my linux server to my laptop (with small hard disc)
    running itune/mediaplayer.

    Ideally it would copy accross all files, including ones it didnt
    transcode e.g. album art and mp3/wma files.

    Any ideas?

    Maybe I could create a script which would replicate the whole directory
    structure of my music collection and set it to copy accross /everything/
    apart from flac files. I would then run flac2mp3 which would copy
    accross the flac files as mp3.


  10. #10
    Robin Bowes
    Guest

    What's the best way to convert FLAC to MP3?

    John Gorst wrote:
    > Robin Bowes wrote:
    >
    >> Aha! I too have a utility named flac2mp3.pl which, surprisingly
    >> enough, converts flac files to mp3 format.
    >>
    >> I wrote it for exactly the same situation - I store all my music in
    >> flac format and needed to convert it to mp3 for my iPod.
    >>
    >> My goal was to write something that I could just point at a directory
    >> tree full of flac files and have it mirrored into a corresponding
    >> directory structure full of mp3 files. I also only want to convert
    >> those files that need converting, i.e. newly-added files. Finally, I
    >> didn't want to have to re-transcode a file if only the tags have
    >> changed, so I added a tags-only mode.

    >
    >
    > Sounds as if it is just what I need!!
    > Just a few questions!
    >
    > 1) can I specify what quality MP3 output to use?


    As you've already found out, simply modify the array @lameargs to suit
    your needs. As you can see from the comment immediately above, I have
    made a note that a possible enhancement would be to specify that on the
    command line.

    > 2) if there are MP3 files in the source directory, will it just copy
    > these to the output directory (this is the behavious I am looking for)


    Again, as you've already found out, no it won't.

    Just copy all your mp3s over and then run flac2mp3.

    If I extend flac2mp3 to include "mirroring", i.e. delete any files found
    in the target directory that don't have corresponding source files, then
    I may consider adding mp3 copying.

    I've set up a bunch of mail lists relating to flac2mp3.

    Details are here:

    http://robinbowes.com/article.php/20050611002827903

    R.
    --
    http://robinbowes.com


Posting Permissions

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