PHPackages                             foxws/laravel-ab-av1 - 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. foxws/laravel-ab-av1

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

foxws/laravel-ab-av1
====================

A Laravel package for encoding videos to AV1 format using ab-av1.

1.0.0(2mo ago)11.5k↓28.4%MITPHPPHP ^8.4CI passing

Since Feb 16Pushed 1mo agoCompare

[ Source](https://github.com/foxws/laravel-ab-av1)[ Packagist](https://packagist.org/packages/foxws/laravel-ab-av1)[ Docs](https://github.com/foxws/laravel-ab-av1)[ GitHub Sponsors](https://github.com/Foxws)[ RSS](/packages/foxws-laravel-ab-av1/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (28)Versions (12)Used By (0)

Laravel ab-av1
==============

[](#laravel-ab-av1)

A Laravel wrapper for [ab-av1](https://github.com/alexheretic/ab-av1), the AV1 video encoder with automatic CRF calculation and VMAF quality targeting.

[![Latest Version on Packagist](https://camo.githubusercontent.com/8e259a0a2467f40ffcd3ddeaea3e096cae971177a2b3279aa886e4b2bda7437d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666f7877732f6c61726176656c2d61622d6176312e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/foxws/laravel-ab-av1)[![GitHub Tests Action Status](https://camo.githubusercontent.com/55aedaf54522d3cfde95698c4365149cb4ad2560b4d1717156a717e18c39798e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666f7877732f6c61726176656c2d61622d6176312f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/foxws/laravel-ab-av1/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/46d7737f524513087e6e21c56f28930aac2af3ee0543b6ec7a3176c917796f0e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666f7877732f6c61726176656c2d61622d6176312f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/foxws/laravel-ab-av1/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c97d798808b8a0e6c4e482513943637ce0afe96fdde9a4fb73528514ac64cab7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666f7877732f6c61726176656c2d61622d6176312e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/foxws/laravel-ab-av1)

Features
--------

[](#features)

- **Automatic CRF Discovery**: Find the optimal CRF value to achieve target VMAF quality
- **Multiple Encoders**: Support for av1\_svtenc, av1\_vaapi, libx264, libx265, and other ffmpeg encoders
- **Quick Sampling**: Test encode quality before full encoding
- **Hardware Acceleration**: Support for VAAPI and other hardware acceleration methods
- **VMAF/XPSNR Comparison**: Calculate quality scores between original and encoded files
- **Event Dispatching**: Listen to encoding events (started, completed, failed)
- **Fluent Interface**: Chainable configuration API

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

[](#installation)

Ensure `ab-av1` is installed:

```
# macOS
brew install ab-av1

# Linux (Arch)
sudo pacman -S ab-av1
```

Install the Laravel package:

```
composer require foxws/laravel-ab-av1
```

Publish the config:

```
php artisan vendor:publish --provider="Foxws\AbAv1\AbAv1ServiceProvider"
```

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

[](#configuration)

### Binary Path

[](#binary-path)

By default, the package expects `ab-av1` to be in your system PATH. If you need to use a specific binary path or version, configure it in `config/ab-av1.php` or via environment variable:

```
# .env
AB_AV1_BINARY=/usr/local/bin/ab-av1
# Or use a specific cargo installation
AB_AV1_BINARY=/home/user/.cargo/bin/ab-av1
```

Verify your installation:

```
php artisan ab-av1:info
```

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

[](#quick-start)

```
use Foxws\AbAv1\Facades\AbAv1;

$result = AbAv1::encode()
    ->withInput('/path/to/video.mp4')
    ->withPreset('medium')
    ->withMinVMAF(95)
    ->autoEncode();

echo "VMAF: {$result->getVMAFScore()}";
echo "CRF: {$result->getCRFUsed()}";
```

Usage Examples
--------------

[](#usage-examples)

### Auto-encode (Recommended)

[](#auto-encode-recommended)

Automatically find the best CRF for your target VMAF quality:

```
$result = AbAv1::encode()
    ->withInput('video.mp4')
    ->withPreset('medium')
    ->withMinVMAF(95)
    ->withOutput('output.mp4')
    ->autoEncode();
```

### Direct Encode

[](#direct-encode)

Encode with a specific CRF value:

```
$result = AbAv1::encode()
    ->withInput('video.mp4')
    ->withCRF(30)
    ->withPreset('slow')
    ->encode();
```

### Sample Encode

[](#sample-encode)

Quick test to preview quality:

```
$result = AbAv1::encode()
    ->withInput('video.mp4')
    ->withCRF(28)
    ->sampleEncode();
```

### Hardware Acceleration

[](#hardware-acceleration)

Enable VAAPI for faster encoding:

```
$result = AbAv1::encode()
    ->withInput('video.mp4')
    ->withPreset('medium')
    ->withMinVMAF(95)
    ->withFFmpegOptions([
        'hwaccel' => 'vaapi',
        'hwaccel_output_format' => 'vaapi',
    ])
    ->autoEncode();
```

Testing
-------

[](#testing)

```
composer test
```

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

[](#documentation)

See [examples/basic-usage.php](examples/basic-usage.php) for comprehensive usage examples.

For detailed documentation, see the [generated docs](DOCUMENTATION_INDEX.md).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [francoism90](https://github.com/foxws)
- [All Contributors](../../contributors)
- Inspired by [ab-av1](https://github.com/alexheretic/ab-av1)

License
-------

[](#license)

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

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance89

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% 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 ~3 days

Total

9

Last Release

62d ago

Major Versions

0.8.0 → 1.0.02026-03-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5028905?v=4)[François M.](/maintainers/francoism90)[@francoism90](https://github.com/francoism90)

---

Top Contributors

[![francoism90](https://avatars.githubusercontent.com/u/5028905?v=4)](https://github.com/francoism90 "francoism90 (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

ab-av1av1encodinglaraveltranscodelaravelencodingvideoffmpegav1foxwsab-av1

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/foxws-laravel-ab-av1/health.svg)

```
[![Health](https://phpackages.com/badges/foxws-laravel-ab-av1/health.svg)](https://phpackages.com/packages/foxws-laravel-ab-av1)
```

###  Alternatives

[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)[lakshmaji/thumbnail

Thumbnails for videos

108122.2k](/packages/lakshmaji-thumbnail)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[saasykit/laravel-open-graphy

An awesome open graph image (social cards) generator package for Laravel.

13057.0k](/packages/saasykit-laravel-open-graphy)[spatie/laravel-og-image

Generate OG images for your Laravel app

305.2k](/packages/spatie-laravel-og-image)

PHPackages © 2026

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