aequasi / screenshotr
Creates screen shots from a video
Installs: 315
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 4
Forks: 2
pkg:composer/aequasi/screenshotr
Requires
- php-ffmpeg/php-ffmpeg: ~0.5
This package is auto-updated.
Last update: 2025-10-05 21:41:37 UTC
README
Video Screenshot Utility
Install
Requires the ffmpeg and ffprobe executables in your path: https://www.ffmpeg.org/
$ composer require aequasi/screenshotr "^1.0"
Usage
// Second argument is the tmp dir the images are created in. Defaults to /tmp $screenShotr = new \ScreenShotr\Core('/path/to/movie/file'); // Generate a single screenshot at the 300 second mark, returns a \SplFileInfo to a file in /tmp $screenshot = $screenShotr->generateScreenshot(300); // Generate screenshots for a file, every 5 seconds, starting at the 300 second mark // Returns an array of \SpFileInfo objects like above $screenshots = $screenShotr->generateScreenshotsEveryFrame(300, 5);