Skip to content

Instantly share code, notes, and snippets.

@richy486
Created January 6, 2017 21:16
Show Gist options
  • Save richy486/e85f26428a4532745a840ef3fb7c430c to your computer and use it in GitHub Desktop.
Save richy486/e85f26428a4532745a840ef3fb7c430c to your computer and use it in GitHub Desktop.
get youtube streaming url
from: http://stackoverflow.com/a/35631022/667834
$ brew install youtube-dl
$ youtube-dl --list-formats https://www.youtube.com/watch\?v\=[YouTube video id]
shows something like:
....
91 mp4 144p HLS , h264, aac @ 48k
92 mp4 240p HLS , h264, aac @ 48k
93 mp4 360p HLS , h264, aac @128k
94 mp4 480p HLS , h264, aac @128k
95 mp4 720p HLS , h264, aac @256k
96 mp4 1080p HLS , h264, aac @256k (best)
...
to grab the 95 video (720p) do:
$ youtube-dl -f 95 -g https://www.youtube.com/watch\?v\=[YouTube video id]
this should print out the m3u8 url(s)
@sarangrahan
Copy link

Can we get the link of whole playlist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment