I'm trying to run this command that does work in cli
ffmpeg -i tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 output1.flv
I was able to run only ffmpeg -version by php.
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -version");
Location of tmp1.flv file:
C:\wamp\www\tmp1.flv
When I'm running $res = exec("chdir") => C:\wamp\www\
How can I run this by php
ffmpeg -i tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 output1.flv
I tried:
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 output1.flv", $output, $return_var);
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i C:\\wamp\\www\\tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 C:\\wamp\\www\\output1.flv", $output, $return_var);
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i C:\wamp\www\tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 C:\wamp\www\output1.flv", $output, $return_var);
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i \"C:\wamp\www\tmp1.flv\" -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 \"C:\wamp\www\output1.flv\"", $output, $return_var);
$res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i 'C:\wamp\www\tmp1.flv' -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 'C:\wamp\www\output1.flv'", $output, $return_var);
...
but echo $res and echo $output gives nothing, and echo $return_var gives 1
+++UPDATE+++
Made a little progress thanks to this post, it does give me output and info about the file, but still can't run the whole command.
$cmd = 'C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -i tmp1.flv 2>&1';
exec($cmd, $output, $value);
var_dump($output);
var_dump($value);
var_dump($cmd)
+++UPDATE 2+++
echo exec('whoami') => nt authority\system