goncziakos/sonata-media-provider-video-bundle
最新稳定版本:v2.1.0
Composer 安装命令:
composer require goncziakos/sonata-media-provider-video-bundle
包简介
This bundle extends providers Sonata Media Bundle, creates a new provider for uploading videos and use FFmpeg
README 文档
README
The SonataMediaProviderVideoBundle extends providers SonataMediaBundle,
creates a new video provider for uploading videos, generate thumbnail and use FFmpeg.
This Bundle is based on xmon/SonataMediaProviderVideoBundle, forked from Grand-Central/SonataMediaProviderVideoBundle Grand-Central/SonataMediaProviderVideoBundle appear to be abandoned and I have made many changes, so I decided to create a new functional and documented project.
Requirements
You need install ffmpeg in your server.
Installation
Install this bundle
$ composer require xmon/sonata-media-provider-video-bundle
Add VideoBundle to your application kernel
// config/bundles.php <?php return [ // ... Xmon\SonataMediaProviderVideoBundle\XmonSonataMediaProviderVideoBundle::class => ['all' => true], ];
Configuration example
fter installing the bundle, make sure you configure these parameters
xmon_sonata_media_provider_video: ffmpeg_binary: "/usr/bin/ffmpeg" # Required, ffmpeg binary path ffprobe_binary: "/usr/bin/ffprobe" # Required, ffprobe binary path binary_timeout: 60 # Optional, default 60 threads_count: 4 # Optional, default 4 config: image_frame: 0 # Optional, default 10, Can not be empty. Where the second image capture video_width: 640 # Optional, default 640, Can not be empty. Video proportionally scaled to this width formats: mp4: true # Optional, default true, generate MP4 format ogg: true # Optional, default true, generate OGG format webm: true # Optional, default true, generate WEBM format
Twig usage
For printing the URLs of the converted videos that have been saved in the metadata field, I have created 3 twig filters
{{ media|video_mp4 }}
{{ media|video_ogg }}
{{ media|video_webm }}
Credits
- Thanks to all contributors who participated in the initial Forks of this project. Especially with the main Fork (maerianne/MaesboxVideoBundle) and Fork (sergeym/VideoBundle) I used to continue my development.
- Thanks other proyects required by this one:
- It has been used videojs plugin such as video player in the administration
统计信息
- 总下载量: 1.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-08