When taking HTTP links, make sure to take the code. A key to the common URLs codes is below:
YouTube Video: v=xxxxxxx (where code is after the =)
YouTube Playlist: list=xxxxxxxxxxxxxxxxxxxxxxxxxxxx (where code is after the =)
YouTube Channel: @xxxxx
Twitch Video: twitch.tv/videos/xxxxxxxxxxxx
Return Available Formats
yt-dlp -F <http_link>
Download Best Video and Audio
yt-dlp -f 137+bestaudio --merge-output-format mkv -ciw -v <http_link>
Download Best Audio
yt-dlp -f 140 -ciw -x <http_link>
Download a Full Channel
yt-dlp -f bestvideo[height>=1080]+bestaudio/best -ciw -v <http_link>Â
YT-DLP General Options:
-U Update the program
-i Ignore download and post processing errors
-r Maximum download rate in bytes/s eg 50K or 4.2M
-R Number of retries, default 3
-P Path where the file should be downloaded
-o Output filename template
-w Do not overwrite
-c Resume partially downloaded files
-q Activate quiet mode
-j Quiet but print JSON for each video
-J Quiet but print JSON for each URL
-v Print debugging information
-f Format selection
-F List available formats of each video
-u Login with this account ID
-p Account password
-2 2FA code
-x Convert video files to audio-only files (requires FFMPEG and FFPROBE)
--merge-output-format Merge a video and audio file into one (requires FFMPEG)
Installation Options
Windows:
winget install yt-dlp
choco install yt-dlp
MacOS:
brew install yt-dlp
Linux:
sudo apt install yt-dlp