Mass converting flac to mp3 with Gstreamer from cli

I’m extracting all my CD’s to flac files but my girlfriend is using iPod and iTunes on Windows which won’t play flac files. So I looked into converting all the music to mp3 so she could use it as well. I wanted a way to do it from the command line and I knew Gstreamer was up for the job:

gst-launch-0.10 filesrc location="music.flac" ! flacdec ! audioconvert ! lame ! id3mux name=tag v2-tag=true v1-tag=true ! filesink location="music.mp3"

The cool thing is that tags is preserved.

Note: Actually first I thought tags wasn’t preserved during the the gstreamer conversion, but that was because I used Totem with the Xine backend which apparently cant show mp3 tags.

Now I only need to write a bash script to run through all the music… lets see when I find the time :D

Creative Commons License
Mass converting flac to mp3 with Gstreamer from cli by Jacob Emcken is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.