YouTube-DL CLI Command Reference

 22 Apr 2020  Meta Code

YouTube-DL CLI Command Reference

Install youtube-dl:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

sudo apt install ffmpeg -y

Download audio with best quality (usually opus nowadays, or m4a for older videos):

youtube-dl --audio-format best -x "https://www.youtube.com/watch?v=XXXXXXXXXX"

Shell function for best audio quality (example: youtube-audio https://youtu.be/XXXXXXXXXX):

youtube-audio() { youtube-dl --audio-format best -x ""[email protected]"" }

Download best video quality (default):

youtube-dl "https://www.youtube.com/watch?v=XXXXXXXXXX"
Webmentions & Comments

Copyright © Paramdeo Singh. Built with Jekyll and ❤ in Guyana. All Rights Reserved.

Last Site Build on Tue, 13 Apr 2021 16:55:04 -0400

1MB Club Badge