PHP exec not executing command

前端 未结 4 1286
故里飘歌
故里飘歌 2021-01-06 09:21

I have used php\'s exec to execute FFmpeg command but its not woking when I open it in browser. But when i run this php file script in terminal it works fine.And my php safe

4条回答
  •  花落未央
    2021-01-06 10:04

    try giving full path where the ffmpeg application is located.

    e.g.

    /usr/bin/ffmpeg
    

    So your function might look like:

    $output=exec("/usr/bin/ffmpeg -f image2 -i /home/phedra/imgs/image/img%03d.png -r 12 -s 610x489 /home/phedra/imgs/video/out.avi", $out);
    

    You must check what is the location of "ffmpeg".

提交回复
热议问题