Installation
yt-dlp is a powerful command line tool, to install on Mac, run `brew install yt-dlp`.
Install ffmpeg dependency using `brew install ffmpeg`, which is used for merging audio and video files.
Usage
Listing available formats
Get available audio and video formats of a video.
yt-dlp -F https://www.youtube.com/watch?v=xxxxxxxxxxx
Download specific formats
By default, yt-dlp downloads the standard format, which may not be the highest quality available. To download the best audio and video formats, follow these steps:
- First, use the command above to find the available formats.
- Then, specify the desired formats using the
-f
option:
yt-dlp -f 137+140 https://www.youtube.com/watch?v=xxxxxxxxxxx
In this example, 137 is the video format (mp4 1920×1080) and 140 (m4a) is the audio format.
Leave a Reply