wlfpanda1012 / video-transformer
视频转换工小工具
v1.0.0
2024-11-06 05:37 UTC
Requires
- php: >=8.1
- aliyuncs/oss-sdk-php: ^2.7
- hyperf/support: ^3.1
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^4.5
Suggests
- swow/swow: Required to create swow components.
This package is auto-updated.
Last update: 2025-03-06 06:26:15 UTC
README
composer require wlfpanda1012/video-transformer -oW
Configuration
Hyperf Publish config
php bin/hyperf.php vendor:publish wlfpanda1012/video-video-transformer
Config files:
+ ./config/autoload/translation.php
php artisan vendor:publish --tag=transformer-config
Config files:
+ ./config/translation.php
Configuration
在.env 填入
#aliyun ALIYUN_OSS_ACCESS_ID=************** ALIYUN_OSS_ACCESS_SECRET=************** ALIYUN_OSS_BUCKET=bucket_name
Usage
$aliyun = Config::get('transformer.aliyun'); $transformer = new Transformer($aliyun['accessId'],$aliyun['accessSecret'],$aliyun['endpoint'],$aliyun['bucketName'],$aliyun['region']); var_dump($transformer->previewM3U8('video/2024-11/67298e3bbf920.mp4',VideoStyle::H264_M3U8_720P));