youtube-dl - download videos from youtube.com or other video platforms

To download youtube videos
$ youtube-dl https://url_to_download

To update Youtube-dl
$ sudo youtube-dl -U

To download video or playlist with a custom name
$ sudo youtube-dl -U 'my custom name videos' https://www.youtube.com/url
$ youtube-dl -o '~/Downloads/my custom name videos' https://www.youtube.com/url
$ youtube-dl -o '%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s' https://www.youtube.com/url

To download multiple videos
$ youtube-dl <url1> <url2> <url3>

To download from a file
$ cat url.txt
<url1>
<url2>
<url3>
<url4>
$ youtube-dl -a url.txt

To download audio-only from a video

To download mp3 formats
$ youtube-dl -x --audio-format mp3 https://www.youtube.com/url

To download video with description, metadata, annotations, subtitles and thumbnail
$ youtube-dl --write-description --write-info-json --write-annotations --write-sub --write-thumbnail https://www.youtube.com/url

To List all available formats of video or playlist
$ youtube-dl --list-formats https://www.youtube.com/url

To display the size of YouTube videos

To Download videos in your preferred format, say for example MP4
$ youtube-dl -f mp4 https://www.youtube.com/url

To Set size limit for videos
$ youtube-dl --min-filesize 200M <youtube_url>
$ youtube-dl --max-filesize 1000M <youtube_url>

To Set download speed limit
$ youtube-dl -r 100K <url>

To resume downloads
$ youtube-dl  -c  <url>

To display help options
$ youtube-dl --help



regards,
T.Dhanasekar