Skip to content

A simple WebRTC streaming server. It streams video and audio from a file to a browser client.

Notifications You must be signed in to change notification settings

obox-systems/demo_webrtc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebRTC Streaming Demo

A Rust WebRTC server that captures video and audio from your browser's camera/microphone and streams it back in real-time. Demonstrates bidirectional WebRTC media streaming with a clean Rust backend.

Features

  • Real-time video/audio capture from browser
  • WebRTC peer connection with automatic SDP exchange
  • VP8 video codec with RTCP feedback (PLI)
  • Opus audio codec
  • Embedded web client served from the Rust binary
  • Async architecture using Tokio

Quick Start

  1. Install Rust

  2. Run the server:

cargo run --release
  1. Open http://localhost:8080 in your browser

  2. Allow camera and microphone access when prompted

  3. Your video stream will appear after the WebRTC connection is established

Architecture

Browser                          Rust Server
   |                                  |
   |-- getUserMedia() --------------->|
   |                                  |
   |<-- SDP Offer ------------------->|
   |                                  |
   |--- RTP Video/Audio ------------->|
   |                                  |
   |<-- RTP Video/Audio (loopback) ---|

The server:

  1. Serves the HTML client at /
  2. Handles SDP offer/answer exchange at /local
  3. Receives media tracks from the browser
  4. Loops them back to demonstrate bidirectional streaming

Tech Stack

  • webrtc-rs - Pure Rust WebRTC implementation
  • hyper - HTTP server for signaling
  • tokio - Async runtime

License

MIT

About

A simple WebRTC streaming server. It streams video and audio from a file to a browser client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published