rtsp-to-web
v1.0.0
Published
1-command micro-gateway bridging RTSP live camera streams to modern web browsers with instant HTML5 playback
Maintainers
Readme
rtsp-to-web
1-command micro-gateway bridging RTSP live camera streams to modern web browsers with instant HTML5 playback.
Developed by the team at RTSPLink.com.
⚡ The Problem: Web Browsers Cannot Play RTSP Directly
Web browsers (Chrome, Safari, Firefox, Edge) do not natively support the RTSP protocol. Building a streaming server, configuring WebRTC/HLS, and writing HTML5 player code usually takes hours.
The Solution: rtsp-to-web
With a single command:
npx rtsp-to-web rtsp://admin:[email protected]:554/Streaming/Channels/101rtsp-to-web spins up an ephemeral local bridge, transmuxes the stream with zero CPU copy overhead, starts an HTTP server on port 3000, and immediately launches a sleek dark-mode player in your default web browser!
🚀 Quick Start (CLI)
# Play any live RTSP feed in your browser
npx rtsp-to-web rtsp://rtsp.rtsplink.com/live/test
# Specify a custom local port
npx rtsp-to-web rtsp://192.168.1.50/live --port 8080
# Re-encode video for cameras outputting H.265 / HEVC
npx rtsp-to-web rtsp://192.168.1.50/live --transcode📦 Programmatic Usage
import { RtspWebServer } from 'rtsp-to-web';
const server = new RtspWebServer({
rtspUrl: 'rtsp://rtsp.rtsplink.com/live/test',
port: 3000,
});
const webUrl = await server.start();
console.log(`Stream is live in browser at: ${webUrl}`);
// Later when done:
server.stop();📄 License
MIT © RTSPLink
