Thread: scripting to convert .wav to .mp3 files
i have set of 5 files:
tell-all -- disc 1.wav
tell-all -- disc 2.wav
tell-all -- disc 3.wav
tell-all -- disc 4.wav
tell-all -- disc 5.wav
on need perform following actions:
mp3sencoder -if "tell-all -- disc 1.wav" -of "tell-all -- disc 1.mp3" -br 24000 -mono
mp3sencoder -if "tell-all -- disc 2.wav" -of "tell-all -- disc 2.mp3" -br 24000 -mono
mp3sencoder -if "tell-all -- disc 3.wav" -of "tell-all -- disc 3.mp3" -br 24000 -mono
mp3sencoder -if "tell-all -- disc 4.wav" -of "tell-all -- disc 4.mp3" -br 24000 -mono
mp3sencoder -if "tell-all -- disc 5.wav" -of "tell-all -- disc 5.mp3" -br 24000 -mono
have other files in future need convert .wav .mp3.
how go automating automatically take every .wav in directory , convert mp3sencoder .mp3 options of -br 24000 -mono while retaining filename?
this file can drag files on, , automatically convert every file.code:while [ $# -ge 1 ]; filename=`echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/abcdefghijklmnopqrstuvwxyz/'` case "$filename" in *.wav) mp3sencoder -if "$1" -of "$1".mp3 -br 24000 -mono ;; *) echo "not doing anything" exit 0 ;; esac shift done
i'm not sure if "$1".mp3 part work. try first
ps: make file called "blablabla.wav.mp3"
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] scripting to convert .wav to .mp3 files
Ubuntu
Comments
Post a Comment