PHP code example of brightfish / media_analyzer
1. Go to this page and download the library: Download brightfish/media_analyzer 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/ */
brightfish / media_analyzer example snippets
php
use Brightfish\MediaAnalyzer\Analyzer;
$obj = new Analyzer();
// or
$obj = new Analyzer("/usr/bin/ffprobe", $logger, $cache);
$obj->meta("video.mp4");
echo $obj->video->fps;
echo $obj->audio->sample_rate;
echo $obj->container->duration;