I have ffmpeg installed on a CentOS 7 machine running a standard LAMP stack. I can run ffmpeg fine by itself in a terminal, like so:
ffmpeg -i "rtsp://admin:password@10.0.0.152/play2.sdp" camera1.mp4
I have a php script more or less like the following:
<?php
$camerabash = shell_exec('ffmpeg -i "rtsp://admin:password@10.0.0.152/play2.sdp" camera1.mp4');
echo $camerabash;
?>
The following gives me an echoed result of "apache":
<?php
$camerabash = shell_exec('whoami');
echo $camerabash;
?>
I think I have a permissions problem, and I've explored a few options including editing the http.conf file, nothing seems to work.