viernes, diciembre 26, 2014

shell script to convert .wav files to .mp3 using LAME

I use the folowing script to convert .wav to .mp3 files. This script uses the LAME (LAME Ain't an Mp3 Encoder) tool, so you will need to install LAME before using it.


#!/bin/bash
#script to convert .wav to .mp3 using lame utility
for i in *.wav ; do
echo $i
bname=`basename $i .wav`
lame $i $bname.mp3
done
mkdir wav mp3 && mv *.mp3 mp3 && mv *.wav wav


Fuente:
http://ben-it.org/content/linux-shell-script-convert-wav-files-mp3-using-lame

No hay comentarios.: