Jump to content

[SOLVED] Auto-generate thumbnails for video/flash files?


tbare

Recommended Posts

Hello, all...

 

I'm wondering if there is a (good) way to auto-generate a thumbnails for video (.avi, .wmv, etc.) and flash (.swf) files and display them in a page.

 

Basically, i want to be able to list the files in a directory containing these file types, and have a thumbnail displayed for the file, w/o having to create thumbnails for the files manually (thus, making the site easily updated).

 

Is it possible? i do not have SQL installed on this server, and (as of now) the owner of said server has no plans on installing it. I'd complain, but he's hosting for free... soo... herein lies said problem.

 

If anyone could point me in the right direction, it would be much appreciated...

 

Thanks in advance,

 

TBare

Link to comment
Share on other sites

There is no easy way to do this (I don't think php has any built in functions to handle video files); you need to install the ffmpeg-php extension, with which you can do this sort of stuff... once it is installed if you want to get say, the middle frame, you'd do something like

 

$frame = new ffmpeg_movie("/path/to/movie",0);
$frame->.5*getFrameCount();
$frame->getFrame($frame);

 

... rest of the stuff to resize and save $frame as a thumbnail.

 

because your host said he won't install sql, I doubt they'd install ffmpeg-php...

Link to comment
Share on other sites

he never said he "wouldn't" install sql, but rather, hasn't installed it after several attempts... and actually, i think he may have installed ffmpeg-php... if so (or if he would later), i'll read more into this at that point... this is more of a pre-lim to seeing if it's even possible before i start actually diving into it... i'm working on a re-design of my website, and trying to make it as easy to add content to as possible so that i will actually be encouraged to do it (as it is now, i have to manually create the thumbnails of the files, then add the links, add the cells in the table, etc... it's just a pain... hopefully i'll get this working...

 

Thanks!!

 

(btw, current site is: http://www.wannafork.com... good stuff if you're bored or just want to waste some time...)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.