/In your ffmpeg.exe file path
$ffmpeg_path = 'ffmpeg';
//In your video file
$video_path = 'video_old.mp4';
// Image destination path
$image = "video_old".time().'.jpg';
// default time to get the image
$second = 1;
// get the duration and a random place within that
$comd = "$ffmpeg_path -i $video_path -deinterlace -an -ss $second -t 00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg $image 2>&1";
shell_exec($comd);
$ffmpeg_path = 'ffmpeg';
//In your video file
$video_path = 'video_old.mp4';
// Image destination path
$image = "video_old".time().'.jpg';
// default time to get the image
$second = 1;
// get the duration and a random place within that
$comd = "$ffmpeg_path -i $video_path -deinterlace -an -ss $second -t 00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg $image 2>&1";
shell_exec($comd);
0 comments:
Post a Comment