System command error code of 126

2019-08-04 05:32发布

问题:

Please, I am trying to convert an mpg file to flv with ffmpeg. I am using the php system() command to execute it. However, I get an error code of 126. Any idea of what that means? Here is my code: system($ffmpegPath. " -i ". $srcFile. " -b 4000k -maxrate 4000k -bufsize 1835k ". $destFile, $cmd_status)

Thanks. I discovered I was referring to the wrong ffmpeg binary. However, now that I am pointing to the right binary, I get an error of 127. Any help?

回答1:

From the bash(1) man page:

If a command is found but is not executable, the return status is 126.

Make sure that you can execute the given binary.