node-rtsp-stream-es6
node-rtsp-stream-es6 copied to clipboard
Is this project dead? I get 0 data through websocket after connecting
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
yeah zero data for me too
Hey @sandorvasas, Try out phoboslab/jsmpeg and the websocket-relay.js implementation, that combo worked for me!