2022-02-21 00:33:08 +00:00
|
|
|
# yt-dlp
|
|
|
|
|
|
|
|
> A youtube-dl fork with additional features and fixes.
|
|
|
|
> Download videos from YouTube and other websites.
|
2024-04-04 05:34:14 +01:00
|
|
|
> See also: `yt-dlp`, `ytfzf`.
|
2022-02-21 00:33:08 +00:00
|
|
|
> More information: <https://github.com/yt-dlp/yt-dlp>.
|
|
|
|
|
|
|
|
- Download a video or playlist (with the default options from command below):
|
|
|
|
|
|
|
|
`yt-dlp "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"`
|
|
|
|
|
2023-02-19 12:30:37 +00:00
|
|
|
- List the available downloadable formats for a video:
|
|
|
|
|
|
|
|
`yt-dlp --list-formats "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"`
|
|
|
|
|
2024-06-04 09:06:13 +01:00
|
|
|
- Download a video or playlist using the best MP4 video available (default is "bv\*+ba/b"):
|
2022-02-21 00:33:08 +00:00
|
|
|
|
2022-10-19 20:49:50 +01:00
|
|
|
`yt-dlp --format "{{bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]}}" "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"`
|
2022-02-21 00:33:08 +00:00
|
|
|
|
2023-02-19 12:30:37 +00:00
|
|
|
- Extract audio from a video (requires ffmpeg or ffprobe):
|
2022-02-21 00:33:08 +00:00
|
|
|
|
|
|
|
`yt-dlp --extract-audio "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"`
|
|
|
|
|
2023-02-19 12:30:37 +00:00
|
|
|
- Specify audio format and audio quality of extracted audio (between 0 (best) and 10 (worst), default = 5):
|
2022-02-21 00:33:08 +00:00
|
|
|
|
|
|
|
`yt-dlp --extract-audio --audio-format {{mp3}} --audio-quality {{0}} "{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}"`
|
|
|
|
|
2024-06-04 09:06:13 +01:00
|
|
|
- Download all playlists of a YouTube channel/user keeping each playlist in a separate directory:
|
2022-02-21 00:33:08 +00:00
|
|
|
|
|
|
|
`yt-dlp -o "{{%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s}}" "{{https://www.youtube.com/user/TheLinuxFoundation/playlists}}"`
|
|
|
|
|
2024-06-04 09:06:13 +01:00
|
|
|
- Download a Udemy course keeping each chapter in a separate directory:
|
2022-02-21 00:33:08 +00:00
|
|
|
|
2024-06-04 09:06:13 +01:00
|
|
|
`yt-dlp -u {{user}} -p {{password}} -P "{{path/to/directory}}" -o "{{%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s}}" "{{https://www.udemy.com/java-tutorial}}"`
|