2016-10-19 07:57
浏览 215

php shell_exec()命令弹出错误和权限被拒绝ffmpeg

This is the main index.php file where I run my code to generate a video thumbnail with ffmpeg but it has no lucks at all I have been searching online for a lot of solution but nothing comes out i will be very appreciate if you guys can help me out. The shell_exec() keep giving me error

<form action="index.php" method="POST" enctype="multipart/form-data">
<input type="file" name="file"><input type="submit" name="submit" value="upload">




$ffmpeg = "/Users/mac/Documents/ffmpeg/3.1.4/bin/ffmpeg";
$videoFile = $_FILES["file"]["tmp_name"];
$imageFile = "1.jpg";
$size = "320x240";
$getFromSecond = 5;
$cmd = "$ffmpeg -i $videoFile -an -ss $getFromSecond -s $size $imageFile 2>&1";

    echo shell_exec($cmd);

echo shell_exec('whoami');

    echo "thumbnail created";
    echo "error creating thumbnail";




1条回答 默认 最新

相关推荐 更多相似问题