PHPackages                             phpbg/mpegts - 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. phpbg/mpegts

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

phpbg/mpegts
============

This is a pure PHP MPEG TS library, developed with performance in mind

0.2.0(7y ago)51.6k31MITPHPPHP &gt;=7.0

Since Sep 16Pushed 7y ago3 watchersCompare

[ Source](https://github.com/phpbg/mpegts)[ Packagist](https://packagist.org/packages/phpbg/mpegts)[ RSS](/packages/phpbg-mpegts/feed)WikiDiscussions master Synced 2mo ago

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

PhpBg\\MPEGTS
=============

[](#phpbgmpegts)

This is a pure PHP MPEG TS library, developed with performance in mind.

It provides tools for :

- Finding MPEG TS packets
- Converting MPEG TS packets to PES packets
- Filtering MPEG TS packets by PID

[https://en.wikipedia.org/wiki/MPEG\_transport\_stream](https://en.wikipedia.org/wiki/MPEG_transport_stream)

Requirements
============

[](#requirements)

- PHP7+

Installation on ubuntu 16.04:

```
sudo apt install php7.0-cli

```

Additional you can install xdebug for development purposes:

```
sudo apt install php-xdebug

```

Examples
========

[](#examples)

See `examples/` folder

Tests
=====

[](#tests)

To run unit tests launch:

```
php vendor/phpunit/phpunit/phpunit -c phpunit.xml

```

NB: to report code coverage add `--coverage-text` but keep in mind that launching with code coverage increase greatly the time required for tests to run (thus do not reflect real use case compute time)

Memo for creating TS sample files
---------------------------------

[](#memo-for-creating-ts-sample-files)

1. Open a TS file with wireshark
2. Export a PCAP file containing only required packets
3. `tshark -x -r test.pcap | sed -n 's/^[0-9a-f]*\s\(\(\s[0-9a-f][0-9a-f]\)\{1,16\}\).*$/\1/p' > test.hex`
4. `xxd -r -p test.hex test.bin`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~173 days

Total

2

Last Release

2625d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1350d8c1326e5a10ff142b33e9d7ad6363acc427900a9a581cc9fa76329c31b0?d=identicon)[Samuel CHEMLA](/maintainers/Samuel%20CHEMLA)

---

Top Contributors

[![phpbg](https://avatars.githubusercontent.com/u/43315561?v=4)](https://github.com/phpbg "phpbg (2 commits)")

---

Tags

mpeg-tsparserphpmpegmpegtsdvb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpbg-mpegts/health.svg)

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

###  Alternatives

[paquettg/php-html-parser

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

2.4k7.9M123](/packages/paquettg-php-html-parser)[json-mapper/json-mapper

Map JSON structures to PHP classes

2181.1M22](/packages/json-mapper-json-mapper)

PHPackages © 2026

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