有没有一种方法可以在没有信箱的情况下获取高分辨率的YouTube视频缩略图? [英] Is there a way to get a high-res YouTube video thumbnail without letter-boxing?
问题描述
我根本不明白为什么YouTube API的缩略图似乎包含视频的信箱.如果我要此视频的缩略图,并使用
I don't understand at all why the YouTube API's thumbnails seem to include letter boxing for videos. If I want the thumbnail for this video, and use the methods shown here I can get the mqdefault
version that is a little too small (but thankfully doesn't have letterboxing), but if I jump up to say the sddefault
, which is a good size, I get:
( http://img.youtube.com/vi/12fR9neVnS8/sddefault.jpg)
我真的只是想要它而无需装箱.我是否必须以编程方式自行裁剪?有没有一种方法可以在没有信箱的情况下获得像样的YouTube缩略图?
I really just want it without the letter-boxing. Do I have to crop it out myself programmatically? Is there a way to get decent-sized YouTube thumbnails without letter-boxing?
推荐答案
上传的视频将以4:3的纵横比(默认,中等和标准)创建三个缩略图.
Uploaded videos create three thumbnails in a 4:3 aspect ratio (default, medium and standard).
高清视频还创建了另外两个宽高比为16:9的缩略图(高和最大)以及4:3的拇指,从而在其上提供了文字框.
High definition videos also create another two thumbnails in 16:9 aspect ratio (high and maxres) as well as the 4:3 thumbs, which gives letter boxing on those.
对于该视频,以下是可用的缩略图:
For that video, these are the available thumbnails:
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/12fR9neVnS8/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/12fR9neVnS8/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/12fR9neVnS8/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/12fR9neVnS8/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/12fR9neVnS8/maxresdefault.jpg",
"width": 1280,
"height": 720
}
您想要的声音 https://i.ytimg.com/vi/12fR9neVnS8/maxresdefault.jpg
这篇关于有没有一种方法可以在没有信箱的情况下获取高分辨率的YouTube视频缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!