https://github.com/deep-neural/libmediartp
pure C/C++ implementation for RTP packet processing
https://github.com/deep-neural/libmediartp
av1 cpp cross-platform hevc quic rtp webrtc
Last synced: about 2 months ago
JSON representation
pure C/C++ implementation for RTP packet processing
- Host: GitHub
- URL: https://github.com/deep-neural/libmediartp
- Owner: deep-neural
- License: mit
- Created: 2025-04-02T01:29:57.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T02:14:25.000Z (about 2 months ago)
- Last Synced: 2025-04-02T03:18:56.284Z (about 2 months ago)
- Topics: av1, cpp, cross-platform, hevc, quic, rtp, webrtc
- Language: C++
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
libMediaRTP
A pure C/C++ implementation for building media streams and RTP packet processing
### New Release
libmediartp v1.0.0 has been released! See the [release notes](https://github.com/libmediartp/libmediartp/wiki/[email protected]) to learn about new features, enhancements, and breaking changes.
If you aren't ready to upgrade yet, check the [tags](https://github.com/libmediartp/libmediartp/tags) for previous stable releases.
We appreciate your feedback! Feel free to open GitHub issues or submit changes to stay updated in development and connect with the maintainers.
-----
### Usage
libmediartp is distributed as a pure C/C++ library. To integrate it into your project, ensure you have a compatible C/C++ compiler and the necessary build tools (e.g., Make, CMake). Clone the repository and link against the library in your build system.
## Simple API
Packetizer
Depacketizer```cpp
// Create a packetizer
media::RTPPacketizer packetizer(mediartp::Codec::AV1, 1400);// Configure packetizer
packetizer.SetSSRC(12345);
packetizer.SetPayloadType(96);
packetizer.SetTimestamp(90000);
// Input AV1 frame
std::vector av1_frame;// Packetize the frame
std::vector> rtp_packets;
if (packetizer.Packetize(av1_frame, &rtp_packets)) {}
``````cpp
// Create a depacketizer for AV1
media::RTPDepacketizer depacketizer(mediartp::Codec::AV1);// Process each RTP packet
std::vector reconstructed_frame;
for (const auto& packet : rtp_packets) {
depacketizer.Depacketize(packet, &reconstructed_frame);
}
```**[Example Applications](examples/README.md)** contain code samples demonstrating common use cases with libmediartp.
**[API Documentation](https://libmediartp.example/docs)** provides a comprehensive reference of our Public APIs.
Now go build something amazing! Here are some ideas to spark your creativity:
* Create low-latency media broadcasting solutions with seamless protocol integration.
* Build mesh streaming networks for distributed media delivery.
* Implement real-time audio/video processing pipelines with precise packet timing.
* Design reliable media streaming for challenging network environments.## Building
See [BUILDING.md](https://github.com/danielv4/libmediartp/blob/master/BUILDING.md) for building instructions.
### Features
#### Media Stream Management
* Comprehensive RTP (Real-time Transport Protocol) implementation supporting various media codecs.
* Flexible packet framing and sequencing for audio, video, and data streams.
* Advanced jitter buffer implementation with configurable parameters.#### Protocol Integration
* Seamless compatibility with QUIC, WebTransport, and WebRTC protocols.
* Protocol-agnostic design allowing deployment across different transport layers.
* Support for RTCP (RTP Control Protocol) feedback mechanisms and statistics.#### Packet Processing
* Efficient RTP packet creation, parsing, and manipulation.
* Header extension support for advanced media applications.
* Optimized packet scheduling and priority management.#### Media Synchronization
* Precise timing mechanisms for synchronized multi-stream playback.
* SRTP/SRTCP integration for secure media transfer.
* NTP/PTP clock synchronization support.#### Pure C/C++
* Written entirely in C/C++ with no external dependencies beyond standard libraries.
* Wide platform support: Windows, macOS, Linux, FreeBSD, and more.
* Optimized for high performance with fast builds and a comprehensive test suite.
* Easily integrated into existing projects using common build systems.### Contributing
Check out the [contributing guide](https://github.com/libmediartp/libmediartp/wiki/Contributing) to join the team of dedicated contributors making this project possible.
### License
MIT License - see [LICENSE](LICENSE) for full text