How to get Thumbnail Image of Video from You Tube?

youTubeLOGO

There are different  ways for getting the thumbnail image from a YouTube Video, one is using YouTube Video API. But i like a simple way to get a thumbnail , by using YouTube URL format that you will need in order to view and download a thumbnail from a YouTube video.
Each YouTube video has 4 generated images. They are predictably formatted as follows:
1. http://img.youtube.com/vi/put-youtube-video-id-here/0.jpg
2. http://img.youtube.com/vi/put-youtube-video-id-here/1.jpg
3. http://img.youtube.com/vi/put-youtube-video-id-here/2.jpg
4. http://img.youtube.com/vi/put-youtube-video-id-here/3.jpg

The first one in the above  list is a full size image and others are thumbnail images.Here is the example:
http://img.youtube.com/vi/oLbZTyDyssg/0.jpg




Similarly you can check for other thumbnails (i.e. 1.jpg, 2.jpg, 3.jpg).
For default thumbnail image use an url like this:

http://img.youtube.com/vi/put-youtube-video-id-here/default.jpg


For the high quality version of the thumbnail use an url like this:

http://img.youtube.com/vi/put-youtube-video-id-here/hqdefault.jpg


For the medium quality version of the thumbnail use an url like this:

http://img.youtube.com/vi/put-youtube-video-id-here/mqdefault.jpg


For the maximum resolution version of the thumbnail use an url like this:

http://img.youtube.com/vi/put-youtube-video-id-here/maxresdefault.jpg


For https call change http to https in any of the above urls.
Share on Google Plus

About JK STACK

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment