ok, thanks guys, i'll sit down with this as soon as i get some time, but this is what i did for the moment, kinda what daniel put, but in php
// full path to ffmpeg
define ('FFMPEG_PATH', 'C:/bin/ffmpeg');
// full file path
$inputvideo = 'c:/xampp/htdocs/galleryscripts/zenphoto/make_thumbs/test.wmv';
$thumbfilename = 'thumb.jpg';
if (makevideothumb($inputvideo, 300, 300, 0, 0, 20, $thumbfilename)){
// just show it to show it worked!
header("Content-type: Image/png");
print file_get_contents($thumbfilename);
}
else{
die ('thumb creation failed');
}
function makevideothumb($input, $w, $h, $hour, $min, $sec, $thumbname){
if (strlen($hour) == 1){
$hour = '0' . $hour;
}
if (strlen($min) == 1){
$min = '0' . $min;
}
if (strlen($sec) == 1){
$sec = '0' . $sec;
}
system(FFMPEG_PATH . " -i $input -vcodec png -vframes 1 -an -f rawvideo -s " . $w . "x" . $h . " -ss " . $hour . ":" . $min . ":" . $sec . " -y " . $thumbname);
if (filesize($thumbname) > 0){
return true;
}
else{
unlink ($thumbname);
return false;
}
}
not random yet, but i only need to grab the video length, and then make up a random time for it
?>