I am running a php script using the cPanel Cron Jobs. The script is using shell_exec
to convert a video using ffmpeg. It executes the script and everything is working but it is not sending me the email. I am basically trying to get the output of the shell_exec
to start another function in the php script so I wanted to send my self the email to make sure I am getting the output.
For example I wrote:
$command = "ffmpeg -i $og_video -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 $mp4_video";
//EXECUTE THE CONVERSION
$output = shell_exec($command);
echo $output;
I also tested the email by removing the shell_exec
and just echo the $command
variable. This will send me the full string in an email.
What I am trying to accomplish is basically if the shell_exec executed then do something else.
How do I check if the shell_exec was completed?