Video Picture Linking!

machineman's Avatar, Join Date: Aug 2011
Light Poster
My blog is regularly updated with videos so the main page loading speed isn't very fast:
vidstowatch.com

I'm going to try and explain this as best i can: Basically instead of being able to play videos from the main page. I'd like to have just the image of the video (from Youtube, Metacafe, College Humor or any other video site i may use) on the main page that once selected re-directs the user to the page with the video on where they can play the video properly.

Does that make sense and is it possible?

Thank you
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Yes why not and where do you host your videos?
0
ritsmontu's Avatar
Banned
You can use the Youtube API Tools to get thumbnail images.
0
ritsmontu's Avatar
Banned
Quote:
Originally Posted by machineman View Post
My blog is regularly updated with videos so the main page loading speed isn't very fast:
vidstowatch.com

I'm going to try and explain this as best i can: Basically instead of being able to play videos from the main page. I'd like to have just the image of the video (from Youtube, Metacafe, College Humor or any other video site i may use) on the main page that once selected re-directs the user to the page with the video on where they can play the video properly.

Does that make sense and is it possible?

Thank you
Quote:
Each YouTube video has 4 generated images. They are predictably formatted as follows:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
For the high quality version of the thumbnail use a url similar to this:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
For the maximum resolution version of the thumbnail use a url similar to this:

http://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
PHP Code:
function print_video($id)
{
echo 
"<a href='http://www.youtube.com/watch?v={$id}' target='_blank'>
<img src='http://img.youtube.com/vi/
{$id}/0.jpg' />
</a>
"
;


Source: http://stackoverflow.com/questions/2...ng-youtube-api

Last edited by ritsmontu; 27Dec2011 at 21:11..