Skip to content

Instantly share code, notes, and snippets.

@semihozkoroglu
Created October 8, 2011 13:46
Show Gist options
  • Save semihozkoroglu/1272295 to your computer and use it in GitHub Desktop.
Save semihozkoroglu/1272295 to your computer and use it in GitHub Desktop.
mp4 to mp3
#! /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