Skip to content
This repository was archived by the owner on May 17, 2026. It is now read-only.
This repository was archived by the owner on May 17, 2026. It is now read-only.

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

Description

@repcsi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions