开发者

exec() command not working

I am using exec() function to run my commands on centos server. All was working fine untill i used c开发者_如何学Goommand: $command= ffmpeg -i input video.mp4 -vf fade=out:0:5 output.mp4

The command is ok as it is running on server via command line but when i execute it using php it is not giving the output. I have already created a video from ffmpeg using the exec() function but this command is not working. What can be the reason i am confused how a command can run on server but not work while executing from php.

Other command i executed using exec() function is : $command = ffmpeg -i %d.jpg -y -s 320x240 -aspect 4:3 output.mp4

and it is working perfectly and the video is also created but previous command is not giving video as output.

Please guide me...


Try debugging you command execution. For ffmpeg you need to pipe the output with 2>&1 to see it:

exec($command." 2>&1", $output);
echo "<pre>";
var_dump($output);
echo "</pre>";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