How to use youtube-dl script tool


There're some scripts for Mozilla Firefox or Google Chrome to download Youtube videos. But sometimes, I need to use console.

Sometimes we need a script tool to process some videos automatically. So, I found this script: youtube-dl.

It's a Python script and your computer should have it installed. It should work in *nix, Windows or MacOS. Check if it's installed before testing this tutorial.

Now, follow the steps to install it:

1. Download the script by clicking here.
2. Move the script to "/usr/bin"
3. Change the script permissions (you should have root permission): "chmod +x /usr/bin/youtube-dl"
4. Type "youtube-dl" in the shell and you should see:

This script is NOT only for Youtube sites. You can check the supported sites in this link.

If you do the steps correctly, the script should be working. Now, let's test it downloading a Youtube video.

1. Go to Youtube to get an URL. For example,

2. Go to Terminal and type: "youtube-dl"

3. If everything is ok, you'll see the download progress. The video filename will be the Video ID(Urj9W6jQPr0). It can see in "youtube-dl"

4. When it has finished, check the video using any video player that plays FLV files, for example, "mplayer Urj9W6jQPr0.flv"

Of course, this script has many parameters. I'll show you how to set the output filename:

format: youtube-dl -o <FLV file for output> <Youtube URL>
example: youtube-dl -o dorkly.flv

tool url:

Youtube changed something in their server. It reflects in old versions of the script. Hopefully, they already fixed it and you can use without problem. To update it, just type in terminal: "youtube-dl --update".

Thanks for visiting me and see you!