Download YouTube videos using yt-dlp

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.

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:

  1. First, use the command above to find the available formats.
  2. Then, specify the desired formats using the -f option:

In this example, 137 is the video format (mp4 1920×1080) and 140 (m4a) is the audio format.


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *