Last active
September 2, 2016 17:21
-
-
Save teffalump/218c63fa1c6d955e9541 to your computer and use it in GitHub Desktop.
Extract audio from file
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/zsh | |
#Simple script to extract audio from a file. | |
FILE="$1" | |
FILENAME="${FILE%.*}" | |
EXTENSION=`ffmpeg -i "$1" 2>&1 | gawk '/Audio/ {print $4}' | tr -d '[:punct:]'` | |
ffmpeg -vn -i "$1" -acodec copy "$FILENAME"."$EXTENSION" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment