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.
Requires
- php-64bit: ^8.2
- amphp/amp: ^3.1.3
- amphp/pipeline: ^1.2.7
- danog/php-rtc-codecs: ^1.1.18
- danog/php-rtc-exception: ^1.1.5
- danog/php-rtc-mixin: ^2.0
- danog/php-rtc-ntp: ^1.1.6
- danog/php-rtc-rtcp: ^1.1.4
- danog/php-rtc-rtp-parameter: ^1.1.4
- danog/php-rtc-sdp: ^1.1.6
- danog/php-rtc-stats: ^1.1.3
- ramsey/uuid: ^4.9.3
- symfony/polyfill-php83: *
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.9.1
- dg/bypass-finals: dev-master
- phpunit/phpunit: ^11.5 || ^12.0 || ^13.3.2
- symfony/phpunit-bridge: 7.3.x-dev
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- v1.0.1006
- v1.0.1005
- v1.0.1004
- v1.0.1003
- v1.0.1002
- v1.0.1001
- v1.0.1000
- v1.0.999
- v1.0.2
- v1.0.0
This package is auto-updated.
Last update: 2026-09-22 13:24:19 UTC
README
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:
Credits
Authors
-
Daniil Gentili
-
Amin Yazdanpanah
- Website: aminyazdanpanah.com
- Email: github@aminyazdanpanah.com
-
Sana Moniri
- GtiHub: sanamoniri
Reporting Issues
Found a bug? Please report it on our issues.
License
BSD 3-Clause License. See LICENSE for details.