personal-blog/extract

12 lines
251 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
if [[ -z "$1" ]]; then
echo "Supply the full filepath of the video from which to extract audio"
exit 1
fi
filename=$(basename -- "${1}")
filename="${filename%.*}"
ffmpeg -i "${1}" -f mp3 -ab 192000 -vn "${filename}.mp3"