PHPackages                             chrisyue/php-m3u8 - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. chrisyue/php-m3u8

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

chrisyue/php-m3u8
=================

PHP M3U8 parser / dumper

4.0.3(3y ago)158363.8k↓13.5%383MITPHPPHP &gt;=7.4

Since Mar 12Pushed 3y ago9 watchersCompare

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

READMEChangelogDependencies (2)Versions (37)Used By (3)

PHP M3u8
========

[](#php-m3u8)

[![Latest Stable Version](https://camo.githubusercontent.com/2cc80b394c131ee634a1790b77af4de832fde4294d7c47fd0e3d855ed4210b5b/68747470733a2f2f706f7365722e707567782e6f72672f63687269737975652f7068702d6d3375382f762f737461626c65)](https://packagist.org/packages/chrisyue/php-m3u8)[![License](https://camo.githubusercontent.com/4ebef27055e03e144732043b43df712fe60267f3e260051c1728d902a4887ff6/68747470733a2f2f706f7365722e707567782e6f72672f63687269737975652f7068702d6d3375382f6c6963656e7365)](https://packagist.org/packages/chrisyue/php-m3u8)[![CI Status](https://github.com/chrisyue/php-m3u8/actions/workflows/ci.yaml/badge.svg)](https://github.com/chrisyue/php-m3u8/actions)[![Total Downloads](https://camo.githubusercontent.com/27584da94d2823a3bbef20a651fd14521e3efbd53e62fe14e6a86b012d654b13/68747470733a2f2f706f7365722e707567782e6f72672f63687269737975652f7068702d6d3375382f646f776e6c6f616473)](https://packagist.org/packages/chrisyue/php-m3u8)[![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=blizzchris@gmail.com&lc=US&item_name=Donation+for+PHP-M3U8&no_note=0&cn=&currency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted)

An M3u8 parser / dumper.

Now it fully supports for [RFC 8216](docs/supported-tags.md), and it can support for non standard M3U(8) with little effort.

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

[](#installation)

Use composer to require it:

```
composer require 'chrisyue/php-m3u8:^4' # PHP 7.4 or PHP 8.*
composer require 'chrisyue/php-m3u8:^3' # PHP 5.6 or PHP 7.{0,1,2,3}
```

Quickstart
----------

[](#quickstart)

Setup the demo project and install PHP M3U8 with it:

```
mkdir demo
cd demo
composer require 'chrisyue/php-m3u8:^4'
```

Copy the demo script file to the project root:

```
cp vendor/chrisyue/php-m3u8/demo/demo.php .
```

And run:

```
php demo.php
```

You could check the [demo file](demo/demo.php) out to find out how to use.

As a "Facade" hides too much details, if you take a look of those facade classes, you'll notice that the real parser/dumper will take a "tag definitions" and a "parsing/dumping rules" as it's dependencies. "definitions" and "rules" are actually "configuration". All these "configuration"s are written in PHP. You may want to modify those configuration files to meet your needs. For more information, see

- [How to Define A Tag](docs/how-to-define-a-tag.md)
- [How to Make A Parsing/Dumping Rule](docs/how-to-make-a-parsing-dumping-rule.md)

Donation
--------

[](#donation)

Thanks for your support :)

[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=blizzchris@gmail.com&lc=US&item_name=Donation+for+PHP-M3U8&no_note=0&cn=&currency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted)

[![Wechat Donation](https://camo.githubusercontent.com/f2ea5011ff156624843d9400a1f6a0c5ccaeb61d9e74f97a3ecff9eb342f077e/68747470733a2f2f7777772e63687269737975652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f30382f77782d7265776172642d636f64652e6a7067)](https://camo.githubusercontent.com/f2ea5011ff156624843d9400a1f6a0c5ccaeb61d9e74f97a3ecff9eb342f077e/68747470733a2f2f7777772e63687269737975652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f30382f77782d7265776172642d636f64652e6a7067)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity53

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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

Every ~66 days

Recently: every ~24 days

Total

35

Last Release

1456d ago

Major Versions

1.6.0 → 2.0.02017-06-24

2.3.2 → 3.0.02018-09-24

3.4.3 → 4.0.02022-02-18

PHP version history (4 changes)1.0.0PHP &gt;=5.3.9

2.1.0PHP &gt;=5.4.0

3.0.2PHP &gt;=5.5

4.0.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![chrisyue](https://avatars.githubusercontent.com/u/129517?v=4)](https://github.com/chrisyue "chrisyue (16 commits)")[![JungleGenius](https://avatars.githubusercontent.com/u/11284739?v=4)](https://github.com/JungleGenius "JungleGenius (1 commits)")[![m1ch0pv](https://avatars.githubusercontent.com/u/1401050?v=4)](https://github.com/m1ch0pv "m1ch0pv (1 commits)")

---

Tags

dumperm3u8m3u8-parserparserphp-m3u8parserdumperm3u8

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M732](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k404.0M702](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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