ip-cam-sim

1.4.3 • Public • Published

ip-cam-sim

Simulates rtsp capable ip cam through ffmpeg

Dependencies

Should have ffmpeg installed in your machine

Usage

var options = {
  imagePath: null,           // path to a static image to serve on loop
  camHost: 'localhost:80',   // the rtsp server address
  number: 2,                 // number of cameras to spawn
  moreFlags: 
    ['-force_key_frames',    // other FFMPEG flags to pass
     'expr:gte(t,n_forced)'] //   new string element each time there is
                             //   a space in the argument
};
var camSpawner = require('ip-cam-sim');
camSpawner( options, function (err) {
});

Spawns number of number of rtsp cameras that will connect to a localhost:80 rtsp-rtmp server. Instead of null one can provide a jpg or png image path.

Default behavior for not providing the image path is that it will generate 20 random images that are 800x600 big, which then will be used as basis for 20 fps stream.

Readme

Keywords

Package Sidebar

Install

npm i ip-cam-sim

Weekly Downloads

4

Version

1.4.3

License

MIT

Last publish

Collaborators

  • dchem