PHPackages                             gauravgpil/php-video-automator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. gauravgpil/php-video-automator

ActiveLibrary[Image &amp; Media](/categories/media)

gauravgpil/php-video-automator
==============================

A standalone PHP library to automatically generate videos from text scripts using FFMPEG, AI images, and stock footage.

v1.3.51(3w ago)174↓87%MITPHPPHP ^8.1

Since Jun 2Pushed 3w agoCompare

[ Source](https://github.com/Gauravgpil/php-video-automator)[ Packagist](https://packagist.org/packages/gauravgpil/php-video-automator)[ RSS](/packages/gauravgpil-php-video-automator/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (58)Used By (0)

PHP Video Automator
===================

[](#php-video-automator)

A standalone PHP library to automatically generate videos from text scripts using FFMPEG, AI images, and stock footage. Built exactly to avoid per-generation costs of 3rd party AI video services.

Features
--------

[](#features)

1. **AI Image-Based Videos (Idea 1):** Splits a script into chunks, generates AI images for each chunk, adds Ken-Burns/zoompan animations, overlays captions, and stitches them into a full MP4.
2. **Stock Footage Videos (Idea 2):** Parses a script to fetch relevant stock videos from Pixabay, randomly selects varied clips to avoid repetition, standardizes formats, and stitches them together seamlessly.

Installation
------------

[](#installation)

```
composer require gauravgpil/php-video-automator
```

*Note: You must have `ffmpeg` installed on your server system.*

Usage
-----

[](#usage)

### Setup

[](#setup)

Note: `wikimedia` and `archive` providers are 100% free and do not require API keys!

```
use PhpVideoAutomator\VideoAutomator;

$config = [
    'ffmpeg_path' => '/usr/bin/ffmpeg', // Optional, defaults to 'ffmpeg'
    'ai_image_api_key' => 'sk-your-openai-key',
    'pixabay_api_key' => 'your-pixabay-key',
    'pexels_api_key' => 'your-pexels-key',
    'coverr_api_key' => 'your-coverr-key',
];

$automator = new VideoAutomator($config);
```

### Idea 1: Text to AI Images to Video

[](#idea-1-text-to-ai-images-to-video)

```
$automator->fromImages()
    ->setScript("Welcome to our AI channel. Today we learn about the future.")
    ->generateImages() // Uses OpenAI by default
    ->addAnimation('ken-burns')
    ->withCaptions(true)
    ->export('/var/www/output_ai_video.mp4');
```

### Idea 2: Script to Stock Video (Pixabay, Pexels, Coverr, Wikimedia, Archive)

[](#idea-2-script-to-stock-video-pixabay-pexels-coverr-wikimedia-archive)

```
$automator->fromStockVideos()
    ->setScript("Beautiful waterfalls and lush green nature forests.")
    ->fetchStockVideos('wikimedia', '', ['randomize' => true, 'count' => 3])
    ->addTransitions('fade')
    ->export('/var/www/output_stock_video.mp4');
```

Testing
-------

[](#testing)

Run tests via PHPUnit:

```
vendor/bin/phpunit
```

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance95

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

57

Last Release

24d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/229124371?v=4)[Gaurav Ghoghari](/maintainers/Gauravgpil)[@Gauravgpil](https://github.com/Gauravgpil)

---

Top Contributors

[![Gauravgpil](https://avatars.githubusercontent.com/u/229124371?v=4)](https://github.com/Gauravgpil "Gauravgpil (51 commits)")

---

Tags

automationaiarchivegeneratorvideoffmpegWikimediapexelsPixabay

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gauravgpil-php-video-automator/health.svg)

```
[![Health](https://phpackages.com/badges/gauravgpil-php-video-automator/health.svg)](https://phpackages.com/packages/gauravgpil-php-video-automator)
```

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[pulse00/ffmpeg-bundle

Symfony bundle to provide PHP-FFmpeg as a Symfony service (https://github.com/alchemy-fr/PHP-FFmpeg)

59457.1k1](/packages/pulse00-ffmpeg-bundle)[lakshmaji/thumbnail

Thumbnails for videos

108123.2k](/packages/lakshmaji-thumbnail)[fmonts/ffmpeg-bundle

Symfony bundle to provide PHP-FFmpeg as a Symfony service (https://github.com/PHP-FFMpeg/PHP-FFMpeg/)

12215.2k](/packages/fmonts-ffmpeg-bundle)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

133.0k](/packages/daun-statamic-mux)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
