karlvanh Now the thumbnails are created, filesize between 20-30MB instead of 0, but still won't show on files.gallery index-page
You manually created video thumbnails? And the thumbnail size is 20-30MB? Or do you mean 20-30KB? > 20MB is extremely large for a 480 px image ... A bit hard to understand what is going on here or even how you managed to self-create the thumbnails, unless you are using custom-preview-images method.
Right now, it's serving empty cached 0-byte responses, which are basically errors. Because FFMpeg is an external app, we can't really diagnose errors from PHP. We don't automatically delete these invalid cache files, because it doesn't seem useful to continue creating errors for the same file. You can delete the 0-byte cache elements, in case you are making changes to the server/php/ffmpeg and want to re-attempt to create the thumbnails.
It does seem like your FFMpeg is there but is failing somehow. I can only imagine it might be related to users and permissions. Is the PHP user allowed to run the external app?
I think for proper testing, you would need to run the exec(ffmpeg)
on a video directly from a PHP test file, and diagnose the full response. Create a test.php
and run it on a TEST.mp4
file.
<?php
exec('ffmpeg -ss 3 -t 1 -hide_banner -i "TEST.mp4" -frames:v 1 -an -vf "thumbnail,scale=min\'(480,iw)\':min\'(480,ih)\':force_original_aspect_ratio=decrease" -r 1 -y -f mjpeg "OUT.mp4" 2>&1', $output, $response);
var_dump($output);
var_dump($response);
I don't know what server setup you have or how you installed FFMpeg.