Menu

youtube-dl Video and Audio Download

March 17, 2017 - python

YouTube-dl is a command-line program to download videos from YouTube.com and other video sites. We will look into it’s basic usage.

Instalation

sudo pip install --upgrade youtube-dl

or

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

Download video

youtube-dl https://www.youtube.com/watch?v=xdg7--NrEak

Install audio extractor

sudo apt-get install -y libav-tools

or

sudo apt-get install ffmpeg

Download audio only

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

List of options in Python