wlfpanda1012/video-transformer

视频转换工小工具

v1.0.0 2024-11-06 05:37 UTC

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
  • Laravel Publish config

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));