Laravel FFmpeg, the package that most Laravel apps use to convert video and audio, now has a version 9 that is a full rewrite. Pascal Baljet, who works at Laravel and wrote the package, released 9.0.0 on 25 November. It drops the PHP-FFMpeg library it was built on and uses Laravel’s own Process, Storage, queue and HTTP tools instead.
The release is a breaking upgrade. It needs PHP 8.4, Laravel 13.44.1 and FFmpeg 9.0 or later on the server. I ran the main steps myself on a Laravel 13.44.1 app and a real FFmpeg 9 build, so this piece is a deep dive and a follow-along in one. What I ran, and what I didn’t, is in its own section.
9.0.0
released 25 November
7
patch releases in about 19 hours
PHP 8.4
and Laravel 13.44.1 or later
FFmpeg 9.0
the oldest build it accepts
- The words, in plain terms
- What changed and why
- How to use it, step by step
- I ran it
- Pitfalls
- Upgrading from version 8
- The wider picture
- What isn’t known
The words, in plain terms
You don’t need to know video to follow this. Here are the terms, one at a time.
- FFmpeg
- A free command-line program that converts audio and video. Almost every video site uses it somewhere. It comes as two programs,
ffmpegto convert andffprobeto inspect. - Laravel FFmpeg
- A PHP package that lets a Laravel app tell FFmpeg what to do in readable code instead of long command strings. It doesn’t contain FFmpeg, so you install that yourself.
- Encoder
- The part of FFmpeg that squeezes video or audio into a format.
libx264makes H.264 video, which plays almost everywhere.aacmakes the matching audio. - CRF
- A quality dial for H.264. Lower numbers mean better quality and bigger files. 23 is the encoder’s default.
- HLS and DASH
- Two ways to stream video as many small pieces, with a playlist that tells the player which piece comes next. The player can switch between a sharp version and a lighter one as your connection changes.
- Queue worker
- A background process in a Laravel app that picks up slow jobs, such as encoding, so a web request doesn’t have to wait for them.
- Signed URL
- A web address with a tamper-proof signature. Change one character and the server refuses it.
Here’s a picture of the idea. It’s my own analogy, not from the sources. FFmpeg is a workshop full of machines. The package used to be a foreman who translated your wishes into the workshop’s language through an interpreter, PHP-FFMpeg. Version 9 sacks the interpreter and has the foreman speak the workshop’s language directly.
What changed and why
Until now the package wrapped PHP-FFMpeg, a general PHP library for FFmpeg. Version 9’s upgrade guide says it replaces PHP-FFMpeg with Laravel’s Process, Storage and Http components, and that the old builders, format objects, driver forwarding and filter factories are gone. Composer no longer installs php-ffmpeg/php-ffmpeg unless your app asks for it directly.

The day-to-day change is the code you write. In version 8 you built a format object and chained a filter. In version 9 you name the encoder and pass settings as plain arguments, so one chain does the same job.


The release also adds things the old stack didn’t have. The README lists a storyboard builder for scrubbing thumbnails, HLS and DASH exports, protected HLS playback with signed URLs, parallel queued exports, loudness and waveform tools, and a php artisan ffmpeg:doctor command that checks your FFmpeg build. Failures now throw a MediaException with a category such as version, encoder or input and FFmpeg’s own error output attached.
Baljet says he built it with AI help. In replies on X he said agents triaged every open issue and ran each scenario against specific FFmpeg builds in Amp’s Orbs, and that he was accepted into the Claude Open Source programme on 18 November for his Laravel packages. I haven’t audited that claim, but the patch run is consistent with fast iteration: 9.0.1 to 9.0.7 landed within about 19 hours, and the notes describe edge cases such as JPEG cover art and watermarks over 2 KB, external subtitle files in HLS renditions, odd-sized still images and very long filter graphs.
Starting from scratch with the ideal API in mind used to feel like a luxury.
Pascal Baljet on X, 26 November 2026
The package is widely used. Baljet says downloads run into the millions, and the trackers I checked list roughly 6.2 to 6.5 million, with about 1,800 GitHub stars. That is why a breaking rewrite matters: a lot of Laravel apps convert uploads with it.
How to use it, step by step
These steps assume a Laravel 13 app and a Linux or macOS machine where you can install FFmpeg. Every code block below is one I ran, except where I say otherwise.
1. Check four things first

