1.4.3 • Published 5 years ago

video-stream-monitor v1.4.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

video-stream-monitor

Installation

It needs compare from ImageMagick package and ffmpeg tools for work. Also it depends on POSIX shell utilites: cp, rm, mv.

npm i video-stream-monitor

Usage

const options = {
  fuzz: 15, //threshold, in percents 
  delay: 1, //delay between checks
  attempts: 5, //how much equal frames in a row must be before emitting frozen event
  checkFrames: {
    PARENTAL_CONTROL: ['path/to/parental_frame.png'],
    ERROR_MESSAGE: ['path/to/error_message.png']
  }, 
  screenshotsPath: '/tmp/', //path where screenshots shall be saved. Do not use it for UI
  actualScreenshotsPath: 'public/thumbnails', //path where permanent screenshots shall be saved and updated on each check. Use it, if you want to show screenshot in UI
  actualScreenshotName: 'channel_25', //filename to be used for screenshots at actualScreenshotsPath
  differentPixelsLimit: 1000 //images having different pixels count below this number shall be interpreted as same (calulated after fuzz is accepted)
};
const Monitor = require('video-stream-monitor');
const instance = new Monitor('YOUR TEST STREAM URL', 'name_for_file', options);

instance.on('crash', () => console.log('ffmpeg crashed, no screenshot'));
instance.on('frame', (type) => console.log('Met frame of type ' + type));
instance.on('frozen', () => console.log('Channel FROZEN'));
instance.start();
1.4.3

5 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.14

6 years ago

1.3.13

6 years ago

1.3.12

6 years ago

1.3.11

6 years ago

1.3.10

6 years ago

1.3.9

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.9

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago