I am using the package node-rtsp-stream
more Websocket to make the transmission of my IP-Camera, and the visualization happens well, now I would like to know how to record this transmission and I have no idea how to do this.
index.js on Server (NodeJS)
const Stream = require('node-rtsp-stream'),
stream = new Stream({
name: 'Camera-Garagem',
streamUrl: 'rtsp://${meu_ip}:1030/user=${user}&password=${pass}&channel=1&stream=0.sdp?',
wsPort: 5000
})
index.html on the Client
<div>
<canvas id="videoCanvas"></canvas>
</div>
<script src="jsmpeg.js"></script>
<script>
const ws = new WebSocket("ws://localhost:5000")
const player = new jsmpeg(ws, {
canvas: document.querySelector('#videoCanvas'),
autoplay: true,
audio: false,
loop: true
})
</script>