# node-rtsp-stream

> node-rtsp-stream ================

Latest version **0.0.9** (published 2020-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-rtsp-stream
pnpm add node-rtsp-stream
yarn add node-rtsp-stream
bun add node-rtsp-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2020-02-12 |
| First published | 2014-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 478 |
| Author | David Jsa |
| Maintainers | kyriesent |

## Links

- npm: https://www.npmjs.com/package/node-rtsp-stream
- Repository: https://github.com/kyriesent/node-rtsp-stream
- Homepage: https://github.com/kyriesent/node-rtsp-stream#readme
- Issues: https://github.com/kyriesent/node-rtsp-stream/issues
- npm.io page: https://npm.io/package/node-rtsp-stream

## Dependencies (1)

- [ws](https://npm.io/package/ws.md) ^7.0.0

## Recent versions

- 0.0.9 (latest) — 2020-02-12
- 0.0.8 — 2019-05-15
- 0.0.7 — 2019-05-15
- 0.0.6 — 2019-05-15
- 0.0.5 — 2019-02-17
- 0.0.4 — 2018-12-15
- 0.0.3 — 2014-12-23
- 0.0.2 — 2014-10-03

## README

node-rtsp-stream
================

Stream any RTSP stream and output to websocket for consumption by [jsmpeg](https://github.com/phoboslab/jsmpeg). HTML5 streaming video! (Requires ffmpeg)

Usage:

```
$ npm install node-rtsp-stream
```

On server:
```
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
  }
})
    
```

On client:
```
<html>
<body>
	<canvas id="canvas"></canvas>
</body>

<script type="text/javascript" src="jsmpeg.min.js"></script>
<script type="text/javascript">
	player = new JSMpeg.Player('ws://localhost:9999', {
	  canvas: document.getElementById('canvas') // Canvas should be a canvas DOM element
	})	
</script>
</html>
```

For more information on how to use jsmpeg to stream video, visit https://github.com/phoboslab/jsmpeg

Please note that framerate from cameras must be greater than or equal to 15fps for mpeg1 encoding, otherwise ffmpeg errors will prevent video encoding to occur. If you have a camera with advanced configuration options, make sure it streams video at a recommended 25fps.

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