Pour télécharger simplement la vidéo, vous pouvez utiliser ceci:
youtube-dl --all-subs "https://www.youtube.com/watch?v=KYBok-XGsKM"
Pour sélectionner la qualité vidéo, vous devez d'abord utiliser l'option -F pour répertorier les formats disponibles.
youtube-dl -F "https://www.youtube.com/watch?v=KYBok-XGsKM"
Et voici la sortie de votre vidéo:
[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)
Voici quelques options utiles pour les sous-titres:
--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
Et pour les vignettes:
--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
Vous pouvez également trouver plus d'informations sur la qualité de la vidéo ici