<?
/*
-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`;
?>
블로그 이미지

디츠

“말은 쉽지, 코드를 보여줘.” “Talk is cheap. Show me the code.” – 리누스 토르발스(Linus Torvalds)

,