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

Is this project dead? I get 0 data through websocket after connecting #17

Open
repcsi opened this issue May 23, 2021 · 2 comments
Open

Comments

@repcsi
Copy link

repcsi commented May 23, 2021

I did everything as the documentation says, also copied the jsmpeg example which was working fine with the old node-rtsp-stream and it even works with the jsmpeg implementation of websocket-relay.js.
I can see the stream parts coming in but all of them are sized 0bytes.
Did I miss something? Checked here and there but I did not find out what is wrong.
server.js:

const Stream = require('node-rtsp-stream-es6')

const options = {
  name: 'streamName',
  url: 'rtsp://myuser:mypassword@my_cam_ip/url/1/',
  port: 5000
}

stream = new Stream(options)

stream.start()

test_html.html:

<!DOCTYPE html>
<html lang="en">
<html>
<head>
  <meta charset="UTF-8">
  <title>JSMpeg Stream Client</title>
  <style type="text/css">
    html, body {
      background-color: #111;
      text-align: center;
    }
  </style>

</head>
<body>
<canvas id="video-canvas"></canvas>
<script type="text/javascript" src="jsmpeg.min.js"></script>
<script type="text/javascript">
  var canvas = document.getElementById('video-canvas');
  var url = 'ws://ip_address_of_server_running_node:5000/';
  var player = new JSMpeg.Player(url, {canvas: canvas});
</script>
</body>
</html>

All I get is a black screen and the 0 sized stream chunks. The client connection can be seen in the server logs:
New connection: streamName size= 936kB time=00:00:11.53 bitrate= 664.7kbits/s dup=0 drop=4 speed=1.06x

@sandorvasas
Copy link

yeah zero data for me too

@repcsi
Copy link
Author

repcsi commented Jun 30, 2021

Hey @sandorvasas,
Try out phoboslab/jsmpeg and the websocket-relay.js implementation, that combo worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants