views:

374

answers:

1

Hi all,

How to create a thumbnail image with embedded video code. For example i am having the following embedded code:

> <object width="480"
> height="385"><param name="movie"
> value="http://www.youtube.com/v/6r-mz0dh6cs&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param
> name="allowFullScreen"
> value="true"></param><param
> name="allowscriptaccess"
> value="always"></param><embed
> src="http://www.youtube.com/v/6r-mz0dh6cs&amp;hl=en_US&amp;fs=1&amp;"
> type="application/x-shockwave-flash"
> allowscriptaccess="always"
> allowfullscreen="true" width="480"
> height="385"></embed></object>

The above is my sample embedded code.

Now i need to display the thumbnail image of this video and while clicking on that thumbnail image the corresponding video must play.

Now, My Prob is "HOW TO CREATE A THUMBNAIL IMAGE OF AN EMBEDDED VIDEO CODE"

thanks in advance

A: 

NEW ANSWER

Can now see the code that you are using. You can pull an image of the video straight from Youtube via URL, or use the Youtube API. See this:-

http://stackoverflow.com/questions/2068344/how-to-get-thumbnail-of-youtube-video-link-using-youtube-api

OLD ANSWER THAT IS IRRELEVANT

Your code isn't there. But I am guessing that you want to create a thumbnail from an uploaded video file.

You can do this using ffmpeg see here: http://blog.prashanthellina.com/2008/03/29/creating-video-thumbnails-using-ffmpeg/

If you want to "flick" through the video on mouseover of the thumbnail, you'll have to grab a load of thumbnails and play them in order using Javascript. You can do some calculations to work out length of the video and calculate the frame interval you want to grab the thumbnail from.

Bowen