xxxxxxxxxx
use ProtoneMedia\LaravelFFMpeg\Support\FFMpeg;
use FFMpeg\Filters\Frame\FrameFilters;
//https://github.com/protonemedia/laravel-ffmpeg
$thumbnailPath = 'video_thumbnail/' . now()->timestamp . '.jpg';
FFMpeg::open($request->file('mediafile'))
->getFrameFromSeconds(5)
->export()
->addFilter(function (FrameFilters $filters) {
$filters->custom('scale=480:320');
})
->toDisk('s3')
->save($thumbnailPath);