I'm trying to generate a thumbnail from a video using FFMPEG via PHP.
This is working great if I do:
echo shell_exec('ffmpeg -y -i input.mp4 -ss 00:00:10.000 -vframes 1 THUMB.png');
But with help from this page I tried to turn this into a background process. It runs, but I don't get any file (THUMB.jpg) written to the server.
echo shell_exec('ffmpeg -y -i input.mp4 -ss 00:00:10.000 -vframes 1 THUMB.png </dev/null >/dev/null 2>/var/log/ffmpeg.log &');
Perhaps it IS generating the thumg but in a different place from where it generates it when I run it synchronously within my PHP flow. What am I doing wrong?