2017 © Pedro Peláez
 

library mala

Transform your m3u8 videos into a http live streaming channel

image

chrisyue/mala

Transform your m3u8 videos into a http live streaming channel

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Mala

v1.0.2, (*1)

Transform your m3u8 videos into a http live streaming channel, (*2)

SensioLabsInsight, (*3)

Latest Stable Version License Build Status Scrutinizer Code Quality Code Coverage StyleCI, (*4)

Installation

$ composer require 'chrisyue/mala'

Usage

I suggest you check the mala-demo to see more details., (*5)

Suppose you've already implemented all interfaces under Model and Manager namespaces, then you can, (*6)

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

// $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 to get more details and examples about implementing the model/manager interfaces, (*7)

The Versions

20/03 2016

dev-develop

dev-develop http://chrisyue.com

Transform your m3u8 videos into a http live streaming channel

  Sources   Download

MIT

The Requires

 

The Development Requires

hls m3u8

20/03 2016

dev-master

9999999-dev http://chrisyue.com

Transform your m3u8 videos into a http live streaming channel

  Sources   Download

MIT

The Requires

 

The Development Requires

hls m3u8

20/03 2016

1.0.2

1.0.2.0 http://chrisyue.com

Transform your m3u8 videos into a http live streaming channel

  Sources   Download

MIT

The Requires

 

The Development Requires

hls m3u8

18/03 2016

1.0.1

1.0.1.0 http://chrisyue.com

Transform your m3u8 videos into a http live streaming channel

  Sources   Download

MIT

The Requires

 

The Development Requires

hls m3u8

18/03 2016

1.0.0

1.0.0.0 http://chrisyue.com

Transform your m3u8 videos into a http live streaming channel

  Sources   Download

MIT

The Requires

 

The Development Requires

hls m3u8