foxws/laravel-ab-av1
| Install | |
|---|---|
composer require foxws/laravel-ab-av1 |
|
| Latest Version: | 3.1.1 |
| PHP: | ^8.4 |
| Laravel: | 13 |
| Older releases: | 11 · 12 |
| License: | MIT |
| Last Updated: | Oct 14, 2026 |
| Links: | GitHub · Packagist |
Laravel ab-av1
Runs ab-av1 from Laravel to encode video to AV1. You set the quality you want as a VMAF score, and ab-av1 finds the smallest encode that reaches it. It's an add-on for foxws/laravel-media: read the source from any Laravel disk, and write the result to any disk.
See the full documentation: Installation, Usage, Testing, Configuration, Upgrading from 2.x.
Requirements
- PHP 8.4 or higher
- Laravel 13
- foxws/laravel-media 0.3 or higher (installed with the package)
- ab-av1, with FFmpeg built with svt-av1 and libvmaf
Installation
composer require foxws/laravel-ab-av1
php artisan vendor:publish --tag="ab-av1-config"
Install the ab-av1 binary, then check the setup:
php artisan media:info
See Installation for details.
[!TIP] Let your AI agent do the hard parts. This package ships a Laravel Boost skill,
laravel-ab-av1-development, that teaches your agent how to install, configure and use Laravel ab-av1. Install Boost and select the skill when prompted:composer require laravel/boost --dev php artisan boost:installAlready using Boost? Run
php artisan boost:update --discoverto pick up the skill. Then just ask, for example: "Encode uploaded videos to AV1 at a VMAF of 95 and save them to S3."
Quick start
use Foxws\Media\Facades\Media;
$result = Media::fromDisk('media')
->open('videos/clip.mp4')
->abAv1()
->withPreset(6)
->withMinVMAF(95)
->toDisk('s3')
->save('encoded/clip.mp4');
$result->crf; // e.g. 30.25
$result->vmaf; // e.g. 95.1
This finds the CRF that reaches a VMAF score of 95, encodes the video with it, and uploads the result to encoded/clip.mp4 on the s3 disk. laravel-media cleans up the temporary files after the queue job or request.
See Usage for the other ab-av1 commands, hardware encoders, filters and checking the result.
Testing
composer test
Links
- CHANGELOG
- Security policy
- ab-av1
- Laravel Media, to stream or package the result as HLS and DASH
Credits
- francoism90
- All Contributors
- ab-av1 by Alex Butler, which does the actual work
Used by Stry, a self-hosted video streaming app.
AI, specifically Claude, was used to help build this package. All AI-assisted output is reviewed by me, and I retain final say over everything that is implemented and released.
License
MIT. See License File.
Related Packages
Media library for Laravel: ingest, probe, transcode and serve video, audio, imag...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.1.1 | ^8.4 | ^13.0 | MIT | |
| 3.1.0 | ^8.4 | ^13.0 | MIT | |
| 3.0.0 | ^8.4 | ^13.0 | MIT | |
| 2.0.1 | ^8.4 | ^12.0|| | MIT | |
| 2.0.0 | ^8.4 | ^12.0|| | MIT | |
| 1.1.0 | ^8.4 | ^12.0|| | MIT | |
| 1.0.1 | ^8.4 | ^12.0|| | MIT | |
| 1.0.0 | ^8.4 | ^12.0|| | MIT | |
| 0.8.0 | ^8.4 | ^12.0|| | MIT | |
| 0.7.0 | ^8.4 | ^11.0 || | MIT | |
| 0.6.0 | ^8.4 | ^11.0|| | MIT | |
| 0.5.0 | ^8.4 | ^11.0|| | MIT | |
| 0.4.0 | ^8.4 | ^11.0|| | MIT | |
| 0.3.0 | ^8.4 | ^11.0|| | MIT | |
| 0.2.0 | ^8.4 | ^11.0|| | MIT | |
| 0.1.0 | ^8.4 | ^11.0|| | MIT |