Download & Slowdown a YouTube video using ffmpeg && youtube-dl
# add this to yer .bash_profile ==> | |
function youtube_slower { | |
if [ ! -z $2 ]; then | |
tempo="$2" | |
else | |
tempo="0.8" | |
fi | |
base_filename="$(youtube-dl "$1" --get-filename)" | |
extensionless="${base_filename%.*}" | |
output_filename="$extensionless"".slowed.mp3"; | |
youtube-dl $1 -q -o - | ffmpeg -y -v quiet -i - -filter:a "atempo=$tempo" "$output_filename"; | |
echo "opening \"$output_filename\""; | |
if [ -f "$output_filename" ]; then | |
open "$output_filename"; | |
fi | |
} | |
# usage: | |
# youtube-slow "http://www.youtube.com/watch?v=drbnCPq5YHk" | |
alias youtube-slow=youtube_slower | |
function youtube_munch { | |
while read p; do | |
echo "munching $p..."; | |
youtube-slow "$p" | |
done < <(grep '' $1) | |
} | |
alias youtube-munch=youtube_munch | |
# usage: | |
# youtube-munch path-to-text-file-full-of-youtube-urls.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
requires ffmpeg and youtube-dl, installable via HomeBrew on the Mac:
homebrew may require the Command Line Tools, which can be installed thusly: