I'm using ffmpeg with PHP to compress the size of some videos I upload on my website, but I also want to capture the error If something goes wrong during the process when executing the command.
I have read that there's no way to capture the error, but I'm not sure if that's correct.
I hope someone will help me out with this doubt I have.
Here's my code:
$command="$ffmpeg -i $video['tmp_name'] -i pics/watermark.png -s $resolution -filter_complex [1:v][0:v]scale2ref=(127/60)*ih/10/sar:ih/10[wm][base];[base][wm]overlay=10:10 -pix_fmt yuv420p -c:a copy videos/$video_name";
shell_exec($command);