-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hello,
I was thinking it might be a nice idea to generate thumbnails for video files.
At a cursory glance of the codebase I imagine the complexity of such a feature lies more in the integration with file storage, cacheing, etc. than the thumbnail-generation itself (which seems like shouldn't be too difficult with the availability of something like https://github.com/PHP-FFMpeg/PHP-FFMpeg).
If this strikes you as a feature worth including in the bundle, what would be a good broad strokes direction with regards to where to to store and cache the generated thumbnails and associated metadata?
I'm not terribly familiar with that ecosystem yet, nor do I feel like I've got a solid grasp on the architectural choices that guide this bundle's implementation.
I suppose it could be possible to do something like this:
Given video file: <storage>/media/original/my-folder/my-video.mp4
Generate thumbnail: <storage>/media/cache/joli-media-easy-admin-small/my-folder/my-video.mp4.jpg
The changes to _as_image.html.twig would be trivial for both EA and Sonata bridges, so that's nice.
It'd probably take some changes to the code that resolves variations to pull in a variation with a subtly different filename to the original though? Any opinions on what would be a sane approach there?