Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Script to convert FLAC to MP3 (Read 3784 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Script to convert FLAC to MP3

I have recently built a PVR. It is very much like a 'build your own' Tivo.
I love the functionality, but it has one downside. The Hauppauge MVP playback device only supports MP3. It won't do WAV, PCM, or FLAC.
So that leaves me with the undesirable option of transcoding.
I need some help sorting out how I can do this in a DOS batch, or VBS type script.
I must be able to do it in the background, without a GUI.
I need to convert from FLAC, and perhaps Vorbis, and AAC, to MP3. I want to do something like CBR 320 or similar. I want to keep the sound quality as high as possible, while keeping the transcode speed high.
Any help would be appreciated.

Edit:

The PVR software is GBPVR, it only runs on MS Windows.

GBPVR Web page

Script to convert FLAC to MP3

Reply #1
My post here suggests a way to do this in DOS.  Basically you pipe directly from FLAC to LAME and then use Tag to copy the tags over.  The problem with this is that Tag won't write ID3v2.

Ogg will let you pipe from STDOUT to LAME also - i'm not sure what your options would be for AAC.

I would go with a VBR seting of -V2 to -V0 rather than CBR 320 as I really don't think it's worth those extra KB.

NB: I'd love to build my own PVR.  I have a Hauppage DVB-T card in my PC ready for the occassion.  All I need to do now is find the money for the rest of the PC and I'm sorted.
I'm on a horse.

Script to convert FLAC to MP3

Reply #2
If you're willing to become a little bit of a dos hack, google for "flac2mp3" and you'll find more than one script that accomplishes this. I know of at least one each in bash, python, and perl. Then, just take one of those and change it appropriately for yourself.

Mark

 

Script to convert FLAC to MP3

Reply #3
I put together this package of dos encoders and a nice little wrapper batch script to tie it all together when I decided to archive my music collection to flac. Just unzip it and put the "!convert" directory in the root of your flac file directory. The "flac-util.cmd" and follow the prompts. If you have any questions or suggested improvements, let me know.

Here is an example of my directory structure:
Code: [Select]
M:\flac\
      \!convert\
      |         \bin\
      |         \encoded_mp3\  <---(Where new files will be put.)
      |         \flac-util.cmd
      \artist1\
      |        \album1\
      |                \artist1 - album1 - 01 - title1.flac
      |                \artist1 - album1 - 02 - title2.flac
      |                \artist1 - album1 - 03 - title3.flac
      \artist2\
      |        \album2\
      |                \artist2 - album2 - 01 - title1.flac
      |                \artist2 - album2 - 02 - title2.flac
      |                \artist2 - album2 - 03 - title3.flac


Download: www.revnull.com/download.php?file=!convert.zip