Krishna Krishna - 2 months ago 13x
Android Question

How to make YouTube video thumbnails in android?

In my android Activity I want to play video from YouTube through YouTube application or some other. For that I want to load thumbnails of the video in my activity.

Is this possible? If so, how?


YouTube puts the thumbnails of the video at a specific predictable URL. It would be a bit of a pain, but I'm sure you could find a way to display the images from the URL, or to download them and then display them.

Here's information on my blog on what those thumbnail URLs are:

I'll copy and paste what I wrote in the blog post:

Look at the link for the video–for example,

Take the video ID… the portion after “v=”, in this case GDFUdMvacI0. If the URL is longer than that, only go until the next ampersand. For example, is the same, GDFUdMvacI0.

Then just substitute your video ID for the video ID in the following URLs to these thumbnail images:

0.jpg is a full-sized image. The other three are very small (120×90) and are taken automatically by YouTube from three certain points in the video.