<?
/*
-i = input file
-deinterlace = deinterlace pictures
-an = disable audio recording
-ss = start time in the video (seconds)
-t = duration of the recording (seconds)
-r = set frame rate
-y = overwrite existing file
-s = resolution size
-f = force format
*/
// where ffmpeg is located
$ffmpeg = $_SERVER['DOCUMENT_ROOT'].'/ffmpeg.exe';
//video dir
$video = $_SERVER['DOCUMENT_ROOT']."/test_media/207.mp4";
//where to save the image
$image = $_SERVER['DOCUMENT_ROOT']."/test_media/207.jpg";
//time to take screenshot at
$interval = 100;
//screenshot size
$size = '640x480';
//ffmpeg command
$cmd = "$ffmpeg -i $video -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1";
`$cmd`;
?>