Crates.io | rml_rtmp |
lib.rs | rml_rtmp |
version | 0.8.0 |
source | src |
created_at | 2018-04-15 21:48:52.576585 |
updated_at | 2023-04-29 20:38:06.862562 |
description | Rust library for handling aspects of the RTMP protocol. |
homepage | |
repository | https://github.com/KallDrexx/rust-media-libs |
max_upload_size | |
id | 60811 |
size | 465,940 |
This crate provides functions for interacting with the Adobe RTMP protocol. It contains both low-level and high-level abstractions that can be utilized to integrate RTMP support into clients (publisher and players) and servers.
This crate works with Cargo and is on crates.io. Add it to your Cargo.toml
like so:
[dependencies]
rml_rtmp = "0.1"
The intention is that this library is as high performance as possible. We use the Bytes
crate to keep allocations as
minimal as possible, and according to the video relay benchmark on my Ryzen 5 1600X (on a single
thread) I can relay 10KB video packets from one publisher to two subscribers with an average of 24 microseconds. This should
leave ample cpu cycles for custom logic and for it to run on lower end devices.
Two large examples can be found in the repository:
Threaded RTMP Server - This is a basic RTMP server that shows how to accept connections and route audio/video to players
Mio RTMP Server - This is a
relatively advanced RTMP server that shows how to integrate both RTMP ClientSession
s and ServerSession
s into a mio
application. It supports