foxws/laravel-streamer
| Install | |
|---|---|
composer require foxws/laravel-streamer |
|
| Latest Version: | 3.0.0 |
| PHP: | ^8.4 |
| License: | MIT |
| Last Updated: | Oct 7, 2026 |
| Links: | GitHub · Packagist |
Laravel Streamer
Encode video into several qualities and package it into HLS and DASH with Shaka Streamer, on top of 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.4 or higher
- Shaka Streamer, with FFmpeg and Shaka Packager
Installation
composer require foxws/laravel-streamer
Install Shaka Streamer with its bundled FFmpeg and Shaka Packager, then check the setup:
pip install shaka-streamer shaka-streamer-binaries
php artisan media:info
See Installation to use your own FFmpeg and Shaka Packager instead.
Quick start
use Foxws\Media\Facades\Media;
$result = Media::fromDisk('media')
->open('videos/clip.mp4')
->streamer()
->addStreamsFrom()
->withResolutions('1080p', '720p', '480p')
->withHlsPlaylist()
->withDashManifest()
->toDisk('s3')
->save('streams/clip');
This encodes three qualities, writes one set of segments with both an HLS playlist and a DASH manifest, and uploads them to streams/clip on the s3 disk. Run it in a queued job: encoding takes a while.
Serve private streams with laravel-media's signed playlists:
return Media::fromDisk('s3')->open('streams/clip/master.m3u8')
->hlsPlaylist()
->resolveMediaUrlsUsing(fn (string $path) => Storage::disk('s3')->temporaryUrl($path, now()->addHour()))
->toResponse($request);
Testing
composer test
Links
Credits
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
Larupload is a ORM based file uploader for laravel to upload image, video, audio...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.0.0 | ^8.4 | ^13.0 | MIT | |
| 2.4.0 | ^8.3 | ^12.0| | MIT | |
| 2.3.1 | ^8.3 | ^12.0| | MIT | |
| 2.3.0 | ^8.3 | ^12.0| | MIT | |
| 2.2.0 | ^8.3 | ^12.0| | MIT | |
| 2.1.1 | ^8.3 | ^12.0| | MIT | |
| 2.1.0 | ^8.3 | ^12.0| | MIT | |
| 2.0.0 | ^8.3 | ^12.0| | MIT | |
| 1.8.0 | ^8.3 | ^12.0| | MIT | |
| 1.7.0 | ^8.3 | ^12.0| | MIT | |
| 1.6.0 | ^8.3 | ^12.0| | MIT | |
| 1.5.0 | ^8.3 | ^11.0 | | MIT | |
| 1.4.0 | ^8.3 | ^11.0 | | MIT | |
| 1.3.0 | ^8.3 | ^11.0 | | MIT | |
| 1.2.0 | ^8.3 | ^11.0 | | MIT | |
| 1.1.0 | ^8.3 | ^11.0 | | MIT | |
| 1.0.0 | ^8.3 | ^11.0 | | MIT | |
| 0.9.0 | ^8.3 | ^11.0 | | MIT | |
| 0.8.0 | ^8.3 | ^11.0 | | MIT | |
| 0.7.0 | ^8.3 | ^11.0 | | MIT | |
| 0.6.0 | ^8.3 | ^11.0 | | MIT | |
| 0.5.0 | ^8.3 | ^11.0 | | MIT | |
| 0.4.0 | ^8.3 | ^11.0 | | MIT | |
| 0.3.0 | ^8.3 | ^11.0 | | MIT | |
| 0.2.0 | ^8.3 | ^11.0 | | MIT | |
| 0.1.0 | ^8.3 | ^11.0 | | MIT |