想要从 youtube 视频中获取完整尺寸的缩略图

Wanted to get the full size thumbnails from a youtube video

我知道可以通过以下方式获取 YouTube 视频缩略图: https://img.youtube.com/vi/video_link/maxresdefault.jpg

但问题是有些视频没有显示全尺寸图像,而是显示一个空框,如下所示:

这是我要获取的视频的 link the video link

你可以参考这个thread。它表示每个 YouTube 视频都有 4 个生成的图像。列表中的第一个是全尺寸图像,其他是缩略图。

The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg

For the high quality version of the thumbnail use a url similar to this:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg

There is also a medium quality version of the thumbnail, using a url similar to the HQ:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg

For the standard definition version of the thumbnail, use a url similar to this:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/sddefault.jpg

For the maximum resolution version of the thumbnail use a url similar to this:

https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg

All of the above urls are available over http too. Additionally, the slightly shorter hostname i3.ytimg.com works in place of img.youtube.com in the example urls above.

同样基于此 link,请注意,YouTube 仅为高分辨率视频生成高分辨率静态图片。希望这对您有所帮助!