Easily Download Audio, Video and Playlists From YouTube

To download individual videos and all videos in a playlist from YouTube, use yt-dlp.On Windows,

  1. download the yt-dlp executable to a folder
  2. download the ffmpeg executable to a folder
  3. add the folder path containing the executables for both yt-dlp and ffmpeg to your Windows user or system path in the PATH environment variable (see screenshot below)
  4. open a terminal / command prompt,
  5. change to the folder where you want the downloads to go
  6. run .\yt-dlp URL (I’m using PowerShell)
Path environment variable

For example,

.\yt-dlp [Youtube Video URL]

If you want to download the 1080p resolution of the video and it is available, run the following command.

yt-dlp -f bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best [Youtube Video URL]

Download a Video Playlist

yt-dlp -f bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best https://www.youtube.com/playlist?list=PL-lZtPz7Ie0abE0PsxjDr2c5oSpcnhLdR

Download Audio Only

Extract audio from a video (requires ffmpeg or ffprobe):

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"