Code Monkey home page Code Monkey logo

node-rtsp-live555's Introduction

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

node-rtsp-live555's People

Contributors

godka avatar shuffle0412 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.