13

我有兴趣为我的应用程序获取 youtube 视频的预览图像,我正在使用预览的 url:

http://img.youtube.com/vi/EqWRZrupLrI/0.jpg

但这有上下两排黑色小排,我希望它更大。我读过 0 是更大的图景。

有谁知道是否可以获得具有更好图像的网址?对于我的项目,我需要图像在网址上

我很感激帮助

问候 :)

4

3 回答 3

20

0.jpg is the full-size 480p thumbnail and there is no bigger thumbnail except for full HD videos (maxresdefault.jpg).

But why do you expect a bigger thumbnail for such a video ? Your video example has a resolution of 240p, the thumbnail is already much bigger than the video resolution.

于 2013-04-25T19:02:27.870 回答
3

Please check the following SO post:

How do I get a YouTube video thumbnail from the YouTube API?

YouTube thumbnail link doesn't work in all cases

It will surely solve your problem. I recommend to query the youtube api to get the thumbnail with max resolution.

于 2013-04-25T18:59:27.163 回答
3

每张图片都有 4 个类别,例如

https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg 

你也可以通过这个获得更多的图像尺寸

-- 默认

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

——为了高品质

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

-- 中等质量

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

-- 对于最大尺寸

https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
于 2017-12-05T08:47:06.153 回答