video-phash-service

2.3.3 • Public • Published

video-phash-service

NPM version Build status Test coverage Dependency Status License Downloads

Get all the phashes of all the frames of a video.

GET /:url

GET /https://archive.org/download/Windows7WildlifeSampleVideo/Wildlife_512kb.mp4

Returns:

[
  "0000000000000000",
  "ffffffffffffffff"
]

etc.

To get the actual scene boundaries, you need to use https://github.com/math-utils/hamming-distance.

GET /:encryptedUrl

By default, the password is mgmt. Encrypt the URL like so with the secret:

var crypto = require('crypto');
 
var hostname = 'localhost:3016';
var password = 'mgmt';
 
function encrypt(url) {
  var cipher = crypto.createCipher('aes256', password);
  var buffers = [];
  buffers.push(cipher.update(url));
  buffers.push(cipher.final());
  return hostname + '/' + Buffer.concat(buffers).toString('hex');
}

Readme

Keywords

Package Sidebar

Install

npm i video-phash-service

Weekly Downloads

0

Version

2.3.3

License

MIT

Last publish

Collaborators

  • jongleberry