Created
October 8, 2011 13:46
-
-
Save semihozkoroglu/1272295 to your computer and use it in GitHub Desktop.
mp4 to mp3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# Mevcut dizindeki tüm mp4 uzantılı dosyaları mp3'e dönüştürür.. | |
# | |
for f in *.mp4; do | |
newname=`echo $f | tr ' ' '_' ` | |
mv "$f" $newname | |
f=$newname | |
mplayer $f -ao pcm:file=tmp.wav | |
lame -b 128 -q 2 tmp.wav ${f/.mp4/.mp3} | |
rm -f tmp.wav | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment