PHPackages                             ivebe/lffmpeg - 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. ivebe/lffmpeg

ActiveLibrary

ivebe/lffmpeg
=============

PHP-FFMpeg implementation in laravel with progress bar. Plug and play.

0.0.8(8y ago)5785[1 issues](https://github.com/ivebe/lffmpeg/issues)PHP

Since Jan 11Pushed 8y ago4 watchersCompare

[ Source](https://github.com/ivebe/lffmpeg)[ Packagist](https://packagist.org/packages/ivebe/lffmpeg)[ RSS](/packages/ivebe-lffmpeg/feed)WikiDiscussions master Synced 2mo ago

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

LFFMPEG
=======

[](#lffmpeg)

PHP-FFMpeg implementation in Laravel with progress bar. Plug and play.

### Installation

[](#installation)

Install using composer.

```
composer require ivebe/lffmpeg
```

After you install it add service provider to the providers array in the `config/app.php`

```
Ivebe\Lffmpeg\LffmpegServiceProvider::class
```

Publishing at least config from the vendor is required, this is tagged as defaults. Available tags are `migrations`, `models`, `assets`, `views` and `defaults`. If you are building from scratch you can just ommit tag completely and publish everything. However if you already have system in place, and want to adopt it to use Lffmpeg, then publish defaults (config) only, and add current models implementation in the config file.

```
php artisan vendor:publish --tag=defaults
```

### Config

[](#config)

This is where encoding settings are placed, and also models that will handle the logic. Lffmpeg already have 3 eloquent models for **Video**, **Thumb**, and **EncodingProgress**

##### Paths

[](#paths)

Paths should not end with slash.

- ***paths#tmp\_path*** path on disk to the temporary directory. This is where you should upload your video file.
- **paths#content\_path** path on disk where encoded videos and thumbs will be placed

##### FFmpeg

[](#ffmpeg)

Location of the ffmpeg binaries.

- ***encoding#ffmpeg\_binaries*** absolute path to the ffmpeg binary
- **encoding#ffprobe\_binaries** absolute path to the ffprobe binary
- **encoding#threads** number of threads to use for encoding

##### Encoding

[](#encoding)

Desired profile used for encoding. Lffmpeg will automatically detect best possibile quality and encode from it. In other words if you have video that is not *HD*, then *1080p* profile wont be encoded, it will start from the best match profile. There is no upscalling.

- ***encoding*** array of encoding profiles. Example:

```
   /**
     * w - width
     * h - height
     * b - bitrate
     */
    'encoding' => [
        '1080p' => [
            'w' => 1920,
            'h' => 1080,
            'b' => 2000
        ],
        '720p' => [
            'w' => 1280,
            'h' => 720,
            'b' => 1500
        ],
        '480p' => [
            'w' => 854,
            'h' => 480,
            'b' => 1000
        ]
    ]
```

##### Video model

[](#video-model)

Videos are manipulated using VideoRepository. By default there is only Eloquent repository, so you need to set video model in the config file. If you are already having your video model, then just point proper column names and your model will be used instead. Note that variables are marked with `#` while colum names are marked with `@`.

- **video#model** Class that represent video model. (Ex. *\\App\\Video::class*)
- **video@duration** Name of the duration column
- **video@status** Name of the status column
- **video@default\_thumb** Name of the default\_thumb column

##### Thumb model

[](#thumb-model)

Thumbs are manipulated using ThumbRepository. By default there is only Eloquent repository, so you need to set thumb model in the config file. If you are already having your thumb model, then just point proper column names and your model will be used instead. Note that variables are marked with `#` while colum names are marked with `@`.

- **thumb#model** Class that represent thumb model. (Ex. *\\App\\Thumb::class*)
- **thumb#interval** Number of seconds between which thumbs are taken.
- **thumb#name-format** sprintf string where only parameter is number of image (Ex. thumb\_%s.jpg)
- **thumb#width** desired width of a thumb
- **thumb#height** desired height of a thumb
- **thumb@video\_id** name of foreign key video\_id
- **thumb@name** column name
- **thumb@scene\_time** column scene\_time

##### EncodingProgress model

[](#encodingprogress-model)

EncodingProgress doesn't have it's own repository, it is manipulated using VideoRepository. By default there is only Eloquent repository, so you need to set EncodingProgress model in the config file. If you are already having your EncodingProgress model, then just point proper column names and your model will be used instead. Note that variables are marked with `#` while colum names are marked with `@`.

- **progress#model** Class that represent EncodingProgress model (Ex. \\App\\EncodingProgress::class)
- **progress@video\_id** name of foreign key video\_id
- **progress@quality** name of the quality column
- **progress@status** name of teh status column
- **progress@percent** name of the percent column

### Usage

[](#usage)

Basic usage is as simple as typing `Helper::runEncoding(123);` where 123 is video ID in the Video repository. However you should know that each encoding process is done using jobs and queues, so you should setup your queue properly.

### Publishing vendor files

[](#publishing-vendor-files)

Available tags are `migrations`, `models`, `assets`, `views` and `defaults`.

- **migrations** if you wish to use pre-made models, publish migrations and run `php artisan migrate`
- **models** running `php artisan vendor:publish --tag=models` will place *Video*, *Thumb* and *EncodingProgress* models in the app directory.
- **assets** this will publish js file to the `public/assets/lffmpeg.js` which will have simple js written to handle display of the progress bar. You can see sample of it's usage if you publish views also.
- **views** publish example view file to the `resources/views/lffmpeg.blade.php`
- **defaults** publish config file.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% 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 ~20 days

Recently: every ~35 days

Total

8

Last Release

3269d ago

### Community

Maintainers

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

---

Top Contributors

[![dan-quantox](https://avatars.githubusercontent.com/u/17746156?v=4)](https://github.com/dan-quantox "dan-quantox (11 commits)")[![ivebe](https://avatars.githubusercontent.com/u/4104576?v=4)](https://github.com/ivebe "ivebe (3 commits)")[![Cogi993](https://avatars.githubusercontent.com/u/32095478?v=4)](https://github.com/Cogi993 "Cogi993 (1 commits)")

### Embed Badge

![Health badge](/badges/ivebe-lffmpeg/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[mostafaznv/larupload

Larupload is a ORM based file uploader for laravel to upload image, video, audio and other known files.

73403.7k3](/packages/mostafaznv-larupload)

PHPackages © 2026

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