1.8.7 • Published 7 years ago

rtsp-live555 v1.8.7

Weekly downloads
17
License
MIT
Repository
github
Last release
7 years ago

rtsp-live555

Build Status

NPM

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.

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;
    }
});
1.8.7

7 years ago

1.8.6

7 years ago

1.8.5

7 years ago

1.8.4

7 years ago

1.8.3

7 years ago

1.8.2

7 years ago

1.8.0

7 years ago

1.7.8

7 years ago

1.7.7

7 years ago

1.7.6

7 years ago

1.7.5

7 years ago

1.7.4

7 years ago

1.7.3

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.6

7 years ago

1.6.4

7 years ago

1.6.3

7 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago