PHPackages                             juzaweb/laravel-hls-converter - 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. [Image &amp; Media](/categories/media)
4. /
5. juzaweb/laravel-hls-converter

ActiveLibrary[Image &amp; Media](/categories/media)

juzaweb/laravel-hls-converter
=============================

Convert video to HLS with optional multi-resolution support.

1.0.0(1y ago)571PHPPHP ^8.0CI passing

Since May 16Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/juzaweb/laravel-hls-converter)[ Packagist](https://packagist.org/packages/juzaweb/laravel-hls-converter)[ RSS](/packages/juzaweb-laravel-hls-converter/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Laravel HLS Converter
=====================

[](#laravel-hls-converter)

[![Tests](https://github.com/juzaweb/laravel-hls-converter/actions/workflows/run-tests.yml/badge.svg)](https://github.com/juzaweb/laravel-hls-converter/actions)[![License](https://camo.githubusercontent.com/a362a68e3541ef6fd962a10bd0714fa06a399ac487dbca89cfa7fe8762370969/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a757a617765622f6c61726176656c2d686c732d636f6e7665727465722e737667)](LICENSE)

A Laravel-friendly package to convert video files to HLS format (`.m3u8` + `.ts`), with support for multiple resolutions. Built on top of [FFMpeg](https://ffmpeg.org) and [Laravel](https://laravel.com).

---

🚀 Features
----------

[](#-features)

- Convert a video to HLS format
- Support multiple quality outputs (adaptive bitrate streaming)
- Automatically generate `master.m3u8`
- Laravel-friendly structure with job support

---

🧰 Requirements
--------------

[](#-requirements)

- PHP 8.1 or higher
- Laravel 9 / 10 / 11
- [FFmpeg](https://ffmpeg.org/) installed on the server

Install FFmpeg:

```
sudo apt-get install ffmpeg
```

📦 Installation Package
----------------------

[](#-installation-package)

```
composer require juzaweb/laravel-hls-converter
```

📝 Usage
-------

[](#-usage)

### Basic HLS Conversion

[](#basic-hls-conversion)

```
use Juzaweb\HLSConverter\HLSConverter;

$input = storage_path('app/videos/sample.mp4');
$output = storage_path('app/hls/single');

app(HLSConverter::class)->convert($input, $output);
```

### Convert with multiple resolutions

[](#convert-with-multiple-resolutions)

```
use Juzaweb\HLSConverter\HLSConverter;

$input = storage_path('app/videos/sample.mp4');
$output = storage_path('app/hls/multi');

$resolutions = [
    '360p' => ['w' => 640,  'h' => 360,  'bitrate' => '800k'],
    '480p' => ['w' => 854,  'h' => 480,  'bitrate' => '1200k'],
    '720p' => ['w' => 1280, 'h' => 720,  'bitrate' => '2500k'],
];

app(HLSConverter::class)->convert($input, $output, $resolutions);
```

This will generate:

```
output/
├── 360p/
│   ├── seg_000.ts
│   └── index.m3u8
├── 480p/
│   └── ...
├── 720p/
│   └── ...
└── master.m3u8

```

🧪 Running Tests
---------------

[](#-running-tests)

```
composer test
```

### 📁 Example Laravel Job

[](#-example-laravel-job)

```
use Juzaweb\HLSConverter\HLSConverter;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class ConvertVideoToHLSJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public $tries = 3;

    public $timeout = 120;

    public function __construct(
        protected string $input,
        protected string $output,
        protected ?array $resolutions = null
    ) {}

    public function handle()
    {
        app(HLSConverter::class)->convert($this->input, $this->output, $this->resolutions);
    }
}
```

📝 License
---------

[](#-license)

The HLS Converter is released under the [MIT License](LICENSE.md).

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

414d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3169e8a8781068840e9300a57785089da521287dbe0279fc9cc7e8de1c1d95a9?d=identicon)[juzaweb](/maintainers/juzaweb)

---

Top Contributors

[![juzaweb](https://avatars.githubusercontent.com/u/47020363?v=4)](https://github.com/juzaweb "juzaweb (7 commits)")[![AzizEmir](https://avatars.githubusercontent.com/u/101357256?v=4)](https://github.com/AzizEmir "AzizEmir (1 commits)")

---

Tags

ffmpeghlshls-live-streaminghls-streamlaravel

### Embed Badge

![Health badge](/badges/juzaweb-laravel-hls-converter/health.svg)

```
[![Health](https://phpackages.com/badges/juzaweb-laravel-hls-converter/health.svg)](https://phpackages.com/packages/juzaweb-laravel-hls-converter)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M183](/packages/intervention-image-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
