Instantly share code, notes, and snippets.

@briatte /yt.sh
Created Dec 10, 2017

Embed
What would you like to do?
single-line shell commands to download MP4 or MP3 from Youtube
# MP4
# requirements:
# brew install youtube-dl
# usage: yt-mp4 <youtube-URL>
alias yt-mp4="youtube-dl -f 'best[height=720]'"
# MP3
# requirements:
# brew install youtube-dl
# brew install ffmpeg (for audio extraction)
# extract audio (-x) -- quality set to 7 out of 9
# usage: yt-mp3 <youtube-URL>
alias yt-mp3="youtube-dl -f best -x --audio-quality 7 --audio-format mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment