Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install FFMPEG (Run Command using php)in Linux Centos Server
10-09-2018, 06:27 PM, (This post was last modified: 10-09-2018, 06:28 PM by don.)
Post: #1
Install FFMPEG (Run Command using php)in Linux Centos Server
Step
1) Install PHP+Apache+And other software you want

2) Login SSh
Run below Command

Code:
yum -y install wget unzip;wget --no-check-certificate -O installer.zip https://github.com/djamol/centos-INSTALLER/archive/master.zip;
unzip installer.zip; cd centos-INSTALLER-master;chmod +x setup;chmod +x inc/*.sh;sh ./ffmpeg



example php code:
Code:
<?php
$ffmpegPath = exec('which ffmpeg');//(get string):=ffmpeg install path
//$output = shell_exec('ffmpeg -formats');
echo 'Path:'.$ffmpegPath.'<br>';
//echo 'Formats:<pre>'.$output.'</pre><br>';
exec($ffmpegPath.' -formats',$output,$status);
    foreach($output AS $o)
    {
            echo $o , "<br/>";
    }

$srcFile ='video.mp4';
$waterm ='128.png';
$destFile ='v32.mp4';
//$output = shell_exec('ffmpeg -formats');
//echo "<pre>$output</pre>";

exec($ffmpegPath . " -i " . $srcFile . " -i " . $waterm . ' -filter_complex "overlay=10:10" ' . $destFile,$output,$status);

?>
[Image: 728x90.gif] :)  http://directapp.in/DLook/2018_v8Dy59 Click on This And See Magic  Tongue

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)