Batch convert WAV to FLAC

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
guitarMan666
New Cone
New Cone
Posts: 6
Joined: 06 Apr 2009 04:08

Batch convert WAV to FLAC

Postby guitarMan666 » 18 Jul 2009 07:26

I am trying to figure out how to convert the .wav files I have into FLAC in .ogg containers. Trying to batch convert in the GUI isn't working out for me. It won't create the output files properly and will only give the first minute or so of the first file in the list. I would like to avoid going through one by one as much as possible becaues after about 10 files that becomes extremely tedious.

I found a batch conversion script on the wiki but I am not entirely sure exactly which options need to be changed or if the script can be adapted at all. The script is:

Code: Select all

for A in *.avi; do \ echo ************************* $A ********************* ;\ vlc --sout-all "$A" :sout="#transcode{...}:\ std{access=file,mux=avi,url=~/$A.avi}" \ vlc://quit -I dummy ;\ done ;\ Xdialog --title 'Complete' --msgbox 'All done' 0 0;
from http://wiki.videolan.org/Uncommon_uses

I'm fairly certain that in addition to the extensions, of course, the mux= value needs to be changed and options need to be placed in the curly braces after "#transcode". What those would be I am not sure and cannot seem to find information about. I am running VLC 1.0.0 (from a PPA) on Ubuntu 9.04 Jaunty Jackalope.

I would like to learn how to do this in VLC so I don't have to download other programs to do my conversions. Any help or insight would be helpful. Thanks in advance!
-Eric

mc2man
Blank Cone
Blank Cone
Posts: 51
Joined: 26 Jan 2009 03:42

Re: Batch convert WAV to FLAC

Postby mc2man » 18 Jul 2009 19:46

hopefully someone can tell you how to do in vlc, though it's a simple command using flac (flac not libflac
At the directory prompt where your .wav's are

Code: Select all

flac --ogg *.wav
that will produce what you want very quickly, though will have a .oga ext. (the new default

If a .ogg is wanted add a 2nd command

Code: Select all

flac --ogg *.wav && for f in *.oga; do mv "$f" "`basename "$f" .oga`.ogg"; done;
or make a small script

Code: Select all

#!/bin/bash flac --ogg *.wav for f in *.oga; do mv "$f" "`basename "$f" .oga`.ogg"; done;
You could expand and or alter to add a dir somewhere and move the .oga or .ogg or .wav files, whatever you wish


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 71 guests