Package adaptive streaming video (HLS, DASH) with a fluent Laravel API.
Laravel Shaka connects your Laravel app to Google's Shaka Packager. It turns a video file into adaptive streaming formats — HLS and DASH — using a simple, chainable API that feels like the rest of Laravel.
use Foxws\Shaka\Facades\Shaka;
$result = Shaka::fromDisk('s3')
->open('videos/input.mp4')
->addVideoStream('videos/input.mp4', 'video_1080p.mp4', ['bandwidth' => '5000000'])
->addVideoStream('videos/input.mp4', 'video_720p.mp4', ['bandwidth' => '3000000'])
->addAudioStream('videos/input.mp4', 'audio.mp4')
->withHlsMasterPlaylist('master.m3u8')
->withSegmentDuration(6)
->export()
->toDisk('export')
->save();