PDA

View Full Version : [ubuntu] is it possible to batch convert .WAV files to .OGG using gst-launch



grumpthehermit
August 27th, 2009, 11:13 PM
Hello,

I have searched the forums and can't find an answer so I thought I would ask the question.

I can use the following in terminal to convert a single file from .WAV to .OGG

gst-launch filesrc location=music.wav ! wavparse ! audioconvert ! vorbisenc name=enc quality=1.0 ! oggmux ! filesink location=music.ogg

Where "music".wav is changed to the name if the file I wish to convert to .ogg

Is it possible to batch convert a list of files in the same folder without having to re-execute the same command with the next file name over and over ?

I was thinking there might be a file name wildcard or something ?

The reason I am using gst-launch is because Rhythmbox has locked up on a few of my Cd's so I have used cdparanoia to rip these few discs to .wav and now want .ogg's

Thanks, Any thoughts would be apprieciated.

Grumpthehermit :)

mc4man
August 28th, 2009, 03:14 AM
make sure you have vorbis-tools installed, then simply cd to the folder containing the .wav's and

oggenc -q 10 *.wav

The blue is the quality setting, ranges from 1-10, (1 being lowest q

grumpthehermit
August 28th, 2009, 05:26 AM
That worked a treat, thanks so much for your help.

Grumpthehermit :)