How To Web

How to Get Youtube Video Thumbnail Easy Method

How to Get Youtube Video Thumbnail Easy Method
Written by Aamir Sabir

HOW TO GET YOUTUBE VIDEO THUMBNAIL EASY METHOD

Today i will show you the very easy method to get the video thumbnails from youtube video files. It’s very easy method to do the job. These methods are also very useful for developers who use to call the thumbnails in their apps. Some times we need to reuse the thumbnail for another project or purpose that we previously used on youtube upload. We search our sources but can’t find that thumbnail on our computer. So the only hope is remain to get that thumbnail from youtube video file. ok let’s start the procedure. Keep reading “How to Get Youtube Video Thumbnail Easy Method”

DIFFERENT WAYS TO GET YOUTUBE VIDEO THUMBNAIL

There are many ways to get the youtube video thumbnail but some of them are difficult to get and some of them of advance users. But now i am showing you the very easy method even a novice can use to get the youtube video thumbnail without ease.

VERY EASY METHOD

When you upload a video thumbnail to your video the youtube automatically makes four thumnails from the single one. I mean each youtube video has 4 generated images and they are named 0, 1, 2, and 3. I recommend the only first thumbnail is useful and it’s named “0” . you can get them by following the below steps.

For High Quality Image Thumnail

  • First you need to know the URL of the youtube video.
  • You only need the video ID from the youtube video URL.
  • For example, https://www.youtube.com/watch?v=hqqN7ToG2q0
  • I color the video ID to blue text. So i clear you only need that and it is the video ID.
  • Second part of this is you need to paste the Video ID into the below code where i mention’s.
  • http://img.youtube.com/vi/paste-youtube-video-id-here/maxresdefault.jpg
  • I color it blue. Copy and paste the Video ID code onto the Video-id-here text.
  • For example i used the above mention’s URL to get the thumbnail of that video.
  • http://img.youtube.com/vi/hqqN7ToG2q0/maxresdefault.jpg
  • That’s All, Try it few times.

Unfortunately not all videos have the thumbnail images set, so the above method doesn’t work. Then use the below method it’s guaranteed to work”

  • First you need to know the URL of the youtube video.
  • You only need the video ID from the youtube video URL.
  • For example, https://www.youtube.com/watch?v=hqqN7ToG2q0
  • I color the video ID to blue text. So i clear you only need that and it is the video ID.
  • Second part of this is you need to paste the Video ID into the below code where i mention’s.
  • https://img.youtube.com/vi/video-id-here/0.jpg
  • I color it blue. Copy and paste the Video ID code onto the Video-id-here text.
  • For example i used the above mention’s URL to get the thumbnail of that video.
  • https://img.youtube.com/vi/hqqN7ToG2q0/0.jpg
  • That’s All, Try it few times.

HOW TO GET THE YOUTUBE VIDEO THUMBNAIL FOR DEVOLOPERS

Down below i show you the codes to get the thumbnail for PHP and API. Below are the code for API first then for the PHP.

 

$videoid = ‘cMC_PtgKDJE’;
$apikey = ‘xyzxyzxyz’; //My API key

$json = file_get_contents(‘https://www.googleapis.com/youtube/v3/videos?id=’.$videoid.’&key=’.$apikey.’&part=snippet’);
$ytdata = json_decode($json);
print_r($ytdata);
echo ‘<h1>Title: ‘ . $ytdata->items[0]->snippet->title . ‘</h1>’;
echo ‘Description: ‘ . $ytdata->items[0]->snippet->description;

Code for the PHP

$videoid = ‘cMC_PtgKDJE’;
$apikey = ‘xyzxyzxyz’; //My API key

$json = file_get_contents(‘https://www.googleapis.com/youtube/v3/videos?id=’.$videoid.’&key=’.$apikey.’&part=snippet’);
$ytdata = json_decode($json);
print_r($ytdata);
echo ‘<h1>Title: ‘ . $ytdata->items[0]->snippet->title . ‘</h1>’;
echo ‘Description: ‘ . $ytdata->items[0]->snippet->description;

 

Finally i hope this post is very useful and helpful to all of you. I am trying to write it in very simple words to get easily by anyone. If you like my post “How to Get Youtube Video Thumbnail Easy Method”. Then don’t forget to share, comments and like my facebook page and let me know your thoughts in comments. Thanks.

About the author

Aamir Sabir

Its me Aamir, Full time Internet entrepreneur and Graphics Artist. Blog Writer and Freelancer. Here i am helping people to share my Computers, Mobiles and Internet Experience with users.

Leave a Comment

Comments links could be nofollow free.