1Stream = require('node-rtsp-stream')
2stream = new Stream({
3 name: 'name',
4 streamUrl: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
5 wsPort: 9999,
6 ffmpegOptions: { // options ffmpeg flags
7 '-stats': '', // an option with no neccessary value uses a blank string
8 '-r': 30 // options with required values specify the value after the key
9 }
10})
11
12
1<html>
2<body>
3 <canvas id="canvas"></canvas>
4</body>
5
6<script type="text/javascript" src="jsmpeg.min.js"></script>
7<script type="text/javascript">
8 player = new JSMpeg.Player('ws://localhost:9999', {
9 canvas: document.getElementById('canvas') // Canvas should be a canvas DOM element
10 })
11</script>
12</html>
13