[Media] Using VLC to Convert multiple files on OS X

One of my project requires multiple wav file to be converted to mp3. This is how it was done using command line with VLC on OS X. Change the path to the directory which contains the files.

for file in /path/to/files*.wav; do /Applications/VLC.app/Contents/MacOS/VLC -I dummy "$file" --sout="#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst=\"$(echo "$file" | sed 's/\.[^\.]*$/.mp3/')\"}" vlc://quit; done

The original command (see reference) works on mp4 to mp3, and it work on wav as well by changing the *.mp4 to *.wav.

Happy converting.

[Reference: https://khom.wordpress.com/2010/04/21/convert-mp4-and-flv-video-to-mp3-with-vlc/%5D