With PHP language, I can give you a tutorial how to catch / captive a current youtube image thumbnail from the certain video. From the example below, I show to you how to get the thumbnail of IRON MAN 2 UPDATE from Youtube.
The URL : http://www.youtube.com/watch?v=1TiYlG21VAQ.
// we make a function, so it will easy to applicate
if(preg_match_all("/$regexp/siu", $url, $matches))
// Catch Youtube Thumbnail Image from <b>IRON MAN 2</b> UPDATE MOVIE
$youtube_url = "http://www.youtube.com/watch?v=1TiYlG21VAQ";
$thumbnail_of_youtube = getinput($youtube_url);
// The thumbnail image of Youtube always has a pattern like this : http://i1.ytimg.com/vi/<b>[videoid]</b>/default.jpg
echo ‘<a href="$youtube_url"><img src="http://i1.ytimg.com/vi/’ . $thumbnail_of_youtube . ‘/default.jpg"></a>’;
I’ve been posting YouTube videos on both sites for quite some time, but have only been providing text descriptions to go along with the links from the main video pages. I finally decided that I wanted to figure out how to dynamically include thumbnail image previews of the clips, not only to display on the main video pages, but also in web feeds where applicable.
However, once I had implemented a preliminary approach using that method, I quickly realized there was a very obvious pattern to the thumbnail URLs being returned with each call:
The only portion of the above URL that seems to change is the videoID between the fourth and fifth forward slashes.
So rather than calling the API multiple times to get thumbnails for all the videos presented on the page, I decided to keep all function calls local, opting to create my own internal function for extracting theYouTube video ID from my XHTML-compliant embed code using aregular expression and then inserting that between the
/2.jpg portions of the static thumbnail URL.