atm0s-media-server

8xFFMIT活跃维护

用 Rust 写的去中心化全球规模媒体服务器,支持 WebRTC、WHIP/WHEP、RTMP 和 SIP,适合搭建低延迟、可横向扩展的 SFU 流媒体集群。

Decentralized, Global-Scale Media Server written in Rust (WebRTC/Whip/Whep/Rtmp/Sip)

v0.2.0-alpha.9发布于 2026-05-18 04:09 UTC332star +2 / 7 天30fork同步于 2026-11-10 23:59 UTC

怎么上手

由 README 提炼,执行前请确认
cd bin
cargo run -- --sdn-zone-node-id 1 --workers 1 standalone --geo-db ../maxminddb-data/GeoLite2-City.mmdb --max-cpu 100 --max-memory 100 --max-disk 100
硬件要求按 README 说明

README 未说明 GPU 或显存要求;standalone 模式通过 --max-cpu、--max-memory、--max-disk 限制资源,未提及 CPU 运行限制。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

Rust 编写的去中心化低延迟媒体服务器,单二进制支持 WebRTC/WHIP/WHEP 多节点部署

用 Rust 写的去中心化全球规模媒体服务器,支持 WebRTC、WHIP/WHEP、RTMP 和 SIP,适合搭建低延迟、可横向扩展的 SFU 流媒体集群。

核心能力

  • 单二进制提供 standalone、console、gateway、media、connector 多种运行模式
  • 实现 WebRTC SDK protobuf、WHIP、WHEP 与 RTPengine 风格媒体 API
  • 支持录制上传与转码、connector hook 及多租户同步存储
  • 内置 console 管理界面与 SDN 集群视图、节点与指标 API
  • 用 GeoIP 数据库做网关路由,按 CPU/内存/磁盘配额调度 worker

容易踩的坑

需先运行 ./download-geodata.sh 下载 GeoIP 数据库,否则网关路由缺少数据;依赖 Rust 1.84.0 及 libsoxr-dev、libopus-dev、libssl-dev、protoc 等系统包;项目处于 sans-io-runtime 重构期,旧嵌套文档可能过时,应以源码和顶层文档为准。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.0-alpha.9
  1. latestBuild refs/heads/masterpre-release2026-05-18 · 2026-05-18 05:25 UTC
    查看更新说明

    Chores

  2. v0.2.0-alpha.9最新正式版2026-05-18 · 2026-05-18 04:09 UTC

    这个版本没有写更新说明。

  3. v0.2.0-alpha.82026-04-23 · 2026-04-23 04:29 UTC
    查看更新说明

    Fixed

    • avoid crash when media pkt after remote track ended (#542)
  4. v0.2.0-alpha.72025-03-02 · 2025-03-02 17:46 UTC
    查看更新说明

    Fixed

    • vnet should stick on same worker for avoiding actor missmatch error (#519)
  5. v0.2.0-alpha.62025-03-02 · 2025-03-02 14:22 UTC
    查看更新说明

    Fixed

    • wrong worker setting cause cross nodes stream subscribe failed (#517)

    Other

    • update Cargo.lock dependencies
    • migrate to tailwindcss v4, update layout, router (#514)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    atm0s-media-server

    atm0s-media-server is a Rust workspace for a decentralized low-latency media server. The current runtime is a single binary with multiple server modes that can run together in standalone mode or as separate console, gateway, connector, and media nodes.

    The project is in a refactoring-era state around sans-io-runtime. Trust the source tree over older nested docs where they disagree.

    Current Runtime

    The binary is atm0s-media-server from bin/.

    Current subcommands:

    • standalone: starts in-process console, gateway, connector, and media nodes for local development.
    • console: serves the console UI/API and SDN cluster views.
    • gateway: serves token APIs, WebRTC/WHIP/WHEP/RTPengine media APIs, node APIs, metrics APIs, and sample assets.
    • media: runs media workers and WebRTC/RTPengine transports.
    • connector: stores connector events in SQL storage and handles record/hook related connector work.
    • cert: writes self-signed certificate/key files for QUIC-related development utilities.

    Implemented source-backed integrations include WebRTC SDK protobuf APIs, WHIP, WHEP, RTPengine-style APIs, recording upload/convert components, connector hooks, console APIs, and multi-tenancy sync storage. RTMP and SIP are not current in-repo server modes or transport crates.

    Quick Start From Source

    Prerequisites:

    • Rust 1.84.0 with rustfmt and clippy from rust-toolchain.toml.
    • Linux packages used by CI: libsoxr-dev, libopus-dev, and libssl-dev.
    • protoc for all-features builds.
    • wget if using download-geodata.sh.
    • Node 20 and pnpm if building the console frontend directly.

    Download the GeoIP database used by gateway routing:

    ./download-geodata.sh
    

    Run a local standalone stack from the bin/ directory. Running from bin/ also matches the debug sample asset path used by the HTTP server:

    cd bin
    cargo run -- \
      --sdn-zone-node-id 1 \
      --workers 1 \
      standalone \
      --geo-db ../maxminddb-data/GeoLite2-City.mmdb \
      --max-cpu 100 \
      --max-memory 100 \
      --max-disk 100
    

    Default local ports in standalone mode:

    • Console UI/API: http://localhost:8080
    • Gateway media/token APIs: http://localhost:3000

    Useful API docs are served by running nodes:

    • Gateway token docs: http://localhost:3000/token/ui
    • Gateway WHIP docs: http://localhost:3000/whip/ui
    • Gateway WHEP docs: http://localhost:3000/whep/ui
    • Gateway WebRTC docs: http://localhost:3000/webrtc/ui
    • Gateway RTPengine docs: http://localhost:3000/rtpengine/ui
    • Node APIs: http://localhost:3000/api/node/ui
    • Metrics APIs: http://localhost:3000/api/metrics/ui

    Build And Check

    From the repository root:

    cargo build --release --package atm0s-media-server
    cargo fmt --all -- --check
    cargo clippy --all-targets --all-features -- -D warnings
    cargo test --all-features --workspace
    

    Frontend console commands live in packages/media_console_front/react-app:

    pnpm install
    pnpm lint
    pnpm build
    

    Documentation

    Start with these current top-level docs:

    The mdBook source is docs/** and the generated output is book/**. Do not edit book/** manually.

    Known Caveats

    • --http-tls is parsed by the CLI, but it is not passed into the inspected HTTP server startup paths.
    • --rtpengine-cmd-addr is parsed by gateway args, but no runtime use was found in the inspected gateway flow.
    • External release download URLs and external SDK/sample repositories were not verified in this documentation pass.
    • Some older nested docs still describe removed or stale concepts. The top-level docs above are the current entry points.

    Contributing

    See CONTRIBUTING.md and docs/CONTRIBUTING.md.

    License

    This project is licensed under the MIT License. See LICENSE.