Created
April 30, 2013 00:55
-
-
Save mondalaci/5485960 to your computer and use it in GitHub Desktop.
Convert 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 | |
if [ $# -eq 0 -o "$1" = '-h' -o "$1" = '--help' ]; then | |
echo "Usage: $0 INPUT.MP4 [...]" | |
exit | |
fi | |
for input_mp4 in "$@"; do | |
output_mp3=${input_mp4/.mp4/.mp3} | |
ffmpeg -i "$input_mp4" -y -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "$output_mp3" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment