danog / php-rtc-vpx
Lazy libvpx FFI bindings for VP8/VP9 encoding and decoding. MadelineProto's PHP 8.2+ fork keeps FFI optional within the modular danog/php-rtc stack.
Fund package maintenance!
Requires
- php: ^8.2
- danog/php-rtc-exception: ^1.0
- danog/php-rtc-mixin: ^1.0
Requires (Dev)
- phpunit/phpunit: ^11.3
Suggests
- ext-ffi: Install the FFI extension and libvpx to encode or decode VP8; not required to packetize already-encoded VP8
README
Deprecation Notice: This library will be replaced with the AV library in a future update.
A PHP wrapper around the libvpx codec using FFI, providing tools for encoding and decoding VP8/VP9 video streams for WebRTC applications.
About this fork
This is the danog/php-rtc-vpx fork used by MadelineProto. It targets PHP 8.2+, exposes both VP8 and VP9 libvpx interfaces, validates the native library before publishing the binding, and keeps FFI optional when the application only packetizes already-encoded video.
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
- VP8 and VP9 video codec support
- Encode raw YUV frames to VPX
- Decode VPX streams to raw frames
- FFI bindings to libvpx
Requirements
- PHP ≥ 8.2
- FFI and libvpx only when encoding or decoding video
- Linux environment (Windows/macOS support planned)
Documentation
This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit:
Credits
Authors
-
Amin Yazdanpanah
- Website: aminyazdanpanah.com
- Email: github@aminyazdanpanah.com
-
Sana Moniri
Reporting Issues
Found a bug? Please report it on our issues.
License
BSD 3-Clause License. See LICENSE for details.