PHPackages                             stef77dd/videothumbnailsprite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. stef77dd/videothumbnailsprite

ActiveLibrary[Image &amp; Media](/categories/media)

stef77dd/videothumbnailsprite
=============================

PHP library for generating video thumbnail sprites

1.0.3(2y ago)09MITPHPPHP &gt;=7.3 || &gt;=8.0

Since Oct 19Pushed 2y agoCompare

[ Source](https://github.com/stef77dd/videoThumbnailSprite)[ Packagist](https://packagist.org/packages/stef77dd/videothumbnailsprite)[ Docs](https://github.com/stef77dd/videoThumbnailSprite)[ RSS](/packages/stef77dd-videothumbnailsprite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

videoThumbnailSprite
====================

[](#videothumbnailsprite)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/6bf08a78cd260ae16a36dbe268867c400b6e918644f108ead2988b814432cb7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d6761672f766964656f2d7468756d626e61696c2d7370726974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stef77dd/videothumbnailsprite)

**WARNING**: This library is no longer maintained **/WARNING**

PHP library for generating video thumbnail sprites to be used for thumbnails in [JWPlayer](https://support.jwplayer.com/customer/portal/articles/1407439-adding-preview-thumbnails)'s seek bar.

System requirements
-------------------

[](#system-requirements)

PHP &gt; 7.x (see [release 0.2](https://github.com/imrantune/videoThumbnailSprite/tree/v0.2) for the latest version supporting PHP 5.5/5.6).

Following binaries need to be installed

- Either [ffmpeg](http://www.ffmpeg.org/download.html) (tested with &gt;= v2.2) or [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer)
- [imagemagick](http://www.imagemagick.org/script/binary-releases.php) (tested with &gt;= v6.6)

Installation
------------

[](#installation)

```
composer require stef77dd/videoThumbnailSprite

```

Usage
-----

[](#usage)

```
use \Stef77dd\Video\ThumbnailSprite\ThumbnailSprite;

$sprite = new ThumbnailSprite();
$ret = $sprite->setSource('path-to-source-video.mp4')
       ->setOutputDirectory('dir-to-store-sprite-and-vtt')
       // filename prefix for image sprite and WebVTT file (defaults to "sprite", resulting in "sprite.jpg" and "sprite.vtt")
       ->setPrefix('sprite')
       // absolute URL of sprite image or relative to where the WebVTT file is stored
       ->setUrlPrefix('http://example.org/sprites')
       // sampling rate in seconds
       ->setRate(10)
       // minimum number of images (will modify sampling rate accordingly if it would result in fewer images than this)
       ->setMinThumbs(20)
       // width of a single thumbnail in px
       ->setWidth(120)
       ->generate();

// $ret = ['vttFile' => 'path-to-vtt-file', 'sprite' => 'path-to-sprite-file']
```

There are two different thumbnailing methods available, [ffmpeg](http://www.ffmpeg.org/download.html) (default) or [ffmpegthumbnailer](https://github.com/dirkvdb/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:

```
$sprite->setOutputImageDirectory('dir-to-store-images');
```

Acknowledgments
---------------

[](#acknowledgments)

- Inspired by [vlanard/videoscripts](https://github.com/vlanard/videoscripts) and [scaryguy/jwthumbs](https://github.com/scaryguy/jwthumbs).
- Thanks to [Mehrdad-Dadkhah](https://github.com/Mehrdad-Dadkhah) for adding ffmpegthumbnailer support and other additional features.
- Forked from [Emgag](https://github.com/emgag/)'s [video-thumbnail-sprite](https://github.com/emgag/video-thumbnail-sprite)

Uses:

- [captioning/captioning](https://github.com/captioning/captioning)
- [imrantune/flysystem-tempdir](https://github.com/imrantune/flysystem-tempdir)
- [intervention/image](https://github.com/Intervention/image)
- [php-ffmpeg/php-ffmpeg](https://github.com/PHP-FFMpeg/PHP-FFMpeg)
- [symfony/process](https://github.com/symfony/Process)
- [thephpleague/flysytem](https://github.com/thephpleague/flysystem)

License
-------

[](#license)

videoThumbnailSprite is licensed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

933d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb9dd78b64e4f46c7d25525aaa46f2140a00148d3208b4a163d41258a6431733?d=identicon)[stef77dd](/maintainers/stef77dd)

---

Top Contributors

[![stef77dd](https://avatars.githubusercontent.com/u/11427339?v=4)](https://github.com/stef77dd "stef77dd (23 commits)")[![imrantune](https://avatars.githubusercontent.com/u/3593033?v=4)](https://github.com/imrantune "imrantune (6 commits)")

---

Tags

ffmpegspritejwplayerffmpegthumbnailer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stef77dd-videothumbnailsprite/health.svg)

```
[![Health](https://phpackages.com/badges/stef77dd-videothumbnailsprite/health.svg)](https://phpackages.com/packages/stef77dd-videothumbnailsprite)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M163](/packages/php-ffmpeg-php-ffmpeg)[pbmedia/laravel-ffmpeg

FFMpeg for Laravel

1.8k4.8M23](/packages/pbmedia-laravel-ffmpeg)[mehrdad-dadkhah/hls-video-generater

PHP library for generating video m3u8 playlist

241.4k](/packages/mehrdad-dadkhah-hls-video-generater)[pulse00/ffmpeg-bundle

Symfony bundle to provide PHP-FFmpeg as a Symfony service (https://github.com/alchemy-fr/PHP-FFmpeg)

57447.2k1](/packages/pulse00-ffmpeg-bundle)[lakshmaji/thumbnail

Thumbnails for videos

108122.2k](/packages/lakshmaji-thumbnail)[amnuts/jwplayer-thumbnail-preview-generator

A simple but effective command-line tool for generating thumbnails of a video, and corresponding VTT file, for use within JW Player to allow for toolbar video preview.

561.6k](/packages/amnuts-jwplayer-thumbnail-preview-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
