Created
October 12, 2017 14:03
-
-
Save elleryq/5f855f2b45e31273cd6a5810e20e0bc4 to your computer and use it in GitHub Desktop.
Convert webm/mkv 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 | |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") | |
| for f in $(find . -regex '.*\(webm\|mkv\)$' -print) | |
| do | |
| fn=$(basename "${f}") | |
| extension="${fn##*.}" | |
| f="${fn%.*}" | |
| ffmpeg -i "${fn}" ${f}.mp3 | |
| done | |
| IFS=$SAVEIFS | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment