2016-01-21 23:15:46 +00:00
|
|
|
# youtube-dl
|
|
|
|
|
|
|
|
> Download videos from YouTube and other websites.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <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:
|
|
|
|
|
2020-10-04 18:33:38 +01:00
|
|
|
`youtube-dl --format "{{best[height<=480]}}" {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}`
|
2019-02-25 05:34:32 +00:00
|
|
|
|
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}}`
|
|
|
|
|
2020-01-26 12:53:12 +00:00
|
|
|
- Download the best quality audio and video and merge them:
|
|
|
|
|
|
|
|
`youtube-dl -f bestvideo+bestaudio {{url}}`
|
|
|
|
|
2016-01-21 23:15:46 +00:00
|
|
|
- Download video(s) as MP4 files with custom filenames:
|
|
|
|
|
2020-10-04 18:33:38 +01: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
|
|
|
|
2020-04-19 14:17:24 +01:00
|
|
|
- Download a particular language's subtitles along with the video:
|
2016-01-21 23:15:46 +00:00
|
|
|
|
2020-04-19 14:17:24 +01:00
|
|
|
`youtube-dl --sub-lang {{en}} --write-sub {{https://www.youtube.com/watch?v=Mwa0_nE9H7A}}`
|
2020-07-21 20:46:21 +01:00
|
|
|
|
|
|
|
- Download a playlist and extract mp3 from it:
|
|
|
|
|
|
|
|
`youtube-dl -i --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" {{url to playlist}}`
|