Download the PHP package subhashladumor1/laravel-ai-video without Composer
On this page you can find all versions of the php package subhashladumor1/laravel-ai-video. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download subhashladumor1/laravel-ai-video
More information about subhashladumor1/laravel-ai-video
Files in subhashladumor1/laravel-ai-video
Package laravel-ai-video
Short Description Laravel AI Video is a high-performance, multi-model AI video generator for Laravel AI SDK. Create text-to-video, image-to-video, marketing videos, social media reels, and multi-aspect ratio content using modern AI models like Runway, Stability, Pika, and OpenAI.
License MIT
Informations about the package laravel-ai-video
Laravel AI Video โ High-Performance Multi-Model Video Engine
Laravel AI Video is a comprehensive, production-ready package for generating cinematic AI videos. It acts as an orchestration layer, combining the best AI models for scripting, visuals, motion, and voice into a single, unified pipeline.
Whether you need to automate Social Media Reels, create Product Ads, or generate Storytelling Content, this package handles the complex workflow of chaining AI APIs and rendering the final output.
๐ Features
- ๐ฌ Multi-Model Orchestration ("Composed" Driver):
- Scripting: OpenAI GPT-4o breaks prompts into cinematic scenes.
- Visuals: OpenAI DALL-E 3 generates high-consistency scene images.
- Motion: Runway Gen-4 Turbo / Leonardo Kling 2.1 brings images to life.
- Voice: OpenAI TTS-1 adds synchronized voiceovers.
- Rendering: FFmpeg merges everything with transitions and subtitles.
- ๐ผ๏ธ Image-to-Video: Support for animating images using Runway (Gen-4), Leonardo (Kling 2.1), or OpenAI (Sora).
- ๐ฑ Smart Templates: Built-in aspect ratios for Instagram/TikTok (9:16), YouTube (16:9), and Feeds (1:1).
- ๐ก๏ธ AI Guard Integration: Prevents API bill shock by estimating costs before execution and strictly enforcing budgets.
- โก High-Performance Architecture:
- Queue-based asynchronous processing.
- Streams temporary files to avoid memory overflows.
- Parallel execution where possible (dependent on driver).
๐ ๏ธ How It Works
The Composed Driver automates the entire video production lifecycle:
๐ Installation
-
Install via Composer:
-
Publish Configuration:
-
Install FFmpeg: Ensure
ffmpegandffprobeare installed on your server. - Configure
.env: Add your API keys. The package works best with multiple providers enabled.
๐ Complete Usage Guide
1. Text-to-Video (The "Composed" Pipeline)
This is the most powerful feature. It creates a full video from a simple text prompt.
Basic Usage:
Advanced Usage (Asynchronous Job): Recommended for production to avoid timeout issues.
2. Image-to-Video (Motion Generation)
Ideal for bringing product photography or static assets to life. Supports Runway, Leonardo, and Sora.
3. Scene Planning (Scripting Only)
Use the AI Director to break down a script into visual scenes without generating the video yet. Useful for UI previews.
4. Voiceover Generation (TTS)
Generate high-quality AI voiceovers directly.
๐ก๏ธ AI Guard & Cost Control
This package includes a Budget Enforcement System. It estimates the cost of every operation before it runs.
How to Configure:
In config/ai-video.php:
Usage Flow:
๐ Function Reference
VideoDriver Interface
The Facade AiVideo::driver('name') returns an instance implementing these methods:
| Method | Description | Options |
|---|---|---|
textToVideo($prompt, $opts) |
Generates full video from text. | duration, template, style |
imageToVideo($path, $opts) |
Animates a static image. | motion_bucket_id, seed |
generateScenes($script) |
Returns array of scene objects. | model (e.g., gpt-4o) |
generateVoice($text, $voice) |
Creates MP3 audio from text. | output_path, speed |
estimateCost($type, $params) |
Returns float ($) cost estimate. | input |
Supported Templates
Templates control the Output Resolution and default styling.
| Template | Aspect Ratio | Resolution | Best For |
|---|---|---|---|
youtube-standard |
16:9 | 1920x1080 | YouTube, TV, Desktop |
youtube-short |
9:16 | 1080x1920 | Shorts, TikTok, Reels |
instagram-reel |
9:16 | 1080x1920 | Instagram Stories/Reels |
square-post |
1:1 | 1080x1080 | FB/Insta Feed, Product Ads |
portrait |
4:5 | 1080x1350 | Mobile Feed |
๐๏ธ Extending
You can create your own drivers by implementing Subhashladumor1\LaravelAiVideo\Contracts\VideoDriver.
Register it in AppServiceProvider:
๐งช Testing
๐ License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-ai-video with dependencies
phpunit/phpunit Version ^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
illuminate/session Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0