PHPackages                             chrisyue/mala - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. chrisyue/mala

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chrisyue/mala
=============

Transform your m3u8 videos into a http live streaming channel

1.0.2(10y ago)62215MITPHPPHP &gt;=5.3.9

Since Mar 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/chrisyue/mala)[ Packagist](https://packagist.org/packages/chrisyue/mala)[ Docs](http://chrisyue.com)[ RSS](/packages/chrisyue-mala/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Mala
====

[](#mala)

v1.0.2

Transform your m3u8 videos into a http live streaming channel

[![SensioLabsInsight](https://camo.githubusercontent.com/543f700ad55bc22e6526d186264e3259061552afc043f0ab69be51942920a0a8/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f66326434386462642d326139632d343265622d393465652d6130393766623739653166362f6269672e706e67)](https://insight.sensiolabs.com/projects/f2d48dbd-2a9c-42eb-94ee-a097fb79e1f6)

[![Latest Stable Version](https://camo.githubusercontent.com/af41fc47527b539670cac7286043b9395cfe56a0a4caae495ef7754c083328e5/68747470733a2f2f706f7365722e707567782e6f72672f63687269737975652f6d616c612f762f737461626c65)](https://packagist.org/packages/chrisyue/mala)[![License](https://camo.githubusercontent.com/3a9b845dcd30b01d1708dd8bcf0ac03fa1cf778c1ed3fde8d30d37799d44886c/68747470733a2f2f706f7365722e707567782e6f72672f63687269737975652f6d616c612f6c6963656e7365)](https://packagist.org/packages/chrisyue/mala)[![Build Status](https://camo.githubusercontent.com/25c23d1264e927b520c1af54f5339ccfa63915df332697671a8e32827ca83e6d/68747470733a2f2f7472617669732d63692e6f72672f63687269737975652f6d616c612e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/chrisyue/mala)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0c0f740897f8e29c143acf865584d4fbfaae8d69fb4f0eb832ad0a99a7900ab7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f63687269737975652f6d616c612f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/chrisyue/mala/?branch=develop)[![Code Coverage](https://camo.githubusercontent.com/2040279e0c3927915c78dc0a8a614ee800cc3f2a8d0a5b41af7bf8e8f9460abb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f63687269737975652f6d616c612f6261646765732f636f7665726167652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/chrisyue/mala/?branch=develop)[![StyleCI](https://camo.githubusercontent.com/27227ca1f56eb4a1829951c50344fface4d548df4d01f847555b79a331fe674c/68747470733a2f2f7374796c6563692e696f2f7265706f732f35323235373630302f736869656c64)](https://styleci.io/repos/52257600)

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

[](#installation)

```
$ composer require 'chrisyue/mala'

```

Usage
-----

[](#usage)

I suggest you check the [mala-demo](https://github.com/chrisyue/mala-demo) to see more details.

Suppose you've already implemented all interfaces under `Model` and `Manager` namespaces, then you can

### Generate EPG with m3u8 videos and generate hls playlist (scheduled media segments)

[](#generate-epg-with-m3u8-videos-and-generate-hls-playlist-scheduled-media-segments)

```
// $epgManager = Chrisyue\Mala\Manager\EpgManagerInterface;
// $videoManager = Chrisyue\Mala\Manager\VideoManagerInterface;
$epgScheduler = new \Chrisyue\Mala\EpgScheduler($epgManager, $videoManager);

// $channel = Chrisyue\Mala\Model\ChannelInterface;

// generate tomorrow's epg
$epgScheduler->schedule($channel, new \DateTime('tomorror midnight'), new \DateTime('tomorrow 23:59:59'));

// generate playlist
// $mediaSegmentManager = ...;
$parser = new \Chrisyue\PhpM3u8\Parser();
$playlistScheduler = new \Chrisyue\Mala\PlaylistScheduler($parser, $epgManager, $mediaSegmentManager);
$playlistScheduler->schedule($channel, new \DateTime('tomorror midnight'), new \DateTime('tomorrow 23:59:59'));
```

### Generate current hls m3u8 from scheduled epg and playlist

[](#generate-current-hls-m3u8-from-scheduled-epg-and-playlist)

```
// $mediaSegmentManager = ...;
$options = ['target_duration' => 10, 'version' => 3];
$m3u8Generator = new M3u8Generator($mediaSegmentManager, $options);

// $channel = ...;
$m3u8 = $m3u8Generator->generate($channel[, $playsAt]); // or can you specify the play time as the 2nd parameter

// $dumper = ...;
$dumper->dump($m3u8);
```

You can check the [mala-demo](https://github.com/chrisyue/mala-demo) to get more details and examples about implementing the model/manager interfaces

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Every ~1 days

Total

3

Last Release

3702d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/866a89d263a74e8cb113cdb20fa90999b0340dbbddbf20503ec424c3c263369b?d=identicon)[chrisyue](/maintainers/chrisyue)

---

Tags

epghlsm3um3u8m3u8-videosphpplaylisthlsm3u8

### Embed Badge

![Health badge](/badges/chrisyue-mala/health.svg)

```
[![Health](https://phpackages.com/badges/chrisyue-mala/health.svg)](https://phpackages.com/packages/chrisyue-mala)
```

###  Alternatives

[aminyazdanpanah/php-ffmpeg-video-streaming

📼 PHP FFMpeg - Video Streaming - DASH, HLS http://video.aminyazdanpanah.com

542275.0k8](/packages/aminyazdanpanah-php-ffmpeg-video-streaming)[mostafaznv/larupload

Larupload is a ORM based file uploader for laravel to upload image, video, audio and other known files.

73403.7k3](/packages/mostafaznv-larupload)[bitmovin/bitmovin-php

PHP-Client which enables you to seamlessly integrate the Bitmovin API into your existing projects

2058.7k](/packages/bitmovin-bitmovin-php)[mehrdad-dadkhah/hls-video-generater

PHP library for generating video m3u8 playlist

241.4k](/packages/mehrdad-dadkhah-hls-video-generater)

PHPackages © 2026

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