danog/php-rtc-rtp

RTP packet and media transport handling for PHP, ported to Amp v3. MadelineProto's PHP 8.2+ fork supports optional media FFI in the modular danog/php-rtc stack.

Maintainers

Package info

github.com/danog/php-rtc-rtp

pkg:composer/danog/php-rtc-rtp

Transparency log

Fund package maintenance!

php-webrtc

Statistics

Installs: 40

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.5 2026-08-27 13:58 UTC

This package is auto-updated.

Last update: 2026-08-27 18:51:19 UTC


README

PHP Version License

A PHP library for handling RTP (Real-time Transport Protocol) packets. This package provides tools for encoding, decoding, parsing, and analyzing RTP streams—useful for WebRTC, VoIP, and media streaming applications.

About this fork

This is the danog/php-rtc-rtp fork used by MadelineProto. It targets PHP 8.2+, ports media scheduling from ReactPHP promises to Amp v3 fibers and Revolt timers, avoids busy-loop polling, and reports voice activity through the negotiated RTP audio-level extension. Already-encoded media can be packetized without FFI.

All internal Composer dependencies use their danog/php-rtc-* package names directly, so installing a component selects the maintained danog packages throughout the dependency graph.

Features

  • Encode and decode RTP packets
  • Extract RTP header fields
  • Support for common RTP payload types

Requirements

  • PHP ≥ 8.2
  • FFI and native codec libraries only when encoding, decoding, or transcoding media
  • Linux (Windows and macOS support planned for future releases)
  • FFmpeg/libav shared libraries (libavcodec, libavfilter, etc.)
    • Compatible with FFmpeg version 7.1.1
  • libopus development libraries
  • libvpx development libraries
    • Compatible with libvpx version 1.15.0

Documentation

This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit:

PHP WebRTC Documentation

Credits

Authors

Reporting Issues

Found a bug? Please report it on our issues.

License

BSD 3-Clause License. See LICENSE for details.

References