php -v
composer show laravel/framework
ffmpeg -version
ffprobe -version
You need PHP 8.4 or later, Laravel 13.44.1 or later, and both FFmpeg programs at 9.0 or later, from the same release. Ubuntu’s own package won’t do: the one on my machine was 6.1.1, and the package refused it (see pitfalls).
2. Install the package
composer require pbmedia/laravel-ffmpeg
Run it with PHP 8.4. On my default PHP 8.3, Composer quietly installed 8.10.0, the last 8.x release, with no error. Check the installed version with composer show pbmedia/laravel-ffmpeg. On PHP 8.4 I got 9.0.7.
3. Point it at FFmpeg 9 and run the doctor
# .env
FFMPEG_BINARIES=/usr/local/bin/ffmpeg
FFPROBE_BINARIES=/usr/local/bin/ffprobe
php artisan ffmpeg:doctor --encoder=libx264 --muxer=dash --filter=scale
The command prints the versions it found and how many encoders, muxers and filters your build has, and exits with an error if something you asked for is missing. On my build it reported 9.0.2 for both programs, 229 encoders, 185 muxers and 564 filters, and one warning about my queue settings (see pitfalls). Add --json for machine-readable output.
4. Make your first encode
use ProtoneMedia\LaravelFFMpeg\Support\FFMpeg;
$result = FFMpeg::open('uploads/lesson.mp4')
->export()
->resize(width: 1280)
->video('libx264', crf: 23)
->audio('aac', bitrate: '128k')
->save('out/720p.mp4');
$result->files(); // what was written
open() reads from your default Laravel disk. Use FFMpeg::disk('uploads')->open(...) for another one, and ->toDisk('videos') before save() to write somewhere else. To see the FFmpeg command without running it, call inspect() instead of save(). Mine printed, among other flags, -c:v libx264 -crf:v 23 -pix_fmt:v yuv420p -filter:v scale=w=1280:h=-2:reset_sar=1 -c:a aac -b:a 128k -fps_mode:v passthrough. That last flag is FFmpeg 9’s replacement for the removed -vsync.
5. Other formats, progress and copying
$media = FFMpeg::open('uploads/lesson.mp4');
$media->export()
->video('libvpx-vp9', crf: 31)
->audio('libopus', bitrate: '128k')
->videoOptions(['-row-mt', '1'])
->save('out/lesson.webm');
$media->export()
->audio('libmp3lame', bitrate: '192k')
->save('out/lesson.mp3');
$media->export()
->resize(width: 640)
->video('libx264', crf: 28)
->audio('aac')
->onProgress(function ($progress) {
// $progress->percentage can be null
})
->save('out/640.mp4');
To change only the container, pass copy to both video() and audio(). I didn’t run that one. The progress callback fired eight times on my 12-second clip, and the last call’s percentage was null, so don’t assume a number.
6. Thumbnails, a storyboard and a GIF
$media->storyboard(every: 3, columns: 2, rows: 2)
->resize(width: 160)
->vtt('out/cues/lesson.vtt')
->save('out/sheets/lesson-%03d.jpg');
$media->gif(width: 480, frameRate: 12)
->clip(4, duration: 3)
->save('out/clip.gif');
A storyboard is a sheet of small frames plus a text file that tells a video player which frame to show as you drag along the timeline. Mine produced one 2 by 2 sheet and a four-cue file, three seconds apart.
7. Stream with HLS, or DASH
use ProtoneMedia\LaravelFFMpeg\HlsVariant;
$result = FFMpeg::open('uploads/lesson.mp4')
->hls(segmentDuration: 4)
->variant('360p', fn (HlsVariant $v) => $v
->resize(height: 360)
->video('libx264', bitrate: '800k'))
->variant('720p', fn (HlsVariant $v) => $v
->resize(height: 720)
->video('libx264', bitrate: '2500k'))
->save('streams/lesson/master.m3u8');
Note that hls() hangs off the opened media, not off export(). I got that wrong the first time. The run wrote nine files: a master playlist, a playlist and three segments for each size. The master listed both sizes with RESOLUTION and CODECS attributes, which is what players read to choose a version.
$result = FFMpeg::open('uploads/lesson.mp4')
->dash(segmentDuration: 2)
->adaptationSet('picture', 'video')
->adaptationSet('sound', 'audio')
->representation('low', 'picture', fn ($v) => $v
->map('0:v:0')->resize(width: 640)->video(bitrate: '800k'))
->representation('high', 'picture', fn ($v) => $v
->map('0:v:0')->video(bitrate: '2500k'))
->representation('audio', 'sound', fn ($a) => $a
->map('0:a:0')->audio(bitrate: '128k'))
->sharedHls()
->toDisk('streams')
->save('dash/manifest.mpd');
That wrote 26 files: the manifest, an HLS master that shares the same segments, and init and segment files for each representation. The README says DASH supports finite, clear H.264 or VP9 video with AAC audio, and not live streams, two-pass, encryption or DRM.
8. Encrypt the stream and protect playback
// config/filesystems.php: define 'streams' and 'secrets' disks first
$result = FFMpeg::open('uploads/lesson.mp4')
->hls(segmentDuration: 4)
->variant('360p', fn (HlsVariant $v) => $v
->resize(height: 360)
->video('libx264', bitrate: '800k'))
->encrypt('secrets',
fn (string $keyPath) => 'https://example.test/keys/'.basename($keyPath),
rotateEvery: 3, directory: 'lessons/42/keys')
->toDisk('streams')
->save('lessons/42/master.m3u8');
$lesson->hls_playback = $result->playback()->toArray();
$lesson->save();
The segment playlist then carried #EXT-X-KEY:METHOD=AES-128 lines pointing at my key URL. My key URL was a placeholder. In a real app the callback should return a route that serves the key only to people allowed to watch.
// AppServiceProvider::boot()
Route::model('lesson', Lesson::class);
Hls::define('lesson',
resolve: fn (Lesson $lesson) => HlsPresentation::fromArray($lesson->hls_playback),
authorize: fn (Lesson $lesson) => Gate::authorize('view', $lesson),
);
// routes/web.php
Hls::routes('/lessons/{lesson}/hls', name: 'lessons.hls', playback: 'lesson');
// in a controller that has already authorised the user
$url = Hls::url('lessons.hls', ['lesson' => $lesson], expires: now()->addMinutes(10));

