rbtphp/yii2-ffmpeg
最新稳定版本:1.0.3
Composer 安装命令:
composer require rbtphp/yii2-ffmpeg
包简介
convert media from one format to other
关键字:
README 文档
README
convert media from one format to other
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist rbtphp/yii2-ffmpeg "*"
or add
"rbtphp/yii2-ffmpeg": "*"
to the require section of your composer.json file.
Configuration
Install ffmpeg in your system if not installed. To use this extension, you have to configure the Connection class in your application configuration:
return [ //.... 'components' => [ 'ffmpeg' => ['class' => '\rbtphp\ffmpeg\Ffmpeg', 'path' => '/usr/bin/ffmpeg' ], ] ];
Usage
Once the extension is installed, simply use it in your code by :
$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);```
统计信息
- 总下载量: 2.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2017-09-06