View Single Post
Old 05-20-2009, 02:57 AM  
JamesK
hi
 
Industry Role:
Join Date: Jun 2002
Posts: 16,731
Ok sweet it works like a charm! Here's a recap of the whole situation & solution for those with the same problem:

Since LongTail's FLV player does not automaticallly create a preview on the actual video page I had two choices, either enable autoplay so no preview is required, or use a little ffmpeg php script to make a screen cap of the video. The second seemed like a better option to save a lot of bandwidth (it's still user friendly since he only has to click a big ass play button to start the video).

I installed FFMPEG and FFMPEG-PHP (not sure if I needed both but whatever they're both on my server here now. Here are the tutorials for Linux:

FFMPEG tutorial: http://www.mysql-apache-php.com/ffmpeg-install.htm
FFMPEG-PHP tutorial: http://ffmpeg-php.sourceforge.net/

I made a PHP file (thanks Fris & Killswitch) called imgpreview.php and added this code to it.

Code:
<?
$movie = new ffmpeg_movie($_GET['f'], false);
$frame = $movie->getFrame(50);
$im = $frame->toGDImage();
header('Content-type:image/jpeg');
imagejpeg($im);
imagedestroy($im);
?>
And added image=imgpreview.php?f=videofile.flv to the flashvars. If you're using TubeAce like me, you should replace videofile.flv to {video_file} and you're set!

Thanks again guys.
__________________
M3Server - NATS Hosting
JamesK is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote