2016-01-21 23:15:46 +00:00
|
|
|
# youtube-dl
|
|
|
|
|
|
|
|
> Download videos from YouTube and other websites.
|
2019-01-30 11:19:23 +00:00
|
|
|
> Homepage: <http://rg3.github.io/youtube-dl/>.
|
2016-01-21 23:15:46 +00:00
|
|
|
|
|
|
|
- Download a video or playlist:
|
|
|
|
|
|
|
|
`youtube-dl {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}`
|
|
|
|
|
2019-02-25 05:34:32 +00:00
|
|
|
- List all formats that a video or playlist is available in:
|
|
|
|
|
|
|
|
`youtube-dl --list-formats {{https://www.youtube.com/watch?v=Mwa0_nE9H7A}}`
|
|
|
|
|
|
|
|
- Download a video or playlist at a specific quality:
|
|
|
|
|
|
|
|
`youtube-dl --format {{best[height<=480]}} {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}`
|
|
|
|
|
2016-01-21 23:56:49 +00:00
|
|
|
- Download the audio from a video and convert it to an MP3:
|
2016-01-21 23:15:46 +00:00
|
|
|
|
|
|
|
`youtube-dl -x --audio-format {{mp3}} {{url}}`
|
|
|
|
|
|
|
|
- Download video(s) as MP4 files with custom filenames:
|
|
|
|
|
2019-01-14 23:45:13 +00:00
|
|
|
`youtube-dl --format {{mp4}} -o {{"%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s"}} {{url}}`
|
2016-01-21 23:15:46 +00:00
|
|
|
|
|
|
|
- Download a video and save its description, metadata, annotations, subtitles, and thumbnail:
|
|
|
|
|
|
|
|
`youtube-dl --write-description --write-info-json --write-annotations --write-sub --write-thumbnail {{url}}`
|
|
|
|
|
|
|
|
- From a playlist, download all "Let's Play" videos that aren't marked "NSFW" or age-restricted for 7 year-olds:
|
|
|
|
|
|
|
|
`youtube-dl --match-title {{"let's play"}} --age-limit {{7}} --reject-title {{"nsfw"}} {{playlist_url}}`
|