dp9599
dp9599
2013-01-18 16:15

FFMPEG在命令行中工作但在exec()中不工作,它返回127

已采纳

The command is

ffmpeg -i path/to/video.avi path/to/video.mpg

and it works fine from the command line. However, when I call it with PHPs exec(), the return value is 127, it doesn't seem to detect FFMPEG. What am I doing wrong? I'm in localhost and the safe mode is off, but I'm new to both FFMPEG and exec(), so it may be a noob mistake. Thanks in advance.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • dongwei2882 dongwei2882 8年前

    Try

    exec(/path/to/ffmpeg -i path/to/video.avi path/to/video.mpg);
    
    点赞 评论 复制链接分享
  • dream_high1026 dream_high1026 6年前

    did you register your ffmpeg command as a PATH Environment variable in Linux / Windows ???? it seems that you did not set it as a PATH variable that's why you have to include full path to FFMPEG command so that it worked for you.

    点赞 评论 复制链接分享

为你推荐