I am trying to run ffmpeg through a call to PHP exec, I debugged for a while and looked at a lot of answers here, but still could not find the answers ...
My simplified call:
$cmd = 'ffmpeg 2>&1'; exec(escapeshellcmd($cmd), $stdout, $stderr); var_dump($stderr); var_dump($stdout); var_dump($cmd); exit;
My conclusion: $ stderr = int (1) and $ stdout = array (0) {}
I also tried shell_exec($cmd) , which returns NULL .
cmd.exe has permissions set for the IUSR account - for example. I can run $cmd = 'dir' and see the output of the directory.
PHP does not work in safe mode.
The ffmpeg.exe file is in the same directory as my php file, but I have the same answer that gives the absolute path to the ffmpeg.exe file in $cmd .
ffmpeg does a fine from the command line.
I am running Windows XP, IIS and PHP 5.3.
EDIT:
If I run 'ffmpeg -h', I get help commands that should indicate that ffmpeg is recognized
I increased the PHP memory limit to 1024 - no luck.
source share