How to convert all wav files into mp3 in one go on centos?

cat abc.sh


#!/bin/bash

SAVEIF=$IFS
IFS=$(echo -en "\n\b")

for file in $(ls *wav)
do
name=${file%%.wav}
lame -V0 -h -b 160 --vbr-new $name.wav $name.mp3
done

IFS=$SAVEIFS



sh abc.sh

run in that folder where wav file exists and want to convert it into mp3



OUTPUT
LAME 3.99.5 64bits (http://lame.sf.net)
polyphase lowpass filter disabled
Encoding 1515151515.226426-030327-123456789.wav
      to 1515151515.226426-030327-123456789.mp3
Encoding as 8 kHz single-ch MPEG-2.5 Layer III VBR(q=0)
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  5871/5871  (100%)|    0:01/    0:01|    0:01/    0:01|   361.29x|    0:00
 64 [5871] *********************************************************************************************************************************************************************************************************************************
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   kbps       mono %     long switch short %
   64.0      100.0        79.8  10.8   9.3
Writing LAME Tag...done
ReplayGain: +2.4dB

Comments

Popular posts from this blog

Run MySQL query from Asterisk Dialplan and get values