PHPackages                             amnuts/jwplayer-thumbnail-preview-generator - 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. amnuts/jwplayer-thumbnail-preview-generator

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

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.

v1.1.3(10y ago)561.6k17MITPHPPHP &gt;=5.4

Since Feb 12Pushed 4y ago7 watchersCompare

[ Source](https://github.com/amnuts/jwplayer-thumbnail-preview-generator)[ Packagist](https://packagist.org/packages/amnuts/jwplayer-thumbnail-preview-generator)[ RSS](/packages/amnuts-jwplayer-thumbnail-preview-generator/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)DependenciesVersions (2)Used By (0)

JWPlayer thumbnail preview generator
====================================

[](#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 generate the toolbar thumbnail previews.

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=acollington&url=https://github.com/amnuts/jwplayer-thumbnail-preview-generator&title=JWPlayer%20thumbnail%20preview%20generator&language=&tags=github&category=software)

### Requirements

[](#requirements)

FFmpeg is required to generate the thumbnails. If you have libav-tools install and the binary is a different name to ffmpeg (or even if you have ffmpeg but installed in a different location) then you can modify the `$params` information to point to your particular ffmpeg install.

PHP 5.4+ is required as the code uses short array syntax and the CallbackFilterIterator.

### Getting started

[](#getting-started)

There are two ways to getting started using this script:

1. Simply to copy/paste or download the thumbnails.php to your server
2. Install via composer by running the command:

```
composer require amnuts/jwplayer-thumbnail-preview-generator
```

### How to use the generator

[](#how-to-use-the-generator)

#### Simplest example

[](#simplest-example)

Typical usage would look like:

```
php thumbnails.php -i "/input/video.mp4"
```

This would generate the thumbnails for the video given coalesced into one file (a sprite sheet) and the required VTT file that specifies which thumbnail to display and where in the sprite sheet it is located.

#### Verbose output

[](#verbose-output)

If you do not wish to generate a sprite sheet then include the `-v` switch to generate verbose output - ie, all the thumbnails are separate files and the VTT file points to each.

```
php thumbnails.php -i "/input/video.mp4" -v
```

It is recommended that you use the default coalesced file as this is more optimal when loading than individual images.

#### Changing output directory

[](#changing-output-directory)

You can change the output directory with the `-o` switch:

```
php thumbnails.php -i "/input/video.mp4" -o "/output/directory"
```

This will write the images and VTT file in the provided directory (default is just to write into the same directory as the generator script).

#### Change time between thumbnails

[](#change-time-between-thumbnails)

To alter the default time between thumbnails use the `-t` switch with the number of seconds you'd like between each:

```
php thumbnails.php -i "/input/video.mp4" -t 30
```

That will generate one thumbnail for every 30 seconds of video.

#### Change thumbnail width

[](#change-thumbnail-width)

To change the width of the thumbnail use the `-w` switch with the size in pixels:

```
php thumbnails.php -i "/input/video.mp4" -w 75
```

That will generate thumbnails that are 75 pixels in width. The height is automatic and proportional to the video size.

#### Generate poster image

[](#generate-poster-image)

The tool also provides the ability to generate a poster file of the video from a random frame of the video at the same time it's generating the thumbnails. To do this, use the `-p` switch:

```
php thumbnails.php -i "/input/video.mp4" -p
```

### How to include in JW Player

[](#how-to-include-in-jw-player)

The code you would use for JW Player would be something like:

```
video loading...

    jwplayer("video").setup({
        playlist: [{
            file: "/input/video.mp4",
            image: "poster.jpg",
            tracks: [{
                file: "thumbnails.vtt",
                kind: "thumbnails"
            }]
        }]
    });

```

License
=======

[](#license)

MIT:

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3791d ago

### Community

Maintainers

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

---

Top Contributors

[![amnuts](https://avatars.githubusercontent.com/u/684421?v=4)](https://github.com/amnuts "amnuts (11 commits)")

---

Tags

thumbnailvideoffmpegThumbnailsjwplayervtt

### Embed Badge

![Health badge](/badges/amnuts-jwplayer-thumbnail-preview-generator/health.svg)

```
[![Health](https://phpackages.com/badges/amnuts-jwplayer-thumbnail-preview-generator/health.svg)](https://phpackages.com/packages/amnuts-jwplayer-thumbnail-preview-generator)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

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

5.0k23.2M183](/packages/php-ffmpeg-php-ffmpeg)[lakshmaji/thumbnail

Thumbnails for videos

108123.0k](/packages/lakshmaji-thumbnail)[lakshmajim/thumbnail

Thumbnails for videos

1088.0k](/packages/lakshmajim-thumbnail)[codescale/ffmpeg-php

PHP wrapper for FFmpeg application

495274.0k1](/packages/codescale-ffmpeg-php)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495236.3k1](/packages/char0n-ffmpeg-php)[buggedcom/phpvideotoolkit

PHPVideoToolkit is a set of classes aimed to provide a modular, object oriented and accessible interface for interacting with videos and audio through the FFmpeg program.

25984.0k1](/packages/buggedcom-phpvideotoolkit)

PHPackages © 2026

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