How to download YouTube videos easily
A open-source tool that is written in Python to download videos from YouTube and other media(check other websites list). There are many applications available on the internet that provide youtube videos download but are not as powerful as this one is. Sorry to say that this is not a GUI based tool but is a command-line based tool.
I will show you how to easily download videos using simple commands.
Installing Youtube dl
- Linux
- Windows
Prerequisties: Python
Getting the repository and downloading the latest version
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
Updating Youtube-dl
sudo youtube-dl -U
Prerequisties: Microsoft Visual C++ 2010 Redistributable Package (x86)
Download: Windows executable
Youtube-dl Tutorial With Examples
Normal Downloads
(For Windows Users, run the commands in the same directory in which you have downloaded the youtube-dl executable and change the command starting to “youtube-dl.exe”)
- Download videos
- To Download Best (Mostly 720p)
- To see other formats
- Select format code corresponding to video quality:
- Download Audio
- Normal Download
- Download mp3 audio format
- check different audio options:
- Download multiple videos
- Download two videos
- Download many many videos using text file
- download playlist
- Download subtitles
- download video with subtitles
- download video and subtitle file seperate
- Download video and subtitle generated by youtube(used if no subtitles available)
youtube-dl https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl -F https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl -f 24 https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl -x https://www.youtube.com/watch?v=Oj18EikZMuU
Default audio output is ogg(opus)
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl -f https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl https://www.youtube.com/watch?v=Oj18EikZMuU https://www.youtube.com/watch?v=Oj18EikZMuV
youtube-dl -a urls.txt
youtube-dl https://www.youtube.com/watch?v=ApXoWvfEYVU&list=RDRE87rQkXdNw
youtube-dl --embed-subs https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl --get-subs https://www.youtube.com/watch?v=Oj18EikZMuU
youtube-dl --get-auto-subs https://www.youtube.com/watch?v=Oj18EikZMuU
Miscellaneous options
- Download video with specific keyword
- Download file with a custom name
- video title along with playlist index number
- Set video file size limit
- Minimum size
- Maximum size
- Combine it with other options
- Download videos by date
- Particular Date Video
- Video before a date
- Video after a date
- Videos in custom range of days
- Download specific videos from the playlist
- download 5th video from the playlist
youtube-dl --playlist-items 5
- download 1, 7, 9 number video from the playlist
- set download starting number from the playlist
- set a range to download from the playlist
youtube-dl --match-title "Goku"
youtube-dl -f mp4 -o 'custom title.%(ext)s'
youtube-dl -f mp4 -o '%(title)s%(playlist_index)s.%(ext)s'
youtube-dl --min-filesize 100M
youtube-dl --max-filesize 100M
youtube-dl -f 'best[filesize<100M]' https://www.youtube.com/watch?v=7E-cwdnsiow
youtube-dl --date 20181001
youtube-dl --datebefore 20180101
youtube-dl --dateafter 20180101
youtube-dl --dateafter now-6months
youtube-dl --dateafter 20180101 --datebefore 20190101
youtube-dl --playlist-items 1,7,9
youtube-dl --playlist-start 6
youtube-dl --playlist-start 6 --playlist-end 10




