Skip to content
Posts Apr 16, 2022 2 min read

Download YouTube Videos

A guide to downloading YouTube videos and audio using yt-dlp and youtube-dl command-line tools, including various options for format selection and quality settings.

Download YouTube Videos

yt-dlp

yt-dlp is a free and open-source command-line tool for downloading videos and audio from YouTube and other video hosting sites. It is a fork of youtube-dl with additional features and improvements, including better performance and more frequent updates. Unlike youtube-dl, which has faced various legal challenges and takedowns, yt-dlp is actively maintained and regularly updated to ensure compatibility with the latest changes in video hosting sites.

GitHub Repository

Download the Windows executable

Download a YouTube video with default settings:

yt-dlp "https://www.youtube.com/watch?v=oHg5SJYRHA0"

Extract audio from a video:

yt-dlp --extract-audio "https://www.youtube.com/watch?v=oHg5SJYRHA0"

Specify audio format and audio quality of extracted audio (between 0 (best) and 10 (worst), default = 5):

yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 "https://www.youtube.com/watch?v=oHg5SJYRHA0"

Download all playlists of YouTube channel/user keeping each playlist in separate directory:

yt-dlp -o "%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/user/TheLinuxFoundation/playlists"

youtube-dl

Youtube-dl is a free, open-source command-line program that allows users to download videos and audio from various websites, including YouTube, Vimeo, and SoundCloud. It is available for Windows, macOS, and Linux operating systems. The program supports a wide range of formats, including MP4, WebM, and MP3, and can be customized with various options and parameters.

GitHub Repository

Download the Windows executable

Download a YouTube video with default settings:

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

Download a YouTube video with the best available audio quality:

youtube-dl -f bestaudio "https://www.youtube.com/watch?v=oHg5SJYRHA0"

Download an entire YouTube playlist:

youtube-dl --yes-playlist "https://www.youtube.com/playlist?list=PLG49S3nxzAnmpdmX7RoTOyuNJQAb-r-gd"

Begin downloading from a playlist at a specific position:

youtube-dl --yes-playlist --playlist-start 22 "https://www.youtube.com/watch?v=M5c9HdaQqh0&list=PLG49S3nxzAnmpdmX7RoTOyuNJQAb-r-gd"

Connected Reading

Related entries

Chosen from shared tags, categories, and nearby section context.

Discovery Layer

Connected Memory

A focused relationship view around this entry, using shared categories and tags.

Categories 0
Tags 0
Posts 0