PHP code example of vkr / multimedia-analyzer-bundle

1. Go to this page and download the library: Download vkr/multimedia-analyzer-bundle 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/ */

    

vkr / multimedia-analyzer-bundle example snippets


$analyzer = $this->get('vkr_multimedia_analyzer.multimedia_duration_analyzer');
$file = new Symfony\Component\HttpFoundation\File('/path/to/file');
try {
    $length = $analyzer->getFileDuration($file);
} catch (MultimediaAnalyzerException $e) {
    // handle exception
}