PHPackages                             micilini/video-stream - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. micilini/video-stream

ActiveLibrary[Caching](/categories/caching)

micilini/video-stream
=====================

PHP video streaming library with HTTP Range support and optional disk cache. Works standalone or with Laravel.

v3.4.0(1mo ago)7813MITPHPPHP ^8.2CI passing

Since Nov 16Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/micilini/video-stream)[ Packagist](https://packagist.org/packages/micilini/video-stream)[ RSS](/packages/micilini-video-stream/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

🎬 VideoStream
=============

[](#-videostream)

**PHP video streaming library with HTTP Range support, disk cache, events, temporary tokens, rate limiting, subtitles, and Laravel integration.**

Works standalone (plain PHP) or with Laravel 10/11/12/13+.

[![PHP](https://camo.githubusercontent.com/20a2021ea5fb5b87dacdf4e654482fc19f9c220c63ccdd88d3e2828bae9f18b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d3838393242463f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/)[![Laravel](https://camo.githubusercontent.com/b580304e8de350d7c441b14e1ce16320d662ed65153e5e5b4990eae4de643f6d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532302537432532303131253230253743253230313225323025374325323031332d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com/)[![License](https://camo.githubusercontent.com/422db9fd40f5831c765cf6530b6750c081b696bd18d904cf89554df98c676277/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e3f7374796c653d666c61742d737175617265)](LICENSE)[![Tests](https://camo.githubusercontent.com/013d8504eec791bb08d3e86ddfb20daad2427f00d4840f38bee9a6fdfa33c8d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6963696c696e692f766964656f2d73747265616d2f74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/micilini/video-stream/actions)[![Packagist](https://camo.githubusercontent.com/ad9a771167e5cbe209f2ff95cd0271c1f539ce19e8090cc958ee7e03aae1da46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6963696c696e692f766964656f2d73747265616d3f7374796c653d666c61742d737175617265266c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/micilini/video-stream)

---

 [![Example Usage](screenshoots/image.png)](screenshoots/image.png)
*Example of usage*

Features
--------

[](#features)

- **Local streaming** — stream local video files with proper HTTP Range support
- **Remote streaming** — proxy remote video URLs with native Range passthrough
- **Disk cache** — optional file-based cache for remote videos with TTL, LRU eviction, and stale fallback
- **HTTP Range Requests** — seek, scrub, and resume support for HTML5 players
- **Events / hooks** — listen to the streaming lifecycle in plain PHP or Laravel
- **Temporary tokens** — protect streams with signed, expiring tokens
- **Rate limiting** — limit concurrent streams and requests per minute by IP
- **Subtitles** — serve `.vtt` / `.srt` subtitles and associate subtitle tracks with videos
- **Laravel integration** — Service Provider, Facade, publishable config, and Artisan commands
- **Framework agnostic** — works with Laravel, Symfony, Slim, CodeIgniter, or plain PHP
- **Zero required third-party packages in the core** — the main library relies on PHP 8.2+ and `ext-curl`

---

Installation
------------

[](#installation)

```
composer require micilini/video-stream
```

### Requirements

[](#requirements)

- PHP 8.2 or higher
- ext-curl

---

Quick Start
-----------

[](#quick-start)

### Plain PHP

[](#plain-php)

```
