To simply download the video, you can use this:
youtube-dl --all-subs "https://www.youtube.com/watch?v=KYBok-XGsKM"
To select the video quality, you should first use the -F option to list the available formats.
youtube-dl -F "https://www.youtube.com/watch?v=KYBok-XGsKM"
And this is the output for your video:
[youtube] KYBok-XGsKM: Downloading webpage
[youtube] KYBok-XGsKM: Downloading video info webpage
[youtube] KYBok-XGsKM: Extracting video information
WARNING: unable to extract uploader nickname
[info] Available formats for KYBok-XGsKM:
format code extension resolution note
249 webm audio only DASH audio 52k , opus @ 50k, 4.19MiB
250 webm audio only DASH audio 75k , opus @ 70k, 5.42MiB
140 m4a audio only DASH audio 129k , m4a_dash container, mp4a.40.2@128k, 10.59MiB
171 webm audio only DASH audio 131k , vorbis@128k, 7.66MiB
251 webm audio only DASH audio 135k , opus @160k, 9.58MiB
278 webm 256x144 144p 98k , webm container, vp9, 30fps, video only, 6.59MiB
160 mp4 256x144 144p 114k , avc1.4d400c, 15fps, video only, 9.04MiB
242 webm 426x240 240p 205k , vp9, 30fps, video only, 11.47MiB
133 mp4 426x240 240p 265k , avc1.4d4015, 30fps, video only, 20.11MiB
243 webm 640x360 360p 362k , vp9, 30fps, video only, 21.93MiB
134 mp4 640x360 360p 602k , avc1.4d401e, 30fps, video only, 20.42MiB
244 webm 854x480 480p 662k , vp9, 30fps, video only, 37.82MiB
135 mp4 854x480 480p 1020k , avc1.4d401f, 30fps, video only, 42.62MiB
247 webm 1280x720 720p 1353k , vp9, 30fps, video only, 81.53MiB
136 mp4 1280x720 720p 2013k , avc1.4d401f, 30fps, video only, 84.69MiB
137 mp4 1920x1080 1080p 2438k , avc1.640028, 30fps, video only, 157.71MiB
248 webm 1920x1080 1080p 2593k , vp9, 30fps, video only, 162.48MiB
264 mp4 2560x1440 1440p 6973k , avc1.640032, 30fps, video only, 459.58MiB
271 webm 2560x1440 1440p 7523k , vp9, 30fps, video only, 485.66MiB
313 webm 3840x2160 2160p 19991k , vp9, 30fps, video only, 1.34GiB
36 3gp 320x? small , mp4v.20.3, mp4a.40.2
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
Here are some useful options for subtitles:
--write-sub
Write subtitle file
--write-auto-sub
Write automatically generated subtitle file (YouTube only)
--all-subs
Download all the available subtitles of the video
--list-subs
List all available subtitles for the video
And for thumbnails:
--write-thumbnail
Write thumbnail image to disk
--write-all-thumbnails
Write all thumbnail image formats to disk
--list-thumbnails
Simulate and list all available thumbnail formats
You can also find more information about the quality of video here
youtube-dl
? – leetbacoon Apr 08 '18 at 08:59youtube-dl [youtube-link]
? – leetbacoon Apr 08 '18 at 09:12--write-auto-sub
,--write-sub
and--add-metadata
options. – nxnev Apr 08 '18 at 09:20youtube-dl [youtube-link]
. That's the magic of configuration files, you don't need to write all those options at runtime in the command line. – nxnev Apr 08 '18 at 09:20youtube-dl
to download the highest resolution thumbnail, too? – leetbacoon Apr 08 '18 at 09:32--embed-subs
and--add-metadata
, not the--write
ones. It's supposed thatyoutube-dl
downloads the highest resolution thumbnail by default, in my example it downloads this thumbnail. What video are you trying to download? – nxnev Apr 08 '18 at 09:50Caption author (French) Mr. Apricot
,Category Entertainment
, etc.)Also stuff like video uploader, publish date, tags, and user watermark image?
– leetbacoon Apr 08 '18 at 11:00.info.json
file, but it seems thatyoutube-dl
doesn't support the credits, watermark and profile picture. Please bear in mind thatyoutube-dl
is not a fully featured scraping utility, it is intended to be used just as a video downloader utility. If you need even more functionality, you should ask for it in its GitHub site or look for another program. – nxnev Apr 08 '18 at 11:08--youtube-skip-dash-manifest
option? For some reason I get 404s on youtube videos when this option is added -- removed it works fine (yes everything's up to date) – leetbacoon Sep 16 '19 at 22:38youtube-dl
wouldn't have been able to download certain videos if the--youtube-skip-dash-manifest
option were not present. Just edited out that option, thanks for telling me. – nxnev Sep 17 '19 at 16:46--prefer-ffmpeg
flag is the default now. That is, youtube-dl uses FFmpeg by default rather thanavconv
– Hassan Ahmed May 31 '20 at 13:05