# rtmp-stream

> Ingest RTMP stream with FFMPEG and convert to mpeg-ts stream

Latest version **1.0.1** (published 2020-05-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install rtmp-stream
pnpm add rtmp-stream
yarn add rtmp-stream
bun add rtmp-stream
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-05-09 |
| First published | 2020-05-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | r32a |
| Maintainers | rbndg |

## Links

- npm: https://www.npmjs.com/package/rtmp-stream
- npm.io page: https://npm.io/package/rtmp-stream

## Recent versions

- 1.0.1 (latest) — 2020-05-09
- 1.0.0 — 2020-05-07

## README

# Node-RTMP-Stream
Listen to RTMP stream and convert to MPEG-TS

### Requirements
FFMPEG

```javascript
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
```

---
_Source: https://npm.io/package/rtmp-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
