0

I have installed FFMPEG in my Centos7 dedicated Server, now I want to run the FFMPEG, but it is not executing, can anyone help what could be the reason.

Note: I have Cpanel installed also. My code is below:

    <!DOCTYPE html>
<html>
    <head>
        <title>My FFMPEG</title>
    </head>
    <body>
        <form action="" method="post" enctype="multipart/form-data">
            <input type="file" name="video">
            <input type="submit" name="submit">
        </form>
    </body>
</html>
<?php
if (isset($_POST['submit'])){
    $currentPath=$_FILES['video']['tmp_name'];
   $ffmpeg = "/usr/bin/ffmpeg";
    exec("$ffmpeg -i ".$currentPath." -an output/video.mp4");
    echo "OK";
}
?>

1 Answers1

1

If you have nothing in "action" (the name of the current file in this case), I am not sure the system use the current file by default. Try to fille this field The enctype is not necessary because you don't transfer files

Seb
  • 65
  • 1
  • 6