rtmp-stream
v1.0.1
Published
Ingest RTMP stream with FFMPEG and convert to mpeg-ts stream
Downloads
4
Readme
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