I tested this with the route’s middleware set to ['web'], so the signed link alone was the credential, and my own gate and model binding. The entry URL returned 200 with the HLS content type, the child playlist it pointed to returned 200, and the same URL with its signature altered returned 403. The README’s default is the web and auth middleware, and it warns that a guest hitting that default gets a 500 unless your app defines a login route. I didn’t reproduce that. This is access control around video, not DRM: anyone allowed to watch can still save the stream.
9. Move encoding to the queue, in parallel
FFMpeg::open('uploads/lesson.mp4')
->hls(segmentDuration: 4)
->variant('360p', fn (HlsVariant $v) => $v
->resize(height: 360)->video('libx264', bitrate: '800k'))
->variant('720p', fn (HlsVariant $v) => $v
->resize(height: 720)->video('libx264', bitrate: '2500k'))
->toDisk('streams')
->queued(queue: 'conversions', parallel: true)
->save('queued/master.m3u8');

With parallel: true, each variant is a job in a Laravel batch, so your queue needs the batch tables and every worker needs the same disks, binaries and app key. On the database queue, one worker ran four jobs with none failed: a batch job, one job per variant and a finalizer. The finished master was not at the path I asked for. It was queued/master.<version>.m3u8, and the README says to read the real path from the QueuedExportCompleted event. My listener ran in the dispatching process, not the worker, so I didn’t capture that event.

