https://github.com/godka/node-rtsp-live555
get RTSP stream from IPC and export in FLV stream
https://github.com/godka/node-rtsp-live555
flv live555 nodejs npm rtsp
Last synced: about 1 year ago
JSON representation
get RTSP stream from IPC and export in FLV stream
- Host: GitHub
- URL: https://github.com/godka/node-rtsp-live555
- Owner: godka
- License: mit
- Created: 2017-08-07T10:55:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T13:25:26.000Z (almost 9 years ago)
- Last Synced: 2025-05-02T14:21:34.216Z (about 1 year ago)
- Topics: flv, live555, nodejs, npm, rtsp
- Language: C++
- Homepage: https://www.npmjs.com/package/rtsp-live555
- Size: 14.9 MB
- Stars: 30
- Watchers: 5
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtsp-live555
[](https://travis-ci.org/godka/node-rtsp-live555)
[](https://nodei.co/npm/rtsp-live555/)
## introduction
This is a wrapper which allows you to get RTSP stream from IPC and export in FLV stream.
## Installation
### NPM
`npm install rtsp-live555` - install lastest stable version
`npm install godka/node-rtsp-live555` -install lastest version from github
### Clone the last version from Github
`git clone https://github.com/godka/node-rtsp-live555`
### Sample
The sample creates a web server at port 8080 and scans RTSP address from IPC with onvif.A stream will be shown on the video element via GrindPlayer(flash) and flv.js when pressing 'play' button.
```javascript
var rtsp = null;
try {
rtsp = require('rtsp-live555');
} catch (e) {
rtsp = require('./lib/rtsp-live555.js');
}
var _url = 'rtsp://1029.mythkast.net/test.264';//test address
var stream = new rtsp.Live555Client({ input: _url });
stream.on('start', () => {
console.log(_url + ' started');
});
stream.on('stop', () => {
console.log(_url + ' stopped');
});
var _hasrecv = false;
stream.on('data', (data) => {
//you can write your method here
//data is flv stream
if (!_hasrecv) {
console.log('recv stream:', data.length);
stream.stop();
console.log('close stream:', _url);
_hasrecv = true;
}
});
```