YouTube-DL CLI

 22 Apr 2020  Snippets

YouTube-DL CLI

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, 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. Made with ☕️ in Guyana. All Rights Reserved.

Last Site Build on Tue, 30 Nov 2021 19:17:38 -0500

1MB Club Badge

Paramdeo Singh Guyana

Riding the wave of consciousness in this treacherous mortal sea.

Technology Design Strategy Literature Personal Blogs