This package is abandoned and no longer maintained. No replacement package was suggested.

PHP library for generating video thumbnail sprites

v1.0.3 2018-04-20 09:34 UTC

This package is auto-updated.

Last update: 2022-10-07 06:24:02 UTC


Software License Packagist Version

WARNING: This library is no longer maintained /WARNING

PHP library for generating video thumbnail sprites to be used for thumbnails in JWPlayer's seek bar.

System requirements

PHP 7.x (see release 0.2 for the latest version supporting PHP 5.5/5.6).

Following binaries need to be installed


composer require emgag/video-thumbnail-sprite


use Emgag\Video\ThumbnailSprite\ThumbnailSprite;

$sprite = new ThumbnailSprite();
$ret = $sprite->setSource('path-to-source-video.mp4')
       // filename prefix for image sprite and WebVTT file (defaults to "sprite", resulting in "sprite.jpg" and "sprite.vtt")
       // absolute URL of sprite image or relative to where the WebVTT file is stored
       // sampling rate in seconds 
       // minimum number of images (will modify sampling rate accordingly if it would result in fewer images than this)
       // width of a single thumbnail in px 
// $ret = ['vttFile' => 'path-to-vtt-file', 'sprite' => 'path-to-sprite-file'] 

There are two different thumbnailing methods available, ffmpeg (default) or ffmpegthumbnailer.

// default, is set implicitly if not provided
$sprite->setThumbnailer(new Thumbnailer\Ffmpeg());
// change thumbnailer to ffmpegthumbnailer
$sprite->setThumbnailer(new Thumbnailer\FfmpegThumbnailer());

To keep individual source images of the sprite instead of removing it after assembling the sprite into a single image:





video-thumbnail-sprite is licensed under the MIT License.