https://github.com/cryptiklemur/screenshotr
Video Screenshot Utility
https://github.com/cryptiklemur/screenshotr
Last synced: 12 months ago
JSON representation
Video Screenshot Utility
- Host: GitHub
- URL: https://github.com/cryptiklemur/screenshotr
- Owner: cryptiklemur
- License: mit
- Created: 2014-08-13T21:59:09.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-10-12T20:12:53.000Z (over 8 years ago)
- Last Synced: 2025-03-28T09:04:19.386Z (about 1 year ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 22
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
screenshotr
===========
Video Screenshot Utility
## Install
Requires the ffmpeg and ffprobe executables in your path:
https://www.ffmpeg.org/
```sh
$ composer require aequasi/screenshotr "^1.0"
```
## Usage
```php
// 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);
```