Good day guys, Please can any one help me with a working and reliable code for generating a thumbnail from video.I am using laravel spatie library and was able to generate thumbnail from image in a fly but having difficulty to get thumbnail from video. I am developing api for a business android app. Using laravel as back-end api development. My interest is getting thumbnail from uploaded video.
Thanks in advance
Top comments (1)
I'm not sure about particular package you're talking about, but usually ffmpeg library and any PHP wrapper above it is used (at least php-ffmpeg), general command for CLI looks like this (you can take random time for your videos)
ffmpeg -i $uploaded_file -ss 00:00:01.000 -vframes 1 output.png