YouTube video thumbnail

28 07 2010

Here a little tip/work-around to get a thumbnail from a media available on Youtube.

Based on the url of the YouTube video, you can rebuild it to get a frame from the media :

public string GetMediaThumbnail(string url)
{
     url = url.Split('?')[0];
     url=url.Replace("http://www.youtube.com/v/", "http://img.youtube.com/vi/");
     url += "/1.jpg";
     return url;
}

No pretention about it but to keep in mind…

Advertisement

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.