| Package Data | |
|---|---|
| Maintainer Username: | pawlox | 
| Maintainer Contact: | pawmarci@gmail.com (Paweł Marciniak) | 
| Package Create Date: | 2017-03-09 | 
| Package Last Update: | 2025-03-26 | 
| Home Page: | |
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-25 15:02:49 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 194,355 | 
| Monthly Downloads: | 5,551 | 
| Daily Downloads: | 103 | 
| Total Stars: | 23 | 
| Total Watchers: | 1 | 
| Total Forks: | 17 | 
| Total Open Issues: | 5 | 
Simple package for generating video thumbnail in Laravel 5 using FFMpeg.
Composer install:
composer require pawlox/video-thumbnail
After package installation, add the ServiceProvider to the providers array in config/app.php
Pawlox\VideoThumbnail\VideoThumbnailServiceProvider::class
And to the aliases array
'VideoThumbnail' => Pawlox\VideoThumbnail\Facade\VideoThumbnail::class
Also you can publish package config file with:
php artisan vendor:publish --tag=video-thumbnail
and set ffmpeg and ffprobe paths in .env file:
FFMPEG="/usr/bin/ffmpeg"
FFPROBE="/usr/bin/ffprobe"
VideoThumbnail::createThumbnail($videoUrl, $storageUrl, $fileName, $second, $width = 640, $height = 480);
$videoUrl - path to video file,
$storageUrl - path where the thumbnail should be save,
$fileName - name of thumbnail file,
$second - from which second of the movie thumbnail should be created,
$width [Optional] - width (in pixels) of the thumbnail (default 640),
$height [Optional] - height (in pixels) of the thumbnail (default 480).
VideoThumbnail::createThumbnail(public_path('files/movie.mp4'), public_path('files/thumbs/'), 'movie.jpg', 2, 1920, 1080);