Skip to content

Instantly share code, notes, and snippets.

@briatte
Created December 10, 2017 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save briatte/c29b135d3b11571fbd77be5f46db6b2d to your computer and use it in GitHub Desktop.
Save briatte/c29b135d3b11571fbd77be5f46db6b2d to your computer and use it in GitHub Desktop.
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