8xff / atm0s-media-server Goto Github PK
View Code? Open in Web Editor NEWDecentralized, Global-Scale Media Server written in Rust (WebRTC/Whip/Whep/Rtmp/Sip)
Home Page: https://8xff.github.io/media-docs/
License: MIT License
Decentralized, Global-Scale Media Server written in Rust (WebRTC/Whip/Whep/Rtmp/Sip)
Home Page: https://8xff.github.io/media-docs/
License: MIT License
Can refer to Helix project:
https://github.com/helix-editor/helix/blob/master/.github/workflows/release.yml
We need a simple and cost effective way to deploy multi zones cluster for demo cluster. We have some possible way:
In my opinion docker compose is better, we should create a docker compose repo which has:
#120 PR only implemented core flow, for external using we need to implement external message queue producer
Could someone confirm whether this feature is currently supported, and if not, are there plans to implement it in the future?
Thank you for your attention to this matter. I look forward to hearing from you soon.
Tracking issue for:
Implement Whip and Whep for easier testing server
Using stun client for detecting public IP addresses
Running the script
docker run --net=host ghcr.io/8xff/atm0s-media-server:master
would resulted in an error:
/atm0s-media-server: error while loading shared libraries: libsoxr.so.0: cannot open shared object file: No such file or directory
Can you update the readme so it will be easier for people who are interested in this project to run the demo?
just following the readme sfu server can not be started
This can be avoid by using buf: [u8; 2000] instead. Each cycle we dont need to reset length, just write from beginning then parse slice to Str0m
TCP with fixed SSL Hello Exchange
See AsyncSSLServerSocket implementation for exchange details:
https://webrtc.googlesource.com/src/+/refs/heads/main/rtc_base/server_socket_adapters.cc#19
Here is list of first version roadmap, we have goal to release with all bellow features
Current implement bigO is O(n) with n is queue length, with default queue length is 1000 it take 1000 times check for finding each time a rtp package incoming.
pub fn max_seq(&self) -> SeqNo {
self.queue
.iter()
.map(|r| r.seq)
.max_by_key(|r| *r)
.unwrap_or_else(|| 0.into())
}
It can be optimize to near O(1) by pre-calculate max_queue each time insert to queue, each time pop from queue if max_queue is pop, we will regenerate by above function
By using first incoming stun packet for matching USER:PASS, by the way we can detect exact which tcp stream is used
Gateway will act for
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Cargo.toml
convert-enum 0.1
num_enum 0.7
log 0.4
smallmap 1.4
derivative 2.2
derive_more 0.99
rand 0.8
bin/Cargo.toml
tracing-subscriber 0.3
clap 4.5
poem 3.0
poem-openapi 5.0
tokio 1.37
packages/media_core/Cargo.toml
packages/media_runner/Cargo.toml
packages/media_utils/Cargo.toml
packages/protocol/Cargo.toml
bincode 1.3.3
serde 1.0.198
packages/transport_webrtc/Cargo.toml
str0m 0.5.0
smallmap 1.4.2
stun-rs 0.1.8
Dockerfile
ubuntu 22.04
ubuntu 22.04
.github/workflows/release-plz.yml
actions/checkout v4
MarcoIeni/release-plz-action v0.5
.github/workflows/release.yml
actions/checkout v4
actions-rs/toolchain v1
actions-rs/cargo v1
actions/upload-artifact v4
svenstaro/upload-release-action v2
actions/download-artifact v4
docker/setup-qemu-action v3
docker/setup-buildx-action v3
actions/checkout v4
actions/download-artifact v4
docker/login-action v3
docker/metadata-action v5
docker/build-push-action v5
.github/workflows/rust-clippy.yml
actions/checkout v4
actions-rs/toolchain v1@16499b5e05bf2e26879000db0c1d13f7e13fa3af
github/codeql-action v3
.github/workflows/rust.yml
actions/checkout v4
codecov/codecov-action v4
actions/checkout v4
EmbarkStudios/cargo-deny-action v1
.github/workflows/typos.yml
actions/checkout v4
crate-ci/typos v1.18.2
Example in armv7 or mips, AtomicU64 is not supported
Whip and Whep client fails to connect with error 415 Unsupported Media Type
.
We need to config github action to build binary and docker each time release is created
It seems to has some bugs in key-value, where key-value event not received in case start too fast after stop
It really messed up with all child crate releases
When client changed network, it should sending ice_restart for reconnecting
Need to refactor according to RFC-0005: media-webrtc-sdk
For example, the root "token", for generating other JWT Tokens, should be called "secret" or "keys". This appeared in multiple servers/
code.
// in servers/media-server/src/server.rs
/// Current Token
#[arg(env, long, default_value = "insecure")]
token: String,
While in the implementations of packages/cluster/
, the root "token" is correctly termed "key", or "static_key" to be exact.
And in "token"_generator server, the check for token is confusing at best:
// servers/media-server/src/server/token_generate/http.rs
if !app_secret.0.eq(&data.1.token) {
return Ok(Json(Response {
success: false,
error: Some("INVALID_TOKEN".to_string()),
data: None,
}));
}
We should strictly normalize all the terms to avoid such confusion.
For building arm version we are using Cross but it running inside a docker, this cause missing protobuf-compiler. May be the issues can be fixed by bellow config:
https://github.com/cross-rs/cross?tab=readme-ov-file#pre-build-hook
Hello,
Are there any Windows 10 (x64) pre-built binaries?
Would really like to test it out.
Thanks
For single server which can run multiple transports: rtmp, sip, webrtc, we need to move transport to separated package
It seams to related to str0m webrtc library, I just post a issue algesten/str0m#448
When running with RTMP server, it show too much log like:
[2023-11-03T02:53:33.818Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.818Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.818Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.819Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.820Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.820Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.820Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.820Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.820Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2456792 }
[2023-11-03T02:53:33.845Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.803Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.803Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.803Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.803Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.806Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.806Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.806Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.806Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.807Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.809Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
[2023-11-03T02:53:34.810Z INFO endpoint::endpoint_wrap::internal::local_track] [LocalTrack video_0] stats Single { bitrate: 2466384 }
Currently, the only way to retrieve node's multiaddr is to initialize a node and require it in the first log lines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.