YouTube-DL CLI

 22 Apr 2020  Snippets

YouTube-DL CLI

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 Thu, 21 Oct 2021 17:49:44 -0400

1MB Club Badge

Paramdeo Singh Guyana

Riding the wave of consciousness in this treacherous mortal sea.

Technology Design Strategy Literature Personal Blogs