包详细信息

onvif

agsh38.6kMIT0.8.1

Client to ONVIF NVT devices Profile S: cameras

onvif, video, PTZ, camera

自述文件

ONVIF

Coverage Status NPM version

ONVIF Client protocol Profile S (Live Streaming) and Profile G (Replay) Node.js implementation.

This is a wrapper to ONVIF protocol which allows you to get information about your NVT (network video transmitter) device, its media sources, control PTZ (pan-tilt-zoom) movements and manage presets, detect devices in your network and control its events. It will also allow you to get information about your NVR (network video recorder) Profile G device and obtain a list of recordings.

The library uses NodeJS. And works on the server-side.

ONVIF

Troubleshooting

The library is tested on a test bed with 5 x Axis, 2 x Bosch, 1 x Canon, 2 x Hanwha, 4 x HikVision, 1 x Panasonic, 2 x Sony and 2 x unknown vendor cameras. There is a mix of PTZ and Fixed cameras and a mix of Pre-Profile, Profile S, Profile G and Profile T devices.

It is also tested with some Analogue Encoders from Avigilon, Axis, Bosch and HikVision including testing the RS485 output.

We welcome any donations or long term loans cameras from other vendors to test compatibility especially when testing the Media2 API, ONVIF Events and OSD.

Installation

NPM

npm install onvif - install latest stable version

npm install agsh/onvif - install latest version from GitHub

npm install agsh/onvif#v1 - install latest development version

Clone the latest version from github

git clone https://github.com/agsh/onvif.git

Tests

In the library directory run npm test

By default the tests use a mockup server to generate ONVIF replies.

To test with the real device, set appropriate environment variables HOSTNAME, USERNAME, PASSWORD, PORT and run tests.

Documentation

To build jsdoc for the library with default theme run npm run jsdoc. Otherwise use jsdoc with sources from ./lib/*.js

Quick example

Special teasing example how to create little funny video server (http://localhost:6147) with 1 ffmpeg and 3 node.js libraries:

更新日志

Changelog

  • 0.6.6 A lot of fixes (@RogerHardiman). Stable and tested, next step for new version
  • 0.6.5 Add MEDIA2 support, Profile T and GetServices XAddrs support for H265 cameras. Add support for HTTPS. Add Discovery.on('error') to examples. Add flag to only send Zoom, or only send Pan/Tilt for some broken cameras (Sony XP1 Xiongmai). Fix bug in GetServices. Improve setNTP command. API changed on getNetworkInterfaces and other methods that could return an Array or a Single Item. We now return an Array in all cases. Add example converting library so it uses Promises with Promisify. Enable 3702 Discovery on Windows for MockServer. Add MockServer test cases)
  • 0.6.1 Workaround for cams that don't send date-time
  • 0.6.0 Refactor modules for proper import in electron-based environment
  • 0.5.5 Added ptz.gotoHomePosition, ptz.setHomePosition. Fixed exceptions in ptz.getConfigurations and utils.parseSOAPString. Added tests for ptz.setPreset, ptz.removePreset, ptz.gotoHomePosition, and ptz.setHomePosition.
  • 0.5.4 Bumped for NPM.
  • 0.5.3 Some fixes. Tests
  • 0.5.2 preserveAddress property for NAT devices, discovery with multiple network interfaces (@Climax777)
  • 0.5.1 Critical bugfix in SOAP-auth for some cams
  • 0.5.0 Profile G support (@RogerHardiman), proper SOAP auth, nodejs support >= 0.12
  • 0.4.2 Bugfixes
  • 0.4.1 Improved discovery (@sousandrei, @RogerHardiman)
  • 0.4.0 Encoder support (@chriswiggins), Imaging service (@EastL)
  • 0.3.1 EventEmitter-based events
  • 0.3.0 Refactoring, documentation, event service basics
  • 0.2.7 WS-Discovery