Introduction
A Laravel integration for Google's Shaka Streamer, enabling you to package adaptive streaming content (HLS, DASH) with a fluent, Laravel-style API.
use Foxws\Streamer\Facades\Streamer;
Streamer::fromDisk('s3')
->open('videos/input.mp4')
->addVideoStream('videos/input.mp4', 'video.mp4')
->addAudioStream('videos/input.mp4', 'audio.mp4')
->withHlsMasterPlaylist('master.m3u8')
->withSegmentDuration(6)
->export()
->toDisk('export')
->save();
Features
- Fluent API — Laravel-style chainable methods for packaging media
- Filesystem Integration — Read from and write to any Laravel disk (local, S3, etc.)
- Adaptive Bitrate — Create multi-quality HLS & DASH streams
- AES Encryption — Built-in content protection with optional key rotation
- Dynamic Manifests — Rewrite HLS playlists and DASH MPDs with signed URLs at serve-time
- Events — Hooks for
StreamingStarted,StreamingCompleted, andStreamingFailed - PHP 8.3+ — Strict types, readonly properties, and modern PHP throughout
See also
- Installation — requirements and setup
- Usage — the main API walkthrough
- Quick Reference — condensed method and pattern reference
- Configuration — environment variables and config options
- AES Encryption — encryption with key rotation
- URL Resolvers — dynamic, signed URLs for HLS & DASH
- Queue Integration — processing media in background jobs
- Troubleshooting — common issues and solutions
Continue to Installation to get started.