Horje
How to Download YouTube Videos using yt-dlp?

The yt-dlp is an open-source command line video/audio downloading tool that can be used in downloading videos/audio from various platforms for free using the command line just by providing a video link. It has a bunch of features that let you download entire playlists, and choose quality.

In this article we will learn-

  • How to download yt-dlp in Windows/mac/Linux
  • Download audio, video, entire playlists
  • Change video quality/format
  • Download comments/description, other data
  • Download specific videos from the playlist
  • List of supported websites

How to download Yt-dlp?

Step 1: Go to the official GitHub page of yt-dlp.

yt-dlp-git

yt-dlp download from GitHub

Step 2: Scroll down and to the README.md file and scroll down to installation.

Step 3: Choose your operating system from windows / mac / Linux and download the binary file in an empty folder.

yt-dlp-installation

yt-dlp installation

Once the file is downloaded you are good to go, but you can only operate yt-dlp from the folder which contains the yt-dlp file. if you want to access dlp from anywhere in your system you have to set the path of yt-dlp in global scope in environment variables as per your system.

Download videos/audio/playlists from Youtube

Once the yt-dlp binary is downloaded go to command palette and go to the directory where yt-dlp is located.

Download YouTube Video

Type the command yt-dlp to download the video. This command will download the required video in the current working directory of the system.

e.g. yt-dlp [video-url]

yt-dlp-video

downloading video using yt-dl

Download only the audio from the Youtube URL

To download just the audio type -x before the url.

e.g.  yt-dlp -x [video-url].

This will download the audio file from the video.

yt-dlp-audio-(1)

downloading audio of a video through yt-dlp

Download entire video playlist

You can also download the entire playlist just by putting link of the playlist after the yt-dlp command

e.g. yt-dlp [playlist-url]

How to Change Video Quality?

To change the quality of the video you can use the -F option.

e.g. yt-dlp -F [video-url] 

This command shows a list of options and formats you can download the video. it also tells the size of the file, resolution aspect ratio, format(audio/video) and more. to select one of those format, mention the code of format in the -f command e.g. yt-dlp -F [format code]

yt-dlp-formats

video formats in yt-dlp

Downloading Additional Data

Dlp also provide options to download other data related with the video file like comments, description thumbnail.

To download captions/subtitles use yt-dlp –write-subs this will download the subtitles of the Youtube video.

To download comments or description prefix –write-comments and –write-description can be used respectively in the command.

yt-dlp-features

additional video data download in yt-dlp

Downloading Specific Video from a Playlist

To download only specific video or a range of videos from a playlist you can use -I (Index) command e.g. yt-dlp -I 3 . (this will download 3rd video from the playlist)

You can specify a range using “[START]:[STOP][:STEP]”. For backward compatibility, START-STOP is also supported.

e.g. yt-dlp -I 6:9 . (this downloads 6,7,8 videos from the playlist)
yt-dlp-indexing

downloading specific videos from playlist

List of supported websites

The full list of 1200+ supported websites of yt-dlp are specified on their GitHub page. Some of the popular supported sites of yt-dlp are:

  1. YouTube
  2. Tiktok
  3. twitter
  4. SonyLiv
  5. Reddit
  6. Crunchyroll
  7. BBC
  8. Amazon Mini TV
  9. Zee5
  10. SoundCloud

Conclusion

Yt-dlp is an amazing tool to download Youtube videos for free. beside Youtube yt-dlp is capable of downloading videos/audios from 1500+ other platforms like BBC, Crunchyroll, Dailymotion etc. the list of supported files are here. It also have other thousands of features all of which cannot be discussed in this article, you may refer to their GitHub readme documentation to learn more about the project and its features.




Reffered: https://www.geeksforgeeks.org


TechTips

Related
How to Open MBOX File in XPS? How to Open MBOX File in XPS?
How to Turn Off Cellular Data for Specific Apps on Android? How to Turn Off Cellular Data for Specific Apps on Android?
How to Use Windows Security in Windows 11? How to Use Windows Security in Windows 11?
Best YouTube to AAC Converter Best YouTube to AAC Converter
How to Change Windows Computer Password using CMD? How to Change Windows Computer Password using CMD?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
23