lnepal lnepal - 3 years ago 288
Bash Question

Executing shell command not working in AWS

I'm facing problem to execute shell command in AWS but it works normally in my local computer.
What I've used is pasted below:

$cmd='ffmpeg -i media/dream_theatre.jpg -r 1 media/66_dream_theatre.avi';
$output = shell_exec($cmd);

Same script works in my local computer but does not in AWS. However when I type this
ffmpeg -i media/dream_theatre.jpg -r 1 media/66_dream_theatre.avi
in AWS terminal CLI it works normally so it confirms correct installation of ffmpeg in AWS.

Answer Source

You probably don't have ffmpeg in the default PATH. Try replacing ffmpeg with the result of which ffmpeg.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download