定制 veeroll-package/composer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

veeroll-package/composer

最新稳定版本:v1.0.26

Composer 安装命令:

composer require veeroll-package/composer

包简介

Veeroll package for creating video via API requests.

README 文档

README

This package allows you to create Veeroll videos using various modes, including express mode.

Installation

To install the package, run the following command:

composer require veeroll-package/composer

Configuration

After installing the package, add the VeerollServiceProvider to the providers array in config/app.php:

'providers' => ServiceProvider::defaultProviders()->merge([
    Veeroll\VeerollServiceProvider::class,
])->toArray(),

run the command below

php artisan vendor:publish --provider="Vendor\Veeroll\VeerollServiceProvider"

Usage

Below is an example of how to create a Veeroll video: ( note that it will take some time before your images and voice overs will be generated, ) you can always check on key frames and generating_vo key if voice over is still on process and key generating_ai_image for images on process for ai generation

use Vendor\Veeroll\Services\VideoService;

$params = [
    "picture_format_id" => 2,
    "duration" => 15, //min of 10 maximum 180(3 minutes) 
    "language_id" => 1,
    "voice_over" => 0, // true or false 
    "captions" => 1, // true or false
    "video_type_id" => 7,
    "video_tone_id" => 3,
    "name" => "test", 
    "topic" => "city lights", // topic of the video that will be used by the AI to generate contents
    "asset_type" => "express_mode", // express_mode => generate AI Images , stock_pictures => generate stock images , plain => solid backgrounds , stock_videos => generate stock videos
    "tone_id" => 1,
    "ai_style_id" => 8,
    "voice" => 1 // true or false
];

$veerollpackage = new VideoService();
$veerollpackage->createVideo($params);

sample response after creating a video

 [
  "data" =>  [
    id => 2
  ],
  "message" => "Video created successfully"
]

get account credits / balance

use Vendor\Veeroll\Services\VideoService;

$veerollpackage = new VideoService();
$veerollpackage->getCredits();

sample response

{
    "credits": {
        "ai_credits_balance": "Unlimited",
        "video_credits_balance": "Unlimited",
        "voice_over_credits_balance": "Unlimited",
        "video_duration_credits_balance": "Unlimited",
        "pict_to_video_credits_balance": 0
    }
}

Below is an example of how to generate a video once all your voice overs or images are generated,

use Vendor\Veeroll\Services\VideoService;


$veerollpackage = new VideoService();
$videoId = 2;
$veerollpackage->generateVideo($videoId);

To get the generated video urls and download it , you can call on this api to monitor the status of the generation of video

use Vendor\Veeroll\Services\VideoService;


$veerollpackage = new VideoService();
$videoId = 2;
$veerollpackage->getVideoURLs($videoId);

a sample reponse will be like this, TAKE NOTE of the status field, if its equal to 0 or false, it means its still on going on the process of generating, with status equal to 1 is finish

[
  "video_export" =>[
    [
      'video_id' => 2,
      'status' => 1, 
      'download_url' => 'https://s3.us-west-2.amazonaws.com/sample.mp4',
      'actual_duration' => 21,
      'date_generated' => "2024-09-26 13:10:01"
      'created_at' => "2024-09-26T05:10:01.000000Z"
      'updated_at' => "2024-09-26T05:13:23.000000Z"
    ]
  ]
]

available picture_format_ids

ID  Label              Aspect Ratio  Width  Height

1   Square (1:1)       1:1           1024   1024
2   Vertical (9:16)    9:16          768    1344
3   Wide (16:9)        16:9          1344   768

available language_id

ID  Label               Language

1   English             English US
2   English UK          English UK
3   Portuguese          Portuguese
4   Spanish             Spanish
5   French              French
6   German              German
7   Italian             Italian
8   Dutch               Dutch
9   Bahasa Indonesia    Bahasa Indonesia
10  Mandarin            Mandarin
11  Filipino            Filipino
12  Latin edit          Latin

available video_type_id

ID  Label

1   Fun facts
2   Listicle
3   Tips
4   Education
5   Short-story
6   Motivation
7   Default

available video_tone_id

ID  Label            Tone

1   Corporate        The video style is corporate.
2   Marketing        The video purpose is for marketing.
3   Casual           The video tone should be casual.
4   Energetic        The video tone should be energetic.
5   Educational      The video style is educational.
6   Intriguing       The video tone should be intriguing.
7   Humorous         The video tone should be humorous.
8   Serious          The video tone should be serious.
9   Inspirational    The video should be inspirational.
10  Motivational     The video style should be motivational.
11  Dramatic         The video style should be dramatic.
12  Joyful           The video tone should be joyful.

available ai_style_id , this is for the visuals ( images / videos)

ID  Label               Style           Description

1   Pencil sketch       Line-art        Black and white hand-drawn pencil sketch
2   Comic Book          Comic-book      Colored comic book style drawing
3   Anime               Anime           Colored anime style drawing
4   2D isometric        Isometric       2D isometric style
5   Photo realistic     Photographic    Photo realistic picture
6   Origami             Origami         Origami style drawing
7   Pixel art           Pixel-art       Pixel art style drawing
8   Movie style         Cinematic       Movie style picture
9   Colour marker       Digital-art     Colour marker style sketch
10  Neon                Neon-punk       Neon style drawing
11  3D model            3D-model        3D render picture
12  Sepia               Line-art        Sepia hand-drawn pencil sketch
13  Watercolor          Line-art        Watercolor drawing
14  Fantasy             Digital-art     Fantasy drawing
15  Polygon             Digital-art     Polygon style drawing
16  2D Flat             Enhance         2D explainer video-style picture (flat:0.9, minimal:0.9, simple shapes:0.9)


available tone_id ( music_tones)

ID  Label

1   Carefree
2   Epic
3   Exciting
4   Funny
5   Groovy
6   Happy
7   Love
8   Mysterious
9   Peaceful
10  Uplifting




## Environment Variables
Make sure to set the following environment variables in your .env file:

VEEROLL_SECRET=your-secret-value VEEROLL_API_KEY=your-api-key

veeroll-package/composer 适用场景与选型建议

veeroll-package/composer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 145 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 08 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「api」 「video」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 veeroll-package/composer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 veeroll-package/composer 我们能提供哪些服务?
定制开发 / 二次开发

基于 veeroll-package/composer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-20