Created
April 5, 2015 13:14
-
-
Save haansn08/974398cd5f51e26b892d to your computer and use it in GitHub Desktop.
Bash audio converter using ffmpeg
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
#!/bin/bash | |
find "$1" -name *.$2 | while read filename | |
do | |
newdir="$3"/${filename#*/} | |
newpath=${newdir%/*} | |
mkdir -p "$newpath" | |
newext=${newdir%.$2}.$4 | |
ffmpeg -i "$filename" -vn "$newext" < /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment