Hey, I'm trying to execute a program on windows through PHP, the command is posted below. This doesn't seem to be running through the script at all, even though it works when the command is manually entered into the command prompt.
exec('C:\\ffmpeg -i ' . $movedfile . ' -acodec aac -ab 128k -vcodec libx264 -fpre C:\\ffmpeg\\share\\ffmpeg\\libx264-hq.ffpreset -crf 22 -threads 0 -wpredp 0' . $convertedfile);
开发者_StackOverflow社区Any suggestions?
Thanks!
- You are missing a space at the end
- You should really use
escapeshellarg()
exec('C:\ffmpeg -i ....
this would mean you would have ffmpeg.exe
in your C:\ root directory. I think you mean
exec('C:\ffmpeg\ffmpeg -i ....
try running only the command itself without any options and see if that help. moreover try to run something simple first - dir
etc.
Did you check permissions? Assuming standard configurations, IUSR_MACHINENAME needs read + execute permissions to the executable, any source/output files, and any temporary directories/files
精彩评论