rtmp-stream

1.0.1 • Public • Published

Node-RTMP-Stream

Listen to RTMP stream and convert to MPEG-TS

Requirements

FFMPEG

const rtmp = new RTMP({
  FFMPEG: 'path to ffmpeg binary',
  RTMP_INPUT : 'tcp://localhost:9090', //Your streaming server will publish to this address
  RTMP_OUTPUT: 'tcp://localhost:9191', //Stream is converted and will be sent to this unix socket
})
rtmp.RTMPInput()
rtmp.RTMPOutput()
 
rtmp.RTMPInput()
rtmp.RTMPOutput()
 
rtmp.ffmpeg.on('stdout', () => {
  console.log("Started to convert")
})
 
 
rtmp.output.on('media-data', (data) => {
  console.log("Getting MPEG data:", data)
})
 
// There are other events fired from rtmp.output and rtmp.ffmpeg. See the code for more info

Readme

Keywords

none

Package Sidebar

Install

npm i rtmp-stream

Weekly Downloads

5

Version

1.0.1

License

ISC

Unpacked Size

14.5 kB

Total Files

5

Last publish

Collaborators

  • rbndg