Download videos from hundreds of video sites with youtube-dl

By | 27 August 2018

Youtube-dl is a small multiplatform tool written in Python that allows to download videos from hundreds of video sites just using command line.

It requires the Python interpreter (2.6, 2.7, or 3.2+), a Windows executable that includes Python is provided, so it will work out of the box.
Youtube-dl should work in your Unix box, in Windows or in Mac OS X.

Once downloaded, if you are using Windows O.S. you just need to run it from command prompt, with the –help option you can see how many options are available.

youtube-dl --help

To download a video use the following format:

youtube-dl [OPTIONS] URL [URL...]

Lets see some examples that show you how youtube-dl works.

To see the available quality formats for a Youtube video use the –list-formats option:

youtube-dl --list-formats https://www.youtube.com/watch?v=2Vv-BfVoq4g

Choose the desidered format (the number of the first column named format code) and specify it using the -f option. The default download location is the path where you have youtube-dl but you can change it using the -o option:

youtube-dl -f 137 -o "C:\temp\%(title)s.%(ext)s" https://www.youtube.com/watch?v=2Vv-BfVoq4g

To just extract only audio from a Youtube video and save it in mp3 format you can use the –extract-audio and –audio-format options:

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=2Vv-BfVoq4g

If you get the error message ffprobe or avprobe not found. Please install one you just need to download FFmpeg, extract it and copy the .exe files from bin folder inside the youtube-dl folder.

To downloa a Youtube playlist use the following command:

youtube-dl -cik -o "C:\temp\%(title)s.%(ext)s" -–format mp4 -–yes-playlist https://www.youtube.com/playlist?list=PLaq655wqcKDnUvTOizhqwNCiiF_grL1vh

The “c” option means to resume partially downloaded files. The “i” option means to ignore any errors. The “k” means to keep the video on the disk after the post-processing is finished.

Youtube-dl is a fantastic tool that allows to download videos from many sites like Facebook, Vimeo, etc…, you can see the impressive list of supported sites.

If you don’t want use youtube-dl from command line there is also a good frontend, you just need to download youtube-dl-gui.

Iscriviti al gruppo Telegram Italian Spaghetti Geeks

https://t.me/ItalianSpaghettiGeeks

News e discussioni sulla tecnologia (internet, computer e mobile, telefonia, sat/DTT e streaming, ecc...), giveaways esclusivi prodotti tech, sconti ed offerte e molto altro ancora!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.