Registry / streaming / node-rtsp-stream-jsmpeg

node-rtsp-stream-jsmpeg

JSON →
library0.0.2jsnpmunverified

Stream RTSP video through WebSocket for consumption by jsmpeg MPEG1/2 decoder in the browser. Version 0.0.2 (no active release cadence). Requires FFmpeg installed on the server. Similar to node-rtsp-stream and node-rtsp-stream-es6 but reimplements server-side decoding based on jsmpeg's official streaming documentation. ESM-only; does not support require(). No TypeScript types. Use for low-latency HTML5 video streaming from IP cameras or RTSP sources.

npm install node-rtsp-stream-jsmpeg
INSTALL
IMPORT
SIG · NODE-RTSP-STREAM-J
N
node-rtsp-stream-jsmpeg
streamingjavascriptv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Stream
✓ import Stream from 'node-rtsp-stream-jsmpeg'
✗ const Stream = require('node-rtsp-stream-jsmpeg')
ESM-only package; no CommonJS support.
default
✓ import Stream from 'node-rtsp-stream-jsmpeg'
Default import is the only export. The library does not provide named exports.
Stream (type)
✓ import Stream from 'node-rtsp-stream-jsmpeg'
✗ import { Stream } from 'node-rtsp-stream-jsmpeg'
This is a default export, not a named export. Named import will result in undefined.

Creates a WebSocket server on port 3333 that streams an RTSP video source for jsmpeg playback.

import Stream from 'node-rtsp-stream-jsmpeg'; const options = { name: 'streamName', url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov', wsPort: 3333 }; const stream = new Stream(options); stream.start();
Debug
Known issues
breakingPackage is ESM-only (no CommonJS). Using require() throws error 'ERR_REQUIRE_ESM'.
fix
Use import syntax and set 'type': 'module' in package.json, or use dynamic import().
affects: >=0.0.2
gotchaFFmpeg must be installed and available in PATH on the server. Without FFmpeg, stream.start() will throw 'spawn ffmpeg ENOENT'.
fix
Install FFmpeg (e.g., apt-get install ffmpeg on Debian) or provide full path in options.
affects: >=0.0.0
gotchaThe 'name' option is required but not validated. If omitted, the stream may fail silently.
fix
Always provide a 'name' string in the options object.
affects: >=0.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Using require() on an ESM-only package.
fix
Convert to ES module: use import instead, and set 'type': 'module' in package.json.
spawn ffmpeg ENOENT
FFmpeg is not installed or not in the system PATH.
fix
Install FFmpeg (e.g., sudo apt-get install ffmpeg) and verify with ffmpeg -version.
TypeError: Stream is not a constructor
Using named import { Stream } instead of default import.
fix
Use import Stream from 'node-rtsp-stream-jsmpeg' without curly braces.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
wsrequiredWebSocket server for streaming to jsmpeg client
Agent activity
44 hits · last 30 days
node
40
Resources
node-rtsp-stream-jsmpeg — npm install node-rtsp-stream-jsmpeg · libregistry