chriswiggins / rtsp-streaming-server

Lightweight RTSP/RTP streaming media server written in Javascript
GNU General Public License v3.0
106 stars 21 forks source link

Can't get it to work... #7

Closed jorisvervuurt closed 5 years ago

jorisvervuurt commented 5 years ago

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!

chriswiggins commented 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();
jorisvervuurt commented 5 years ago

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.

MiguelRipoll23 commented 5 years ago

There are two issues that are preventing this module to work:

Seems to work after these fixes.

chriswiggins commented 5 years ago

@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!

MiguelRipoll23 commented 5 years ago

@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!