PHPackages                             vasictech/encoder - 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. vasictech/encoder

ActiveLibrary

vasictech/encoder
=================

Laravel package for encoding video files using FFMpeg

016PHP

Since Oct 4Pushed 9y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

\#Laravel Encoder (Alpha) 1.0

An OOP Laravel package user for encoding video files with [FFMPEG](https://www.ffmpeg.org/)

Package is currently in Alpha stage, with small amount of functions, and it will be constanly upgrade with a lot different features

This library requires a working FFMpeg install.

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

[](#installation)

The recommended way to install Encoder is through [Composer](https://getcomposer.org).

```
{
    "require": {
        "vasictech/encoder": "~1.0"
    }
}
```

Register package as service in config/app.php

```
return [
    VasicTech\Encoder\EncoderServiceProvider::class,
]
```

Execute config publish

```
return [
    'encoder' => 'ffmpeg',

    'ffmpeg' => [
        'path' => '/usr/bin/ffmpeg',
        'codecs' => [
            'video' => 'libx264',
            'audio' => 'aac',
        ],
        'options' => [
            'strict' => true,
            'replace' => true,
            'fork' => true,
            'log' => storage_path(),
        ]
    ]
];
```

Configure config file

```
return [
    VasicTech\Encoder\EncoderServiceProvider::class,
]
```

Basic Usage
-----------

[](#basic-usage)

```
$encoder = VasicTech\Encoder\Encoder\FFMpeg();
$jobId = $encoder
    ->input(storage_path('app/public/trailer.mp4'))
    ->output(storage_path('app/public/trailer_enc.mp4'))
    ->execute();
```

Script returns jobID which can be recorded in database to be connected with files. Output log file will be named as jobID

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

[](#documentation)

Codec
-----

[](#codec)

You can provide both, or just one parameter, first is video codec, second is audio codec

```
$encoder->codecs('libx264', 'libfaac');
```

Bitrate
-------

[](#bitrate)

You can provide both, or just one parameter, first is video bitrate, second is audio bitrate

```
$encoder->bitrate('1200k', '128k');
```

Size
----

[](#size)

You can provide both, or just one parameter, first is video width, second is video height, if one is not provided, video will scale to provided size

```
$encoder->size(1280, 720);
```

Replace
-------

[](#replace)

If ffmpeg should replace already existing file

```
$encoder->replace(true);
```

Strict
------

[](#strict)

If '-strict -2' parameter should be added

```
$encoder->strict(true);
```

Fork
----

[](#fork)

If process should be forked

```
$encoder->fork(true);
```

Log
---

[](#log)

If ffmpeg should write to log file

```
$encoder->log('/path/to/file.log');
```

Format
------

[](#format)

Force output format

```
$encoder->format('mp4');
```

License
-------

[](#license)

This project is licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.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.

### Community

Maintainers

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

---

Top Contributors

[![alekquantox](https://avatars.githubusercontent.com/u/46532284?v=4)](https://github.com/alekquantox "alekquantox (9 commits)")[![vasictech](https://avatars.githubusercontent.com/u/22612949?v=4)](https://github.com/vasictech "vasictech (4 commits)")

### Embed Badge

![Health badge](/badges/vasictech-encoder/health.svg)

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

PHPackages © 2026

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