| Crates.io | dora-gst-webrtc-sink |
| lib.rs | dora-gst-webrtc-sink |
| version | 0.2.0 |
| created_at | 2025-10-03 06:19:05.764376+00 |
| updated_at | 2025-10-03 06:25:31.058471+00 |
| description | WebRTC sink node for dora-rs with multi-camera support |
| homepage | |
| repository | https://github.com/dieu-detruit/dora-gst-webrtc-sink |
| max_upload_size | |
| id | 1866219 |
| size | 171,120 |
A WebRTC sink node for dora-rs that streams video via WebRTC with built-in signaling server. Supports multiple video sources and multiple clients per source.
sudo apt-get update
sudo apt-get install \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly
Download and install from GStreamer official website
git clone https://github.com/yourusername/dora-gst-webrtc-sink.git
cd dora-gst-webrtc-sink
cargo build --release
cd example
./run_demo.sh
example/webrtc-viewer.html in your web browserSIGNALING_PORT: WebSocket signaling server port (default: 8080)SSL_CERT_PATH: Path to SSL certificate file for TLS (optional)SSL_KEY_PATH: Path to SSL private key file for TLS (optional)RUST_LOG: Log level (default: info)Note: Both SSL_CERT_PATH and SSL_KEY_PATH must be set to enable TLS. If either is missing, the server will run without TLS.
The node supports two input formats:
Legacy format (backward compatible):
imageMulti-camera format:
<video_id>/framecamera1/frame, camera2/frame, front_camera/framevideo_id creates a separate video streamAll inputs expect:
Connect to the WebSocket signaling server at:
Without TLS:
ws://localhost:8080/<video_id>
With TLS:
wss://localhost:8080/<video_id>
Example URLs:
ws://localhost:8080/camera1 - First camera (without TLS)ws://localhost:8080/camera2 - Second camera (without TLS)wss://localhost:8080/camera1 - First camera (with TLS)ws://localhost:8080/default - Legacy supportnodes:
- id: camera
path: camera-node
outputs:
- image
- id: webrtc-sink
path: dora-gst-webrtc-sink
inputs:
image: camera/image
nodes:
- id: camera1
path: camera-node
outputs:
- frame
- id: camera2
path: camera-node
outputs:
- frame
- id: webrtc-sink
path: dora-gst-webrtc-sink
inputs:
camera1/frame: camera1/frame
camera2/frame: camera2/frame
The included webrtc-viewer.html provides:
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββ
β Camera Node ββββββΆβ dora-gst-webrtc ββββββΆβ Web Browser β
β (RGB8) β β -sink β β (WebRTC) β
βββββββββββββββ β β βββββββββββββββ
β βββββββββββββββ β
βββββββββββββββ β β Signaling β β βββββββββββββββ
β Camera Node ββββββΆβ β Server β ββββββΆβ Web Browser β
β (RGB8) β β βββββββββββββββ β β (WebRTC) β
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββ
cargo build --release
cargo test
src/main.rs - Main entry point and dora node integrationsrc/webrtc_server.rs - WebRTC server implementationsrc/peer_connection.rs - Individual peer connection managementsrc/video_source_manager.rs - Multiple video source managementsrc/signaling.rs - WebRTC signaling protocol messagesContributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Ensure GStreamer plugins are properly installed:
gst-inspect-1.0 webrtcbin
create_pipeline()For questions, issues, or contributions, please use the GitHub issue tracker.