FFMPEG在命令行中工作,但不在exec()中,它返回127 [英] FFMPEG works in command line but not in exec(), it returns 127
本文介绍了FFMPEG在命令行中工作,但不在exec()中,它返回127的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
命令是
ffmpeg -i path/to/video.avi path/to/video.mpg
,它从命令行工作正常。但是,当我使用PHP调用 exec()
时,返回值为127,似乎没有检测到FFMPEG。我究竟做错了什么?我在本地主机,安全模式是关闭的,但我是FFMPEG和 exec()
的新手,所以这可能是一个noob的错误。感谢提前。
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.
推荐答案
尝试
exec(/path/to/ffmpeg -i path/to/video.avi path/to/video.mpg);
这篇关于FFMPEG在命令行中工作,但不在exec()中,它返回127的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文