PHP code example of aequasi / screenshotr

1. Go to this page and download the library: Download aequasi/screenshotr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aequasi / screenshotr example snippets



// 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);