How to download videos from Youtube with #Youtube-dl

Artículo en español más abajo…


# Youtube-dl is a script that allows us to download videos from various sites including youtube-dl was written by Ricardo Garcia Gonzalez and many contributors
       from all around the internet.  This manpage was written by Rogerio
       Brito <[email protected]>;.


Supported sites playlists (playlist URLs in «view_play_list» form). searches, using the special keyword «ytsearch» as a form of URL, as in «ytsearch:cute kittens». Do not forget the quotes if you want to include spaces in your search. Other variants are «ytsearchN» to download more than the first result, with N being a number, and «ytsearchall». user videos, using user page URLs or the specifc «ytuser» keyword.
    Google Video.
    Google Video searches («gvsearch» keyword).
    Photobucket videos.
    Yahoo! video.
    Yahoo! video searches («ybsearch» keyword).
    The Daily Show / Colbert Nation.
    The Escapist.
    A generic downloader that works in some sites.


#Youtube-dl es un script que nos permite realizar descargas de vídeos desde diversos sitios entre ellos


To install the «YouTube-dl« in the terminal type // Para poder realizar la instalación de «YouTube-dl» en la terminal escribimos:


$ sudo apt-get install youtube-dl


To be able to download the video you want (note the license type for each video, in case we use one with a Creative Commons license) we write / /Para poder realizar la descarga de el video que desees (ten en cuenta el típo de licencia de cada video, para el caso usaremos una que tenga una licencia Creative Commons)  debemos escribir


$ youtube-dl URL_FROM_VIDEO



And finally we have the video in FLV format, if you want to check other options, which are very powerful in the terminal type: // Y finalmente tendremos el video en formato FLV, si deseas verificar otras opciones, que son muy poderosas en la terminal escribe:


$ man youtube-dl


       youtube-dl accepts options in the following categories

       -h, –help
           Print help text and exit.

       -v, –version
           Print program version and exit.

       -U, –update
           Update this program to the latest stable version.

       -i, –ignore-errors
           Ignore errors during download and continue processing.

       -r L, –rate-limit=L
           Limit the download speed to the specified maximum L (e.g., 50k or

       -R R, –retries=R
           Number R of retries for a given download (default is 10).

           The number N of the video in a playlist where we should start
           downlading (default is 1).

           The number N of the video in a playlist where we should stop
           downloading (default is -1, which stands for the last video in the

           Display how youtube-dl will identify itself (the User-Agent string)
           to the remote server.

       -u UN, –username=UN
           Specify the youtube account username UN. Some videos require an
           account to be downloaded, mostly because they’re flagged as mature

-p PW, –password=PW
           Like the username, specifies the account password to be PW.

       -n, –netrc
           Get authentication data from the standard unix .netrc file on the
           user’s home directory. The machine name is youtube regarding this

       -f FMT, –format=FMT
           Specify the video format (quality) in which to download the video.

           For, in particular, the meaning of the format codes is
           given as:

           WebM video at 480p: 43
           WebM video at 720p: 45
           H264 video in MP4 container at 480p: 18
           H264 video in MP4 container at 720p: 22
           H264 video in MP4 container at 1080p: 37
           H264 video in FLV container at 360p: 34
           H264 video in FLV container at 480p: 35
           H263 video at 240p: 5
           3GP video: 17

           Note that not all videos are available in all formats and that
           other sites supported by youtube-dl may have different conventions
           for their video formats.

           By default, youtube-dl will download the best available format; if
           you want to download the worst format to save bandwidth and time,
           use «-f» worst.

           Downloads all formats for which a video may be available.

           Limit the maximum quality of the videos to downloads to FMT.

       -q, –quiet
           Activates quiet mode, avoiding many messages being written to the

-s, –simulate
           Simulate the operation, but do not download the video. Useful for

       -g, –get-url
           Simulate the operation, like quiet mode, but show the URL that
           would be used to download the video. Can be used with other
           download tools like wget or aria2c.

       -e, –get-title
           Simulate the operation, like quiet mode, but show the title of the
           video that would be downloaded.

           Simulate the operation, like quiet mode, but print the URL of of
           the video’s thumbnail.

           Simulate the operation, like quiet mode, but print the description
           of the video.

           Simulate the operation, like quiet mode, but print the output

           Do not print the progress bar during downloads.

           If possible, set the title of the console window with the progress
           of the download.

       -t, –title
           Use the title of the video in the file name used to download the

-A, –auto-number
           When downloading multiple videos from a playlist, automatically
           number them, in sequence, starting from 00000.

       -o TPL, –output=TPL
           Specify a template TPL for the names of the files to be created
           when they are downloaded. The default filename is video_id.flv. But
           you can also use the video title in the filename with the «-t» or
           «–title» option, or preserve the literal title in the filename
           with the «-l» or «–literal» option.

       -a F, –batch-file=F
           Specify the name of a file containing URLs of videos to download
           from youtube in batch mode. The file must contain one URL per line.

       -w, –no-overwrites
           Do no overwrite already existing files.

       -c, –continue
           Resume partially downloaded files.

           Store the received cookies to file F (the «cookie jar»).

           Do not append the .part suffix do files that have not yet been

           Do not use the Last-modified header to set the file modification

           Create an audio-only file extracted from the video downloaded.
           Requires that ffmpeg and ffprobe be installed.

           Set the audio format to be used for the extraction. Possible values
           are best, aac, mp3, with best being the default.