PHPackages                             mikeambait/ffmpeglaravel - 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. mikeambait/ffmpeglaravel

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

mikeambait/ffmpeglaravel
========================

Laravel wrapper of php-ffmpeg for simple video conversion, editing, resizing etc., utilizing FFMpeg's powerful open source library/tool

v1.1(4y ago)061PHPPHP ^7.2

Since Mar 24Pushed 2y agoCompare

[ Source](https://github.com/morfino3/ffmpeg-laravel)[ Packagist](https://packagist.org/packages/mikeambait/ffmpeglaravel)[ RSS](/packages/mikeambait-ffmpeglaravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (5)Used By (0)

[![example workflow](https://github.com/morfino3/ffmpeg-laravel/actions/workflows/php.yml/badge.svg)](https://github.com/morfino3/ffmpeg-laravel/actions/workflows/php.yml/badge.svg)

FFMpegLaravel
=============

[](#ffmpeglaravel)

A simplified Laravel wrapper of PHP-FFMpeg: for simple video conversion, thumbnail generation, resizing etc., utilizing FFMpeg's powerful open source library/tool that can decode and encode any video format to one another.

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

[](#requirements)

- PHP 7.2
- Apache 2.2+

Configuration
-------------

[](#configuration)

A working installation of FFMpeg is needed

Install the ffmpeg

```
sudo apt update
sudo apt install ffmpeg
(mac) brew install ffmpeg

```

Run: `composer require mikeambait/ffmpeglaravel `

Or you can add a particular version (See tags)

Publish vendor

```
php artisan vendor:publish

```

Usage
-----

[](#usage)

Add this to your config/app.php, to use it globally

```
'FFMpegLaravel' => FFMpegLaravel\FFMpegLaravel\FFmpegLaravel::class
```

Convert video (change) quality, pass an optional parameter: 'channel', 'bitrate' (video quality) and 'audio'.

```
use FFMpegLaravel;

$FFMpegLaravelInstance = FFMpegLaravel::open(public_path() . '/egg.mp4');

$FFMpegLaravelInstance->save(public_path() . '/NewEgg.mp4', [
    'bitrate' => 500,
    'audio' => 256
]);
```

Convert video to audio

```
$mp3 = FFMpegLaravel::open(public_path() . '/egg.mp4');

$mp3->save(public_path() . '/egg.mp3');
```

Resize video

```
// params> width: integer(required) | height : integer(required) | $forceStandards : boolean(nullable)
// you can pass a boolean value in resize() to force the use of the nearest aspect ratio standard.
$resizedVideo = FFMpegLaravel::open(public_path() . '/egg.mp4')
            ->resize(640, 480)
            ->save(public_path() . '/resized_egg.mp4', [
                        'bitrate' => 500,
                        'audio' => 256
                    ]);
```

Removes audio from video

```
$mutedVideo = FFMpegLaravel::open(public_path() . '/egg.mp4')
            ->mute()
            ->save(__DIR__ . '/output/muted_egg.mp4');
```

Generate thumbnail:

```
// getThumbnail() , generates thumbnail at 10 secs mark, when no params passed
FFMpegLaravel::open('videos.mp4')
      ->getThumbnail(public_path() . '/filename.jpg');
```

Get duration of video in seconds:

```
// returns a integer of duration in seconds
$duration = FFMpegLaravel::open(public_path() . '/egg.mp4')
      ->getDuration();

echo $duration;
```

Generate GIF from a video:

```
// parameters: new filepath.gif | duration of GIF file : int(nullable) | from seconds: int(nullable)
$gif = FFMpegLaravel::open(public_path() . '/egg.mp4')
            ->generateGif(public_path() . '/sample.gif', 2 );

return $gif;
```

Get the resolution of video:

```
// returns an array of resolution of the video: 'width' & 'height'
$resolution = FFMpegLaravel::open(public_path() . '/egg.mp4')
      ->getResolution();

echo $resolution['width'] .' x '.$resolution['height'];
```

You might want to check the codec used by the video:

```
// returns a string of codec used by the video
$codec = FFMpegLaravel::open(public_path() . '/egg.mp4')
      ->getCodec();

echo $codec;
```

Testing
-------

[](#testing)

```
$phpunit tests/FFMpegLaravelTest
```

Credits
-------

[](#credits)

Credits to PHP-FFMpeg Team and Protone Media:

- [PHP-FFMpeg](https://github.com/PHP-FFMpeg/PHP-FFMpeg)
- [The PHP-FFMpeg constributors](https://github.com/PHP-FFMpeg/PHP-FFMpeg/graphs/contributors)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~589 days

Total

2

Last Release

1630d ago

PHP version history (2 changes)v1.0PHP ^7.4

v1.1PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/768d2ff2e6135703faa58a2dcea72ff838382bb6e31ef37f08e18c6041214e93?d=identicon)[morfino3](/maintainers/morfino3)

---

Top Contributors

[![morfino3](https://avatars.githubusercontent.com/u/41430497?v=4)](https://github.com/morfino3 "morfino3 (33 commits)")

---

Tags

audiophp-ffmpegvideovideo-conversionvideo-format

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mikeambait-ffmpeglaravel/health.svg)

```
[![Health](https://phpackages.com/badges/mikeambait-ffmpeglaravel/health.svg)](https://phpackages.com/packages/mikeambait-ffmpeglaravel)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)

PHPackages © 2026

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