node rts stream 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: { // options ffmpeg flags
    '-stats': '', // an option with no neccessary value uses a blank string
    '-r': 30 // options with required values specify the value after the key
  }
})
    

Here is what the above code is Doing:
1. Importing the node-rtsp-stream module
2. Creating a new instance of the Stream class
3. Setting the name of the stream
4. Setting the URL of the stream
5. Setting the port for the websocket server
6. Setting the options for ffmpeg

Similar Posts