Download the PHP package micilini/video-stream without Composer

On this page you can find all versions of the php package micilini/video-stream. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package video-stream

# 🎬 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://img.shields.io/badge/PHP-^8.2-8892BF?style=flat-square&logo=php&logoColor=white)](https://www.php.net/) [![Laravel](https://img.shields.io/badge/Laravel-10%20|%2011%20|%2012%20|%2013-FF2D20?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com/) [![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE) [![Tests](https://img.shields.io/github/actions/workflow/status/micilini/video-stream/tests.yml?branch=master&label=tests&style=flat-square)](https://github.com/micilini/video-stream/actions) [![Packagist](https://img.shields.io/packagist/dt/micilini/video-stream?style=flat-square&label=downloads)](https://packagist.org/packages/micilini/video-stream)


Example of usage

Features


Installation

Requirements


Quick Start

Plain PHP

Laravel

After installation, the Service Provider and Facade are auto-discovered.

Publish the config (optional):

Routes example:

Symfony

Other frameworks


API Overview

Main class

Fluent methods

Method Description
->local(string $path) Set a local file as the video source
->remote(string $url) Set a remote URL as the video source
->contentType(string $type) Override the Content-Type header
->buffer(int $bytes) Override the buffer size
->cacheControl(string $value) Override the Cache-Control header
->cache(...) Configure disk cache for remote videos
->on(string $event, callable $listener) Register an event listener
->withToken(...) Validate a signed token before streaming
->rateLimit(...) Limit concurrent streams and requests by IP
->subtitle(string $path) Output a subtitle file directly
->subtitles(array $tracks) Associate subtitle tracks with a video
->output() Stream directly via echo + flush
->stream() Return StreamedResponse if Symfony is available, otherwise call output()
VideoStream::generateToken(...) Generate a signed expiring token

Disk Cache

For local videos, ->cache() is ignored.

Cache behavior

Scenario Behavior
Cache hit, not expired Serve from disk immediately
Cache hit, expired, remote OK Re-download and replace cache
Cache hit, expired, remote down Serve stale cache
Cache miss, remote OK Download, cache, and serve
Cache miss, remote down Throw StreamException
Disk full LRU eviction removes the oldest files

Events / Hooks

Use events to monitor the stream lifecycle, add custom logging, or feed analytics.

Plain PHP

Available events

Laravel

In Laravel, you can bridge those hooks to framework events and listeners through the package integration layer.


Temporary Tokens

Use signed tokens to protect streaming URLs.

Generate a token

Validate before streaming

If the token is invalid or expired, the package throws an exception.


Rate Limiting

Limit the number of simultaneous streams and requests per minute for a given IP.

This is useful to reduce abuse and protect server resources without external infrastructure.


Subtitles

Output a subtitle file directly

Associate subtitles with a video

Supported subtitle scenarios:


Example Demo

The repository includes a runnable example application under the example/ directory.

Suggested structure:

Notes


Laravel Configuration

After publishing the config:

A typical config/video-stream.php may include:

Example .env

Artisan commands


Project Structure


Testing

The test suite should cover:


Upgrade Notes

If you removed the legacy v1-style API in the new major version, document that change in an UPGRADE.md file and keep the README focused on the fluent API only.


Contributing

Pull requests are welcome. For major changes, open an issue first so the scope can be discussed before implementation.


License

MIT


Made with ☕ by [Micilini](https://github.com/micilini)

All versions of video-stream with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package micilini/video-stream contains the following files

Loading the files please wait ...