kiririn / webm
Create thumbnail for .webm video
dev-master
2015-05-30 16:37 UTC
Requires
- php: >=5.4.0
- ext-fileinfo: *
Requires (Dev)
- phpunit/phpunit: 4.3.*
Suggests
- ffmpegthumbnailer: Fast and lightweight video thumbnailer
- mediainfo: Get technical and tag data for video and audio files
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();