kiririn/webm

Create thumbnail for .webm video

dev-master 2015-05-30 16:37 UTC

This package is auto-updated.

Last update: 2024-10-09 14:13:07 UTC


README

Debian/Ubuntu as root:

apt install ffmpegthumbnailer mediainfo

Usage

use Kiririn\Webm\Webm;

//You can skip dependency checking: new Webm('path/to/video.webm', true);
$webm = new Webm('path/to/video.webm');
$webm->thumbnail(200, 200);

//Second argument - thumb name with or without extension
$webm->save('path/to', 'thumb.jpeg');

Get additional info

//Video
$webm->getWidth();
$webm->getHeight();

//Thumb
$webm->getThumbWidth();
$webm->getThumbHeight();

//Duration
$webm->getDuration();