PHPackages                             ritechoice23/laravel-fluent-ffmpeg - 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. ritechoice23/laravel-fluent-ffmpeg

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

ritechoice23/laravel-fluent-ffmpeg
==================================

A fluent, chainable API for working with FFmpeg in Laravel applications

1.5.0(4mo ago)90682↓50%5[2 PRs](https://github.com/ritechoice23/laravel-fluent-ffmpeg/pulls)MITPHPPHP ^8.2CI passing

Since Nov 26Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/ritechoice23/laravel-fluent-ffmpeg)[ Packagist](https://packagist.org/packages/ritechoice23/laravel-fluent-ffmpeg)[ Docs](https://github.com/ritechoice23/laravel-fluent-ffmpeg)[ GitHub Sponsors](https://github.com/ritechoice23)[ RSS](/packages/ritechoice23-laravel-fluent-ffmpeg/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (13)Versions (8)Used By (0)

Laravel Fluent FFmpeg
=====================

[](#laravel-fluent-ffmpeg)

[![Laravel Fluent FFmpeg Thumbnail](assets/thumbnail.png)](assets/thumbnail.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d5134de22bd4bb8d2d61d4a605cc73e72af0ca8ccd6f23da95373a307bd37510/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7269746563686f69636532332f6c61726176656c2d666c75656e742d66666d7065672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ritechoice23/laravel-fluent-ffmpeg)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3911166f2ea133c80818330e096ffdc8b0aef04b6f3c5042bd88b072a0ee38e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7269746563686f69636532332f6c61726176656c2d666c75656e742d66666d7065672f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ritechoice23/laravel-fluent-ffmpeg/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a1277d23d23eb032172c0301d54b866ef38ee755649ec08f9075d48d1ca04e4a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7269746563686f69636532332f6c61726176656c2d666c75656e742d66666d7065672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ritechoice23/laravel-fluent-ffmpeg/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/ecffab235a63345d8ea586b8e221066efb184234ac07f7a3710a03ee967bea8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7269746563686f69636532332f6c61726176656c2d666c75656e742d66666d7065672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ritechoice23/laravel-fluent-ffmpeg)[![Buy Me A Coffee](https://camo.githubusercontent.com/e78c1a35f8d1b89d3cf0ef6638e09772cdd62d1eadf18fb59ec6914ffc2890d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323041253230436f666665652d737570706f72742d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](https://buymeacoffee.com/ritechoice23)

A fluent, chainable API for working with FFmpeg in Laravel applications. Process videos and audio with an elegant, expressive syntax.

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

[](#installation)

```
composer require ritechoice23/laravel-fluent-ffmpeg
```

Publish the configuration:

```
php artisan vendor:publish --tag=fluent-ffmpeg-config
```

Quick Start
-----------

[](#quick-start)

```
use Ritechoice23\FluentFFmpeg\Facades\FFmpeg;

// Basic video conversion
FFmpeg::fromPath('video.mp4')
    ->videoCodec('libx264')
    ->audioCodec('aac')
    ->resolution(1920, 1080)
    ->save('output.mp4');

// Or using the global helper
ffmpeg()->fromPath('video.mp4')
    ->videoCodec('libx264')
    ->save('output.mp4');

// Extract audio
FFmpeg::fromPath('video.mp4')
    ->extractAudio()
    ->save('audio.mp3');

// Create GIF
FFmpeg::fromPath('video.mp4')
    ->clip('00:00:05', '00:00:10')
    ->toGif(['fps' => 15, 'width' => 480])
    ->save('animation.gif');

// Advanced HLS Streaming (Multi-bitrate)
FFmpeg::fromPath('video.mp4')
    ->exportForHLS()
    ->addFormat('1080p')
    ->addFormat('720p')
    ->addFormat('480p')
    ->save('stream.m3u8');

// Extract multiple clips
FFmpeg::fromPath('video.mp4')
    ->clips([
        ['start' => '00:00:10', 'end' => '00:00:20'],
        ['start' => '00:01:30', 'end' => '00:02:00'],
        ['start' => '00:03:45', 'end' => '00:04:15'],
    ])
    ->save('highlight.mp4'); // Outputs: highlight_1.mp4, highlight_2.mp4, highlight_3.mp4

// Video composition with intro, outro, and watermark
FFmpeg::fromPath('video.mp4')
    ->withIntro('intro.mp4')
    ->withOutro('outro.mp4')
    ->withWatermark('logo.png', 'bottom-right')
    ->save('branded.mp4');

// Process all videos in a directory
FFmpeg::fromDirectory('/path/to/videos')
    ->resize(1920, 1080)
    ->withWatermark('logo.png', 'top-right')
    ->save('/path/to/output/');

// Add text overlay (supports multiple overlays!)
FFmpeg::fromPath('video.mp4')
    ->withText('Title', ['position' => 'top-center', 'font_size' => 36])
    ->withText('Subtitle', ['position' => 'center', 'font_size' => 24])
    ->withText('© 2024', ['position' => 'bottom-right', 'font_size' => 14])
    ->save('output.mp4');

// Generate audio waveforms for visualization
FFmpeg::fromPath('audio.mp3')
    ->audioCodec('aac')
    ->withPeaks(samplesPerPixel: 512, normalizeRange: [0, 1])
    ->save('output.m4a');
// Outputs: output.m4a + output-peaks.json
```

Features
--------

[](#features)

- **Fluent API** - Chainable, expressive syntax
- **Audio Waveforms** - Generate waveform data for visualization
- **Multi-Clip Extraction** - Extract multiple clips with auto-numbering
- **Directory Processing** - Process multiple files from a directory
- **Multiple Text Overlays** - Add multiple styled text overlays with positioning and timing
- **Video Composition** - Add intro, outro, and watermarks to clips
- **20+ Filters** - Effects, transformations, overlays
- **Multiple Formats** - MP4, HLS, DASH, GIF, and more
- **Media Probing** - Get detailed video/audio information
- **Laravel Disks** - Save to S3, local, or any disk
- **Progress Tracking** - Real-time progress with broadcasting
- **Queue Support** - Process videos in background
- **Smart Defaults** - Sensible defaults from config
- **Events** - Track processing lifecycle
- **Fully Tested** - 228+ passing tests

Documentation
-------------

[](#documentation)

- [Installation &amp; Configuration](docs/installation.md)
- [Basic Usage](docs/basic-usage.md)
- [Audio Waveforms](docs/audio-waveforms.md) - Generate waveform data for visualization
- [Directory Processing](docs/directory-processing.md) - Process multiple files from a directory
- [Text Overlay](docs/text-overlay.md) - Add styled text to videos
- [Clipping](docs/clipping.md) - Extract single or multiple video clips
- [Video Composition](docs/video-composition.md) - Add intro/outro/watermark
- [Media Probing](docs/probe.md) - Get video/audio information
- [Video Options](docs/video-options.md)
- [Audio Options](docs/audio-options.md)
- [Subtitle Options](docs/subtitle-options.md)
- [Filters &amp; Effects](docs/filters.md)
- [Format Conversion](docs/format-conversion.md) - Convert to MP3, MP4, WebM, and more
- [Formats &amp; Streaming](docs/formats.md)
- [Advanced HLS](docs/hls.md)
- [Cross-Platform Compatibility](docs/compatibility.md)
- [Laravel Integration](docs/laravel-integration.md)
- [Queue Processing](docs/queue.md)
- [Events &amp; Broadcasting](docs/events.md)
- [Helper Methods](docs/helpers.md)
- [Package Lifecycle](docs/lifecycle.md)
- [API Reference](docs/api-reference.md)

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10.0+
- FFmpeg 4.0+

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Daramola Babatunde Ebenezer](https://github.com/ritechoice23)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance82

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.2% 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 ~4 days

Total

6

Last Release

147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc2c3a32449f76aa8dfca355106fce6c5ade0effe7d22fa265493051e890aa40?d=identicon)[ritechoice23](/maintainers/ritechoice23)

---

Top Contributors

[![ritechoice23](https://avatars.githubusercontent.com/u/62488893?v=4)](https://github.com/ritechoice23 "ritechoice23 (34 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![devhammed](https://avatars.githubusercontent.com/u/22827908?v=4)](https://github.com/devhammed "devhammed (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![willvincent](https://avatars.githubusercontent.com/u/689891?v=4)](https://github.com/willvincent "willvincent (1 commits)")

---

Tags

ffmpeglaravellaravel-ffmpeglaravel-fluent-ffmpeglaravelprocessingstreamingconversionaudiovideoffmpegfluentmediahlsritechoice23

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ritechoice23-laravel-fluent-ffmpeg/health.svg)

```
[![Health](https://phpackages.com/badges/ritechoice23-laravel-fluent-ffmpeg/health.svg)](https://phpackages.com/packages/ritechoice23-laravel-fluent-ffmpeg)
```

###  Alternatives

[happyworm/jplayer

jPlayer allows you to create a media player with a consistent interface and experience across all browsers.

4.6k114.2k1](/packages/happyworm-jplayer)[folour/flavy

FFmpeg layer for Laravel 5.2-5.4, this is a fork of rafasamp/sonus package

279.6k](/packages/folour-flavy)[soluble/mediatools

FFMpeg video/audio/subs conversions, thumbnails, audio extraction, query...

1451.7k](/packages/soluble-mediatools)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)[aminyazdanpanah/php-shaka

Shaka PHP is a library that uses Shaka Packager for DASH and HLS packaging and encryption, supporting Common Encryption for Widevine and other DRM Systems.

939.0k1](/packages/aminyazdanpanah-php-shaka)[webplusm/gallery-json-media

a filament media storing in a Json field

196.0k](/packages/webplusm-gallery-json-media)

PHPackages © 2026

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