New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fvi-node-face-api-rtsp-stream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fvi-node-face-api-rtsp-stream

FVI - Node Face API RTSP Stream Consumer

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

Requirements

  • FFmpeg.
  • See rtsp-simple-server
  • Configure RTSP Web Cam

About

The Node Face API RTSP Stream library uses face-api.js and node-rtsp-stream to consumes data messages from RTSP Stream and detect faces on it.

How to Use

mkdir test-face-detect
cd test-face-detect
npm init -y
npm install --save fvi-node-face-api-rtsp-stream

Dev

git clone https://github.com/salespaulo/fvi-node-face-api-rtsp-stream
cd fvi-node-face-api-rtsp-stream
npm install
npm run dev
# OR
npm run test

Instantiate

const FaceApiRtspStream = require('fvi-node-face-api-rtsp-stream')

const instance = FaceApiRtspStream({
    name: 'ID',
    url: 'rtsp://',
    port: 6789,
    score: 0.5,
    stream: 'new node-rtsp-stream/videoStream()',
})

Starting/Stoping

instance
    .start()
    .then(res => console.log('Initializate'))
    .catch(e => console.error(e))

instance.stop()

Events

instance.on('error', e => console.error(e))
instance.on('warn', message => console.log(message))
instance.on('data', event => console.log(event))
instance.on('detect', event => console.log(event))
instance.on('start', event => console.log(event))
instance.on('stop', event => console.log(event))

Lab

Into directory lab you find tests with this library using WebSocket and jsmpeg.js. Let's join it!

  • index.js: Starts fvi-node-face-api-rtsp-stream, collects face detects, draw details and send, WebSocket.socket.send, buffered image to ws-index.html.

  • ws-index.html: Connects via WebSocket, get buffered images with detections and show.

  • jmpeg-index.html: Connects via jsmpeg.js, nd show.

Run

npm i
cd lab
node ws-index.test.js

After this, opens browser url http://localhost:8081 to see images.

Licence

MIT

Keywords

node

FAQs

Package last updated on 14 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts