Quote:
Originally Posted by JamesK
I need a php file that automatically grabs a screen cap of the first second of a flv video, using ffmpeg. I want to be able to use it in LongTail Video's flash player.
Anyone know how to do this?
|
this is really rough, prob could be done better but.
Code:
<?
$video = $_GET['f'];
$movie = new ffmpeg_movie($video, false);
$frames = $movie->getFrameCount();
$frame = $movie->getFrame(50);
$im = $frame->toGDImage();
imagejpeg($im,"$video.jpg");
imagedestroy($im);
header("Content-type:image/jpeg");
readfile("$video.jpg");
?>
then call it via a flashvar
Code:
so.addVariable("image", "imgflv.php?f=video.flv");
you get the idea.