node-rtsp-stream options code example
Example 1: node rts stream
Stream = require('node-rtsp-stream')
stream = new Stream({
name: 'name',
streamUrl: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
wsPort: 9999,
ffmpegOptions: {
'-stats': '',
'-r': 30
}
})
Example 2: node rts stream
<html>
<body>
<canvas id="canvas"></canvas>
</body>
<script type="text/javascript" src="jsmpeg.min.js"></script>
<script type="text/javascript">
player = new JSMpeg.Player('ws://localhost:9999', {
canvas: document.getElementById('canvas')
})
</script>
</html>