承接 ekoukltd/video-thumbnail 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ekoukltd/video-thumbnail

最新稳定版本:5.0.0

Composer 安装命令:

composer require ekoukltd/video-thumbnail

包简介

Video thumbnails

README 文档

README

Simple package for generating video thumbnail in Laravel using FFMpeg.

Support my work

If you want to support my work in other way than contributing the code itself, you can always pass me some small donation 🍺 at https://paypal.me/ekoukltd :)

Installation

Composer install:

composer require ekoukltd/video-thumbnail

After package installation, add the ServiceProvider to the providers array in config/app.php

Ekoukltd\VideoThumbnail\VideoThumbnailServiceProvider::class

And to the aliases array

'VideoThumbnail' => Ekoukltd\VideoThumbnail\Facade\VideoThumbnail::class

Also you can publish package config file with:

php artisan vendor:publish --tag=video-thumbnail

and set ffmpeg and ffprobe paths in .env file:

FFMPEG="/usr/bin/ffmpeg"
FFPROBE="/usr/bin/ffprobe"

Versions

Laravel PHP ekoukltd/video-thumbnail php-ffmpeg/php-ffmpeg
>= ^5.0 and < ^5.8 < 7.4 ^1.* 0.11.0
^5.8 and ^6.* >= 7.4 and <= 8.1 ^2.* 0.13.0
^7.* and ^8.* >= 7.4 and <= 8.1 ^3.* 0.19.0
^9.* >= 8.0 ^4.* 1.*
^10.* >= 8.1 ^5.* 1.*

Usage

VideoThumbnail::createThumbnail(
    $videoUrl, 
    $storageUrl, 
    $fileName, 
    $second, 
    $width = 640, 
    $height = 480
);

$videoUrl - absolute path to video file,
$storageUrl - absolute path where the thumbnail should be save,
$fileName - name of thumbnail file,
$second - from which second of the movie thumbnail should be created,
$width [Optional] - width (in pixels) of the thumbnail (default 640),
$height [Optional] - height (in pixels) of the thumbnail (default 480).

Example

VideoThumbnail::createThumbnail(
    public_path('files/movie.mp4'), 
    public_path('files/thumbs/'), 
    'movie.jpg', 
    2, 
    1920, 
    1080
);

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-15