ritechoice23/laravel-fluent-ffmpeg

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

Fund package maintenance!
ritechoice23

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ritechoice23/laravel-fluent-ffmpeg

1.0.0 2025-11-26 16:24 UTC

This package is auto-updated.

Last update: 2025-11-26 21:01:36 UTC


README

Laravel Fluent FFmpeg Thumbnail

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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

Installation

composer require ritechoice23/laravel-fluent-ffmpeg

Publish the configuration:

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

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

Features

  • Fluent API - Chainable, expressive syntax
  • 20+ Filters - Watermarks, effects, transformations
  • Multiple Formats - MP4, HLS, DASH, GIF, and more
  • 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 - 65+ passing tests

Documentation

Requirements

  • PHP 8.2+
  • Laravel 10.0+
  • FFmpeg 4.0+

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.