tbetool/php-video-screenshot
最新稳定版本:1.1.1
Composer 安装命令:
composer require tbetool/php-video-screenshot
包简介
Generate/Take screenshot of the video file in PHP using FFMPEG
关键字:
README 文档
README
Generate screenshot from the video file using PHP
Requirement
- FFMPEG
Using the Library
Installation
Intall library in PHP project using composer
composer require tbetool/php-video-screenshot
Using Library
$obj = new GenerateVideoScreenshots(FFMPEG_PATH);
$obj->setOutputPath('output_location');
Generating screenshot/thumbnail
Screenshot/Thumbnail can be generate by passing absolute path of the video file in following function call.
$thumbnail = $obj->generateScreenshot('video_file_path');
If you want to save screenshot to a different directory, you can pass the path of the directory as the second parameter.
$thumbnail = $obj->generateScreenshot('video_file_path', 'output_path');
NOTE
- If output path is not set using setOutputPath() or during generateScreenshot(), it will use the path to the video file to save the screenshot.
Exception Handling
Ex:
try {
$thumbnail = $obj->generateScreenshot('video_file_path');
} catch (Exception $exception) {
echo $exception->getMessage();
}
Bug Reporting
If you found any bug, create an issue.
Support and Contribution
Something is missing?
Forkthe repositroy- Make your contribution
- make a
pull request
统计信息
- 总下载量: 1.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-10-24