hi everyone pls help me to get ffmpeg videos thumbs in a folder my script genrate videos thumb on air like check demo here http://rdxwar.com/t/ffmpeg.php?c=Son...120&H=120&k=20
here is snippet
here is snippet
PHP Code:
<?php
/**
* @author [FaNiska]
* @copyright 2009
* Загруз центр
* Предложения, идеи, вопросы и об ошибках писать в icq 65-64-538 или на mobi-m-ru@ya.ru
*/
session_start();
include 'inc/db_connect.php';
include 'inc/function.php';
include 'inc/set.php';
header('Content-type: image/gif');
$W = intval($_GET['W']);
$H = intval($_GET['H']);
$kadr = intval($_GET['k']);
$file_info = mysql_fetch_array(mysql_query('SELECT `s_name` FROM `'.$table.'` WHERE `id` = '.$id.' LIMIT 1'));
//echo $file_info['s_name'];
$mov = new ffmpeg_movie(realpath($file_info['s_name']));
//$mov = new ffmpeg_movie($pic, false);
$wn = $mov->GetFrameWidth();
$hn = $mov->GetFrameHeight();
$frame = $mov->getFrame($kadr);
$gd = $frame->toGDImage();
if(!$W and !$H)
{
$size = explode('*',$setup['prev_size']);
$W = round(intval($size[0])); // ширина картинки
$H = round(intval($size[1])); // высота картинки
}
$new = imageCreateTrueColor($W, $H);
imageCopyResized($new, $gd, 0, 0, 0, 0, $W, $H, $wn, $hn);
imageGif($new,null,100);
?>
Comment