PHP code example of rbtphp / yii2-ffmpeg

1. Go to this page and download the library: Download rbtphp/yii2-ffmpeg 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/ */

    

rbtphp / yii2-ffmpeg example snippets


$args = array('type' => 'audio/video/image', 
			'input_file' => '/home/user/Pictures/movie.mp4', 
			'output_file' => '/home/user/Pictures/movie.mov', 
			'audio_bit_rate' => '20k', 
			'video_bit_rate' => '10k', 
			'thumbnail_image' => '/home/user/Pictures/movie.gif',
			'thumbnail_generation' => 'yes/no',
			'thumbnail_size' => '100x100'
		);
			
echo Yii::$app->ffmpeg->ffmpeg($args);

php composer.phar