1.0.1 • Published 4 years ago

rtmp-stream v1.0.1

Weekly downloads
3
License
ISC
Repository
-
Last release
4 years ago

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