View file vid.php
<?php $file=$_GET['f']; $frame = 1; $mov = new ffmpeg_movie($file); $w = $mov->GetFrameWidth(); $h = $mov->GetFrameHeight(); $ff_frame = $mov->getFrame($frame); if ($ff_frame) { $gd_image = $ff_frame->toGDImage(); if ($gd_image) { $des_img = imagecreatetruecolor(120, 100); $s_img = $gd_image; imagecopyresampled($des_img, $s_img, 0, 0, 0, 0, 120, 100, $w, $h); header('Content-type: image/gif'); imagegif($des_img);}} ?>