2017 © Pedro Peláez
 

library video-thumbnail-sprite

PHP library for generating video thumbnail sprites

image

emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  • Friday, April 20, 2018
  • by emgag
  • Repository
  • 2 Watchers
  • 17 Stars
  • 1,895 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 7 Versions
  • 11 % Grown

The README.md

video-thumbnail-sprite

Software License Packagist Version, (*1)

WARNING: This library is no longer maintained /WARNING, (*2)

PHP library for generating video thumbnail sprites to be used for thumbnails in JWPlayer's seek bar., (*3)

System requirements

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

Following binaries need to be installed, (*5)

Installation

composer require emgag/video-thumbnail-sprite

Usage

use Emgag\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 (default) or ffmpegthumbnailer., (*6)

// 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:, (*7)

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

Acknowledgments

Uses:, (*8)

License

video-thumbnail-sprite is licensed under the MIT License., (*9)

The Versions

20/04 2018

dev-master

9999999-dev https://github.com/emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

ffmpeg jwplayer sprite ffmpegthumbnailer

20/04 2018

v1.0.3

1.0.3.0 https://github.com/emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

ffmpeg jwplayer sprite ffmpegthumbnailer

20/04 2018

v1.0.2

1.0.2.0 https://github.com/emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

ffmpeg jwplayer sprite ffmpegthumbnailer

18/04 2018

v1.0.1

1.0.1.0 https://github.com/emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

ffmpeg jwplayer sprite ffmpegthumbnailer

05/08 2017

v1.0.0

1.0.0.0 https://github.com/emgag/video-thumbnail-sprite

PHP library for generating video thumbnail sprites

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthias Blaser

ffmpeg jwplayer sprite ffmpegthumbnailer

28/09 2015
19/05 2015