Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lightweight end-to-end stack for real-time video/audio/data.

License

NotificationsYou must be signed in to change notification settings

PulseBeamDev/pulsebeam

Repository files navigation

Documentation |Issues |Discord

PulseBeam

PulseBeam Logo: Open Source WebRTC SFU for browsers, mobile, and IoT

PulseBeam is an open source, general-purpose WebRTC SFU server for connecting browsers, mobile, and IoT clients. We believe real-time application development shouldn't be complicated, nor should it rely on heavy architectures with many moving parts. PulseBeam reduces this friction by adhering to these core design goals:

  • Support all WebRTC clients.
  • Keep the architecture simple, but not simpler.
  • Natively support vertical and horizontal scaling.
  • Provide client SDKs strictly for convenience, not necessity.
  • Require minimal configuration.

If your client device speaks WebRTC, it can communicate with PulseBeam.

Compatibility

PulseBeam is opinionated about media handling to prioritize battery efficiency, hardware support, and predictable performance:

  • Video: H.264 Baseline profile up to Level 4.1
  • Audio: Opus
  • Data Channel: Planned

Architecture

The architecture is highly inspired bySDN architecture.

architecture

Quickstart

The following quickstart assumes that you have a Linux machine. As a fallback, you can go tohttps://pulsebeam.dev/#quickstart and check the "fallback" toggle.

Step 1. Run the PulseBeam Server

Docker/Podman (recommended):

docker run --rm --net=host ghcr.io/pulsebeamdev/pulsebeam:pulsebeam-v0.2.23

Open Port Requirements:

  • TCP/3000: HTTP signaling
  • UDP/3478: WebRTC traffic (Multiplexed)
  • TCP/3478: WebRTC over TCP fallback (Multiplexed) —Planned

Other options:

  • Binary: download fromReleases
  • Source:cargo run --release -p pulsebeam

Step 2. Publish a video

Run the following snippet in the browser console:

constpc=newRTCPeerConnection();conststream=awaitnavigator.mediaDevices.getUserMedia({video:true});consttransceiver=pc.addTransceiver("video",{direction:"sendonly",// Define scalability layers (low, medium, high)sendEncodings:[{rid:"q",scaleResolutionDownBy:4,maxBitrate:150_000},{rid:"h",scaleResolutionDownBy:2,maxBitrate:400_000},{rid:"f",scaleResolutionDownBy:1,maxBitrate:1_250_000},],});transceiver.sender.replaceTrack(stream.getVideoTracks()[0]);constoffer=awaitpc.createOffer();awaitpc.setLocalDescription(offer);constres=awaitfetch("http://localhost:3000/api/v1/rooms/demo",{method:"POST",headers:{"Content-Type":"application/sdp"},body:offer.sdp});awaitpc.setRemoteDescription({type:"answer",sdp:awaitres.text()});

Step 3. View the video stream

Go tohttps://codepen.io/lherman-cs/pen/pvgVZar, then put "demo" as the room to connect to.

Profiling & Metrics

PulseBeam exposes an internal debug HTTP server onhttp://localhost:6060.

  • Metrics (Prometheus):http://localhost:6060/metrics
  • CPU profile (pprof):http://localhost:6060/debug/pprof/profile?seconds=30
  • CPU flamegraph:http://localhost:6060/debug/pprof/profile?seconds=30&flamegraph=true
  • Memory profile:http://localhost:6060/debug/pprof/allocs

CPU profiling measuresCPU usage, not wall time. For meaningful results, profile while the server is under load.

View CPU profiles with:

go tool pprof -http=:8080 cpu.pprof

Or view as a flamegraph on a browser by specifyingflamegraph=true to the URL query.

Roadmap

  • ✅ Prototype: Rust SFU + demo apps
  • ✅ Bandwidth estimator, simulcast support
  • 🚧 Top-N audio selection, Data channel, Web Client SDK
  • 📅 HTTP API & Webhooks (events)
  • 📅 Multi-node / cascading SFU support
  • 📅 Extensions: recording, SIP, AI agents

[8]ページ先頭

©2009-2025 Movatter.jp