How to download Facebook and Youtube video on linux? One of the popular Youtube downloader for Linux Mint and Ubuntu is youtube-dl . It runs on Terminal so it is very light weight and easy to use.




Because of its amazingness to handle video download process, youtube-dl many integrated in other application and can run under Windows and Mac too.

Best Video Downloader for Linux

With this software you can download audio and video in any format only using Terminal, The sofware called youtube-dl . By using URL of the Youtube video or other site video URL you can download them easily. One of the best features of this apps is that will help you decide and choose the best video quality in case multiple options are available.

Estimating Video Size Using youtube-dl

You can try this command to know the estimated download size of the video : youtube-dl -F URL

For example you can run:

youtube-dl -F https://www.youtube.com/watch?v=gWD6pB7R1V0

The output is:

youtube-dl the best video downloader for linux

From the picture above, this app give estimated size when you choose a video format. When you not select the format you will get the best available format from the video you will download.

We will you the usage of the format code above. Say you want to download the video as mp4 with 1280×720 resolution and 950k (see line 3 from bottom), it has format code as 136, then you have to download using command as below:

youtube-dl -f 136 https://www.youtube.com/watch?v=gWD6pB7R1V0

Also when you want to download the audio m4a (see format code 140) then you have to execute these command on Terminal:

youtube-dl -f 140 https://www.youtube.com/watch?v=gWD6pB7R1V0

How to Install youtube-dl

As the best tool to download youtube video, youtube-dl is available in the repository so that you can install it directy from your Terminal by executing these:

sudo apt install youtube-dl

Insert your Linux login password when needed, wait installation process and youtube-dl is ready to go.

How to Use youtube-dl

The youtube-dl has a manual page that you can read and practice. For me it is enough to download Youtube and Facebook video by executing command with format:

youtube-dl URL

Or download multiple video simply add the URL twice, the format become like this:

youtube-dl URL URL

Change the URL by using video URL Youtube or Facebook, for example:

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

Download Youtube with Subtitle with youtube-dl

This application packed with capability to download the youtube subtitle if the subtitle is available on the video. To do so you can add parameter when downloading as follow:

youtube-dl –write-description –write-info-json –write-annotations –write-sub –write-thumbnail URL

Just something like that and it will download the video best available, you need not to set the video format first.

How to Update youtube-dl

If you installed youtube-dl from repository then you will receive update from the system update or update manager. Please note that distribution packages are often outdated, so when needed you may install the update by hour hand directly without waiting the repository to update. For youtube-dl update you can check their website yt-dl.org/ and check your installed version then compare to website version.

To check version installed simply execute youtube-dl –version
This will return the installed version such as 2020.03.24

The mechanism to update you need to uninstall it, download latest version from the official website, then reinstall again. In short, below command will do the task:

sudo apt remove youtube-dl

sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl

sudo chmod a+x /usr/local/bin/youtube-dl

hash -r

sudo youtube-dl -U

youtube-dl Review

ClipGrab also a software to download youtube on Linux, but we prefer using youtube-dl because it is very simple and can resume download when connection fail or you interupt the download process. By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you don’t need to pass any special options, youtube-dl will guess it for you by default. But sometimes you may want to download in a different format, for example when you are on a slow or intermittent connection.