Home| New Wiki | | Login | User registry | Home Tree PDF
Convert .flac to .ogg
Owner:csilva, Version: 1, Date:Thu 29, November 2007,

I've found many downloadeable software to do this, bu I just wanted to do it in the minimalistic way....

These two scripts can be run from a linux terminal or from a. sh file and will convert all the .flac files in the current directory to .ogg or .mp3

for i in *.flac; do
 echo Creating ${i%*.flac}.ogg
 gst-launch-0.10 filesrc location="$i" ! decodebin ! audioconvert !  vorbisenc ! oggmux ! filesink location="${i%*.flac}.ogg"
done

for i in *.flac; do
 echo Creating ${i%*.flac}.ogg
 gst-launch-0.10 filesrc location="$i" ! decodebin ! audioconvert !  lame bitrate=160 ! filesink location="${i%*.flac}.mp3"
done

They require the usage of gstreamer set of codecs, in Ubuntu gstreamer comes preinstalled but you may need the mp3 codec

sudo apt-get gstreamer0.10-lame 

(note that the version may change...)


History - Extract PDF - Extract Tree as PDF

Last Modified

Thu, Nov 19 Sat, Oct 3 Fri, Sep 25 Mon, Aug 3 Mon, Apr 27 Sat, Mar 28 Mon, Jan 19 Tue, Jan 6

Home| New Wiki