Closed jorisvervuurt closed 5 years ago
Try the code that’s in the test directory:
const StreamingServer = require('rtsp-streaming-server');
const server = new StreamingServer({
serverPort: 5554,
clientPort: 6554,
rtpPortStart: 10000,
rtpPortCount: 1000
});
const run = async () => {
try {
await server.start();
} catch (e) {
console.error(e);
}
}
run();
I tried that, but it still showed the same error. Not sure why. Anyway, I’m now using https://github.com/mpromonet/v4l2rtspserver together with a systemd service to start streaming from the connected Raspberry Pi Camera Module.
There are two issues that are preventing this module to work:
main
key is build/rtsp-server.js
but filename is build/index.js
.module.exports = RtspServer;
at the end.Seems to work after these fixes.
@MiguelRipoll23 hmmm annoying I forgot npm automatically promoted any published version to latest
. I published 2.0.0-rc1
(the new version, converted to typescript) which got promoted to latest
however I've sorted that now and 1.0.2
is latest
again. Please try again npm install rtsp-streaming-server@1.0.2
.
Thanks for the heads up!
@chriswiggins I couldn't understand why there were so many differences between the repository and source files from the npm download 😂
Thanks for the quick fix!
I've tried to get this thing running based on the README file, but I keep getting 'Cannot find module 'rtsp-server' or Cannot find module 'rtsp-streaming-server'.
Can you please provide a working example? Thanks!