Node-ffmpeg-stream is a Node.js library for converting RTSP streams to WebSocket streams, enabling multi-view surveillance camera display in web browsers. It wraps FFmpeg to transcode RTSP feeds into MPEG-TS chunks served via WebSocket, and includes built-in HTTP endpoints for stream management (list, add, remove). Version 1.1.0 is the current stable release; the project appears to have irregular updates and limited community adoption. It differentiates from alternatives like node-rtsp-stream by offering a more integrated API with Express.js support and screenshot capabilities.
npm install node-ffmpeg-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up an Express server that serves RTSP streams via WebSocket, adding a camera stream and starting the service.
Install FFmpeg via package manager or download from ffmpeg.org, and ensure ffmpeg command works in terminal.
Ensure client expects video/mp2t MIME type.
Avoid hardcoding credentials; use environment variables. Consider RTSP over TLS if supported.
Update addStream(id, rtspUrl) call to the new signature (no options object as third argument).
Install FFmpeg, e.g., on Ubuntu: sudo apt install ffmpeg. On Windows, download and add to PATH.
Change require to import: import RTSP2Web from 'node-ffmpeg-stream';
Check network connectivity and camera status; verify IP and port.