Created
November 28, 2014 02:07
-
-
Save bryant1410/418692ac8704ec87dc84 to your computer and use it in GitHub Desktop.
Convert all mp4 files to mp3 in current directory, deleting them
This file contains 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
#!/usr/bin/env bash | |
# seen in http://www.unixmen.com/linux-basics-convert-mp4-mp3/ | |
for filename in *.mp4 | |
do | |
name=`echo "$filename" | sed -e "s/.mp4$//g"` | |
ffmpeg -i "$filename" -b:a 192K -vn "$name.mp3" | |
rm "$filename" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment