There are times you may need to download a video from an online platform, whether for reference, for offline needs, or even for unique situations where you have lost access to a platform that you have videos hosted on.
youtube-dl allows you to do just that!
youtube-dl is a command-line program to download videos from YouTube.com and a few more sites.
This quick guide will cover the installation and basic usage of
IMPROTANT NOTE: As of October 23, 2020, the youtube-dl source code repository has been taken down from Github due to a DMCA complaint for copyright infringement, filed by the RIAA. The latest version of youtube-dl may still be downloaded and installed using Homebrew, or on the official website - but do ensure that the content you are downloading is not under copyright protection.
Note: You don't need
youtube-dl to download videos from frame.io, just jump to the Downloading Videos from Frame.io section for a quick way to do it using your browser’s inspector.
Note: Downloading videos that are subject to copyright may be illegal, depending on the platform - especially if it's not for personal use. Some platforms don't allow download of any content altogether unless explicitly permitted by them. Youtube, as of December 2019, does not allow download of any videos from their platform: https://www.youtube.com/static?template=terms. Here are Vimeo's terms: https://vimeo.com/terms. Always ensure that the platform you are downloading videos from allows you to do so - or you may run into legal problems.
Quick Command Reference
The most basic command is simply
youtube-dl, followed by the link of the video you would like to download, wrapped in quotes.
youtube-dl will attempt to download the highest quality video available and save it in the folder you are running the command from - the Home folder by default.
youtube-dl is a command line program and does not come in the form of an app - so you'll need to download it and run it from the command line. Launch the Terminal App in OSX or the Command Prompt on Windows to start.
You can find download details for each platform here: Download Details.
There are a number of options if you are a UNIX (OSX, Linux) user - If you are on OSX we recommend to use Homebrew - it'll make installation swift and provides easy uninstall.
Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
On Windows you may look into Chocolatey instead. (Choose Basic Install from the dropdown menu).
You can install Homebrew in a breeze by following the instructions on their official page: https://brew.sh.
Once installed, you can simply run
brew install youtube-dl in a new Terminal/Command Prompt window to install
For a list of installed software you can type:
To uninstall simply type:
brew uninstall youtube-dl.
For a list of commands type:
For the manual page type:
Youtube-dl Usage Tips
youtube-dl installed, open the Terminal app on OSX, or the Command Prompt on Windows so you can run the
If you are unfamiliar with the command line it essentially works by specifying a command, followed by options that define how the command is run.
The basic usage for
youtube-dl is as simple as typing
youtube-dl, then passing the full link of the video that you would like to download, in quoted form - for example:
youtube-dl will attempt to download the best quality version of the video and save it in the location from which you ran the command from - the default is the Home folder.
Changing Directory Basics
You can easily change the location where the video is downloaded to using the Change Directory command:
cd in the command line
To specify a new location just type
cd, then drag and drop a folder into the Command Line and hit
By typing just
cd in OSX or Linux, the location will be set back to the Home folder. In Windows it will display the current location. To display the current location in OSX or Kinux, you can use the
cd .. the location will be set to the parent directory.
Choosing Different Formats
You can ask
youtube-dl to list the different formats available for any video using the
-F flag. A list of available formats should appear, identified by a Format Code.
To specify a format to download you can use the lowercase
-f flag, followed by the Format Code.
You can also specify the
worse audio or video format simply by using:
For more info on formats see the Format Selection section in the documentation of one of the
youtube-dl available repos.
When you open a new command line window and run
youtube-dl, the default output location will be the Home folder. If you change location using the
cd command, that will be the new location where the video will be downloaded to.
Note: To check what location you are in, you can type
pwd and hit enter on a UNIX system, or
cd on Windows.
youtube-dl download the video to a custom folder you can use the
-o flag (for output).
To specify a custom file name you can either type it manually or use the handy shortcuts provided. A shortcut is defined using this syntax:
%(metadata)s for Text and
%(metadata)d for Numbers.
For a list of available metadata see the Output Templates section in the documentation of one of the
youtube-dl available repos.
For more info on the syntax used see: Python String Formatting.
Downloading Videos from Frame.io
Occasionally, you may receive a Frame.io link without a download button. You may use this quick hack to download it anyways.
- Open the Frameio link in your browser window.
- In the quality options of the video player, choose the resolution you want.
- Right click anywhere outside the video frame and choose Inspect Element to open the browser Inspector Window. Note: This may vary depending on which browser you are on, but every modern browser has an Inspector Window.
- Type in the search bar of the inspector:
- The inspector should jump to a
<video>tag. Locate the
srcattribute within that tag, double click the link specified after it and copy it.
- Paste the link in the browser URL bar.
- A download prompt should appear asking you where you want to save the video. Then click