1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/youtube-dl.md
Miro Rauhala 9bd9afa6bd youtube-dl: add download the best audio+video (#3790)
* youtube-dl: add download the best audio+video

With this command the user can download the best audio and video separately. After it's done downloading, it will spawn ffmpeg to merge the two files together. Handy when downloading stuff from youtube as they host video and audio separate.

* youtube-dl: removed braces
2020-01-26 13:53:12 +01:00

1.3 KiB

youtube-dl

Download videos from YouTube and other websites. More information: http://rg3.github.io/youtube-dl/.

  • Download a video or playlist:

youtube-dl {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}

  • 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}}

  • Download the audio from a video and convert it to an MP3:

youtube-dl -x --audio-format {{mp3}} {{url}}

  • Download the best quality audio and video and merge them:

youtube-dl -f bestvideo+bestaudio {{url}}

  • Download video(s) as MP4 files with custom filenames:

youtube-dl --format {{mp4}} -o {{"%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s"}} {{url}}

  • 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}}