How to install youtube-dl (the easy way)
youtube-dl is an amazing and useful command line utility to download videos from YouTube, Vimeo, and more. This articles is about how to install youtube-dl on Windows, Linux, and Mac OSX. youtube-dl is written in Python
so it’s also referred to as youtube-dl.py or youtube-dl.exe when compiled on Windows.
youtube-dl depends on ffmpeg
or avconv
for video transcoding and audio/video merging. We will install ffmpeg in this tutorial since it can be installed via choco
on Windows.
DigitalOcean offers one-click deployment of popular applications such as WordPress, Django, MongoDB, Docker, and even preconfigured Kubernetes Clusters. Deploy your next app in seconds. Get $100 in cloud credits from DigitalOcean
Ad Notice I will receive a small commission that helps support this blog at no cost to you.
Steps to Install youtube-dl on Windows
- Install chocolatey/choco
- From a privileged command prompt run
C:\> choco install -y youtube-dl ffmpeg
- Verify that youtube-dl is installed and check the version.
C:\> youtube-dl --version
Steps to Install youtube-dl on Ubuntu Linux
youtube-dl can be installed on most Linux distributions using the built-in package manager (apt, yum, etc).
# apt based distros Ubuntu, Debian, etc sudo apt install youtube-dl # yum based distros Redhat, Centos, Fedora sudo yum install youtube-dl
Steps to Install youtube-dl on Mac OSX
# OS X users can install youtube-dl with Homebrew: brew install youtube-dl # Or with MacPorts: sudo port install youtube-dl
Steps to Install youtube-dl using python/pip
This method assumes you already have python and pip installed
# python 2.7 sudo pip install youtube-dl # python 3.x sudo pip3 install youtube-dl
Download a YouTube video using youtube-dl
Lets give it a try by downloading a youtube video from the command line.
youtube-dl https://www.youtube.com/watch?v=RpOlTN2xdwg # output [youtube] RpOlTN2xdwg: Downloading webpage [youtube] RpOlTN2xdwg: Downloading video info webpage [youtube] RpOlTN2xdwg: Extracting video information [download] Destination: Wind turbine spinning in HD 1080p - short clip-RpOlTN2xdwg.f137.mp4 [download] 100% of 8.04MiB in 00:01 [download] Destination: Wind turbine spinning in HD 1080p - short clip-RpOlTN2xdwg.f140.m4a [download] 100% of 503.80KiB in 00:00 [ffmpeg] Merging formats into "Wind turbine spinning in HD 1080p - short clip-RpOlTN2xdwg.mp4" Deleting original file Wind turbine spinning in HD 1080p - short clip-RpOlTN2xdwg.f137.mp4 (pass -k to keep) Deleting original file Wind turbine spinning in HD 1080p - short clip-RpOlTN2xdwg.f140.m4a (pass -k to keep)
Here are the video file’s properties and the downloaded video
What sites can youtube-dl download videos from?
Although the name implies that youtube-dl only works for downloading videos from youtube, I was shocked to discover it supports over 1,000 other websites. Some popular ones include….
- YouTube
- Vimeo
- Twitch
- DailyMotion
- Facebook Videos
- Twitter Videos
- and 1,000+ others
4 Replies to “How to install youtube-dl (the easy way)”
i’ve installed youtube-dl, where can i find its folder location?
If you are on Windows and you installed it with choco this should help you.
c:\> where youtube-dl C:\ProgramData\chocolatey\bin\youtube-dl.exe
Hello, when I try to download a video I get this error message:
{ERROR: file:Mikakunin de Shinkoukei – Mashiro-tan Dancing!-d8MIAW2vYhc.f135.mp4: No such file or directory}
How do I fix this
idk if you have figure it out already. But anyway.
If you are on windows, try this: youtube-dl -o “C:\Users\yourusername\Downloads\%(title)s.%(ext)s” videourl
This worked for me.
Btw, read this if you want to learn more: https://github.com/ytdl-org/youtube-dl/blob/6bb266693f4b8cd92e27ea0efd46356dc254115b/README.md#options