danog / php-rtc-av
FFmpeg/libav FFI bindings for PHP media processing. MadelineProto's PHP 8.2+ fork uses lazy, optional FFI, strict ABI checks, and the modular danog/php-rtc stack.
Fund package maintenance!
Requires
- php: ^8.2
- danog/php-rtc-exception: ^1.1.5
- danog/php-rtc-mixin: ^1.1.6 || ^2.0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.9.1
- phpunit/phpunit: ^11.5 || ^12.0 || ^13.3.2
Suggests
- ext-ffi: Install the FFI extension and libavcodec/libavformat/libavfilter to transcode media; not required to mux or packetize already-encoded media
Provides
None
Conflicts
None
Replaces
None
README
PHP AV Libraries provides FFI bindings to AV libraries (including AVCodec and AVFilter) for encoding, transcoding, and manipulating audio/video streams.
About this fork
This is the danog/php-rtc-av fork used by MadelineProto. It targets PHP 8.2+, loads FFI only when transcoding is requested, and rejects FFmpeg libraries whose ABI does not match the bundled FFmpeg 9 headers. 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.
Requirements
- PHP ≥ 8.2
- FFI and matching FFmpeg 9 shared 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 9.x
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: contact@aminyazdanpanah.com
- Sana Moniri
- GitHub: sanamoniri
Reporting Issues
Found a bug? Please open an issue on our GitHub repository.
License
BSD 3-Clause License. See LICENSE for full details.