10. Optional: let your AI coding tool learn the package
The package ships guidelines and a developing-laravel-ffmpeg skill for Laravel Boost. Install Boost, run php artisan boost:install in a terminal, and later php artisan boost:update --discover. I didn’t run Boost.
I ran it
I ran everything on Laravel 13.44.1 and PHP 8.4 with Laravel FFmpeg 9.0.7. For FFmpeg I used a public static build from the BtbN project, a development snapshot built on 26 November whose version string is n9.0.2-982-g836df4e858-20261126. The package’s check read that as 9.0.2 and accepted it. The input was a 12-second, 1080p test-pattern clip with a sine tone, 9.3 MB. A test pattern isn’t real footage, so treat the sizes and times as a sanity check, not a benchmark.
| Step | What happened |
|---|---|
| ffmpeg:doctor | Passed, 9.0.2 for both programs, one queue warning |
| 720p MP4 | 1280 by 720 H.264, 2.5 MB, 3.3 s |
| WebM, VP9 and Opus | Worked, 10.5 MB, 45 s, by far the slowest step |
| MP3 | Worked, 290 KB, 0.2 s |
| Progress and inspect() | Eight callbacks, last percentage null; command printed |
| Storyboard and GIF | One sheet and four cues; a 480 px, 3-second GIF of 481 KB |
| HLS, two sizes | Nine files, master with resolution and codecs |
| Encrypted HLS | Worked once the disks existed, AES-128 key lines in the playlist |
| DASH with shared HLS | 26 files |
| Parallel queued HLS | Four jobs, none failed, versioned master name |
| Signed playback | Entry 200, child playlist 200, altered signature 403 |
What I did not run: FFmpeg 9.1 or any tagged FFmpeg release, GPU encoders, live HLS, watermarks (they need intervention/image 4.2), concatenation, loudness and audio mixing, S3 or other cloud disks, playback in a real video player, and the Boost skill. I also didn’t time version 8, so I can’t say whether version 9 is faster.
Pitfalls
- Old FFmpeg is refused. With Ubuntu’s packaged build,
ffmpeg:doctorexited 1 with “FFmpeg 9.0 or later is required, but the configured binary reports version [6.1.1-3ubuntu5].” SettingFFMPEG_VERIFY_VERSION=falseskips the check, but the README says only releases the check accepts are supported. - Composer can hand you version 8. On PHP 8.3 it installed 8.10.0 without complaint.
- Quality and size change on upgrade. Per the upgrade guide, version 8’s X264 format encoded in two passes at 1,000 kb/s video and 128 kb/s audio. Version 9’s
video('libx264')is one pass at CRF 23. To match the old behaviour, pass both bitrates and calltwoPass(). - A vague error for a missing disk. My first encrypted run failed with “Cannot publish the media output.” I hadn’t defined the
secretsdisk. After I added that and astreamsdisk it passed. I changed both at once, so the secrets disk is the likelier cause, not a proven one. - Method placement.
hls()anddash()come from the opened media, andadaptationSet()takes a name and a type, not a closure. Both of those were my mistakes, and one run showed a clear TypeError for the second. - Queue timing. The doctor warned that my database queue’s
retry_afterof 90 seconds must exceed the job timeout of 3,630. If it doesn’t, a long encode can be picked up twice. - No command log. Version 9 logs no FFmpeg commands. Record
inspect()output beforesave(), or read$result->processes()afterwards. - Treat uploads as hostile. This one is my advice, not the package’s. A security news site, BeyondMachines, reported on 25 November that FFmpeg 9.1 fixed 12 memory-corruption flaws present in every earlier version, which includes the 9.0.2 that the package’s tests use. Keep FFmpeg patched and run encodes on workers with few privileges.
Upgrading from version 8
My view: new projects on PHP 8.4 and Laravel 13.44.1 should start on version 9. If you’re on version 8 and it works, there’s no rush. 8.10.0 arrived on 21 November, and the version 8 docs stay on the 8.x branch. The upgrade guide rates the work as breaking, with high impact on opening media, format objects, filters and clipping, and HLS.
| Version 8 | Version 9 |
|---|---|
fromDisk('uploads') | disk('uploads') |
inFormat(new X264) | video('libx264', bitrate: '1000k')->audio('aac', bitrate: '128k')->twoPass() |
new Mp3 | audio('libmp3lame', bitrate: '128k') |
new CopyFormat | video('copy')->audio('copy') |
each([1, 4, 7], ...) | A plain foreach over one opened media |
log_channel config | Removed; no commands are logged |
Watermark images via spatie/image | intervention/image 4.2 or later |
The wider picture
FFmpeg itself moved quickly. FFmpeg 9.0 “Lei” arrived in August, and FFmpeg 9.1 “Gauss” was released on 20 November as source code. A transcoding vendor’s blog says FFmpeg 9 hard-removed options such as -vsync, -top, -qphist and -filter_complex_script, which is the sort of change that breaks hand-written command strings. The package’s inspect() output already uses the newer -fps_mode.
| Option | What it is | Source |
|---|---|---|
| Laravel FFmpeg 9 | Laravel-native, Process-based, FFmpeg 9 or later only | README, upgrade guide |
| Laravel FFmpeg 8.x | Wraps PHP-FFMpeg; latest 8.10.0 | GitHub releases |
| PHP-FFMpeg | Framework-neutral library; v1.4.0 in January added PHP 8.5, released by Baljet; about 5,000 stars | GitHub |
| Calling ffmpeg yourself | Full control, and you own every flag across FFmpeg upgrades | Vendor blog, 11 November |
| Hosted transcoding API | Someone else runs FFmpeg; one vendor says a token buys 10 seconds of input video | That vendor’s blog, 1 November |
Baljet is busy elsewhere too. On 24 November he released Inertia Notifications, a free MIT package from his Inertia UI line, and he says he is rethinking pricing for his other packages.
What isn’t known
- Whether FFmpeg 9.1 works. The version check says 9.0 or later, the package’s tests use 9.0.2, and I haven’t run 9.1.
- How version 9 compares with version 8 on speed or file size on real footage. I measured neither.
- Whether anyone runs version 9 in production yet. The download counts I found belong to version 8.
- How much the AI-assisted triage shaped the release. That account is Baljet’s, and I haven’t checked it.
- The exact release date. His blog post is dated 25 November, GitHub shows 19:55 UTC that day, and his X post is dated 26 November.
Sources: Pascal Baljet’s blog post and X posts (25 and 26 November 2026); the Laravel FFmpeg 9.x README, UPGRADE.md, composer.json and release notes; Packagist and GitHub release pages; ffmpeg.org download and security pages; 9to5Linux and Phoronix on FFmpeg 9.1; BeyondMachines (25 November 2026); FFmpeg Micro’s blog (1 and 11 November 2026); the PHP-FFMpeg GitHub releases. Tests were run on 27 November 2026 NZ time.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.





