Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube maxresdefault thumbnails

I need to use the maxresdefault version of my YouTube video thumbnails for a website, however upon developing the code to achieve this I have found that not all of my videos have these thumbnails available, despite the videos all being 1080p.

Is there a way to automatically generate new high-res thumbnails for all of my videos?

like image 391
Daniel Keeble Avatar asked Jan 13 '16 09:01

Daniel Keeble


People also ask

Does YouTube auto generate thumbnails?

Add automatic or custom thumbnails Open the YouTube app . Your videos. Edit thumbnail . Select an auto-generated thumbnail or tap Custom thumbnail to create a custom video thumbnail from an image on your device.

How do you get the URL of a YouTube thumbnail?

In YouTube Data API v3, you can get video's thumbnails with the videos->list function. From snippet. thumbnails. (key), you can pick the default, medium or high resolution thumbnail, and get its width, height and URL.

Does the maxresdefault thumbnail always exist?

The maxresdefault thumbnail does not always exist. This works. I don't understand why isn't this the accepted answer. No answer really provided that info which the question was is really about.

How to view YouTube thumbnail image in high resolution?

How to View Youtube Thumbnail Image in High Resolution? You can easily view (and download) the thumbnail of any YouTube video in high or default resolution by searching for the OG image tag in the HTML source page of the video.

How do I change the default YouTube video thumbnail?

A thread on the YouTube Help Forums resolved it. Simply go into the Video Manager (found under Creator Studio), change the thumbnail to one of the original 3 defaults generated by YouTube, save it, leave the page, and then change back to the original thumbnail. Somehow, this generated the maxresdefault.jpg for me and fixed it.

What is the difference between hqdefault and maxresdefault image?

Note that hqdefault.jpg will give you the standard definition image and maxresdefault.jpg will give max resolution image. Also note that not all videos will have max resolution images, but all will have standard definition images.


3 Answers

You can use YouTube Data API to retrieve video thumbnails, caption, description, rating, statistics and more. With the YouTube Data API, you can add a variety of YouTube features to your application.

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

 http://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:

http://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:

http://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:

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

Here's the Official Google Documentation for Youtube API https://developers.google.com/youtube/v3/docs/thumbnails

Here's where I get my answer: How do I get a YouTube video thumbnail from the YouTube API?

like image 65
Android Enthusiast Avatar answered Oct 23 '22 12:10

Android Enthusiast


I just ran into the same issue while working on a new website project using videojs-youtube. Some of my videos simply didn't have a maxresdefault.jpg and were thus throwing an error. A thread on the YouTube Help Forums resolved it.

Simply go into the Video Manager (found under Creator Studio), change the thumbnail to one of the original 3 defaults generated by YouTube, save it, leave the page, and then change back to the original thumbnail. Somehow, this generated the maxresdefault.jpg for me and fixed it. I'm going to assume this is a bug on YouTube's end where it just doesn't generate the image.

like image 23
Aaron Chamberlain Avatar answered Oct 23 '22 12:10

Aaron Chamberlain


Updated as on December 2019.

https://i.ytimg.com/vi_webp/<VIDEO_ID>/maxresdefault.webp
https://i.ytimg.com/vi/<VIDEO_ID>/maxresdefault.jpg
https://i.ytimg.com/vi/<VIDEO_ID>/hqdefault.jpg

You can add a bookmarklet to your browser:

javascript:window.open('https://i.ytimg.com/vi/' + /^.*(youtu.be\/|v\/|embed\/|watch\?|youtube.com\/user\/[^#]*#([^\/]*?\/)*)\??v?=?([^#\&\?]*).*/.exec(window.location)[3] + '/maxresdefault.jpg', target = "_blank")

If you click on it, while viewing a YouTube video, it will open the thumbnail image for the video in a new tab.

like image 31
Mr. Polywhirl Avatar answered Oct 23 '22 13:10

Mr. Polywhirl