Closed avephill closed 3 months ago
Have you check issues upstream? I found this.:(I don't know if it's any help) https://github.com/LycheeOrg/Lychee/issues/772
Thanks for looking. I couldn't find anything that was too relevant in that thread but that may because of the shallowness of my understanding. I'll open an issue upstream. Thanks!
In order to generate thumbnail for videos Lychee requires FFmpeg and must be able to execute it (not part of Lychee). The error message indicates that Lychee is unable to do so. So either FFmpeg is not installed, Lychee cannot find it or has insufficient rights to run it or FFmpeg is deactivated by your configuration.
Please post your diagnostic output.
Also make sure that you follow the detailed instructions from the following FAQ: https://lycheeorg.github.io/docs/faq.html#why-dont-my-videos-have-thumbnails
Great, thank you for the help. Using the link to the FAQ I replaced protected $toolPath;
with protected $toolPath = '/usr/bin/ffprobe';
in
/var/ww/lychee/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php
and $ffmpeg = FFMpeg::create();
with
$ffmpeg = FFMpeg::create(array(
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe',
));
in /var/ww/lychee/app/Actions/Photo/Extensions/VideoEditing.php
and it seems to work now
Thanks @avephill I will try to make a patch to modify the files on installation. (even if I don't know how to do it yet ...)
great, thanks!
I'll note that I think I replaced $ffmpeg = FFMpeg::create();
and protected $toolPath;
multiple times in each script.
Also, I don't have time to open another proper issue with this upstream but it's worth sharing that it wasn't properly generating thumbnails for .mp4 files (it would just create a black thumbnail), however I could get it to work with an .m4v
Upstream here :smiley:.
If Lychee can generate thumbnails for any video files then in my experience it indicates that it's been configured correctly. The problem with .mp4 files you're seeing is more likely to be elsewhere then, such as with ffmpeg. Though I will say that thumbnail generation from .mp4 files works just fine here. Your report is unusual, because we typically see the opposite problem: thumbnails get generated fine, but videos don't play, which is due to ffmpeg typically having a much broader video codec support than the web browser.
Anyway, if you want, you can upload (or provide a link) to an .mp4 file that's giving you problems, and I'll check it out on my end. While we would ideally prefer to have you open a new issue about it in our upstream repo, we can deal with it here as well, so long as @ericgaspar doesn't mind :wink:.
Any news on this? Should we close and report it upstream?
Uploading video file does not generate thumbnail image
Context
Steps to reproduce
Uploaded .mp4 through my browser (Firefox)
Expected behavior
The generation of a thumbnail for the uploaded video
Logs
Lychee Log
error -- App\Actions\Photo\Strategies\StrategyPhoto::generate_thumbs -- 112 -- Unable to load FFProbe