Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jorisvervuurt opened this issue May 4, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@jorisvervuurt
Copy link

commented May 4, 2019

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

This comment has been minimized.

Copy link
Owner

commented May 4, 2019

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

This comment has been minimized.

Copy link
Author

commented May 5, 2019

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

This comment has been minimized.

Copy link

commented May 5, 2019

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

  • package.json: value from the main key is build/rtsp-server.js but filename is build/index.js.
  • index.js/rtsp-server.js: needs module.exports = RtspServer; at the end.

Seems to work after these fixes.

@chriswiggins

This comment has been minimized.

Copy link
Owner

commented May 5, 2019

@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

This comment has been minimized.

Copy link

commented May 5, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.