I installed ffmpeg and ffmpeg-php to my dedicated server and with a small script i am trying to extract an image from specific second.
<?php
$extension = "ffmpeg";
$extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
$extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
$timeOffset = "00:00:30";
$videoPath = "sample.mp4";
$extensi = ".jpg";
$folder = "images/";
$finalfilename = $folder . $randomfilename . $extensi;
echo $extension_fullname; //I AM GETING THIS /usr/lib64/php/modules/ffmpeg.so
if (exec("ffmpeg -ss $timeOffset -i $videoPath -frames:v 1 $finalfilename")){
echo "Done";
}else{
echo "Error";
}
?>
as you can see in my execution command ther is ffmpeg, but how can i find the absolute path to ffmpeg? Take a look in my screenshot maybe this helps you to tell me..
My last question is what is ffmpeg-php? Do i need it? i already install it.
Thank you