Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

customvision-find-video-tags

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customvision-find-video-tags

Find highest probability video tags with Microsoft custom vision ai in a video

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

customvision-find-video-tags

Use Microsoft Custom Vision API to pin point frames in a video with the biggest probability for each tag.

This module will;

  1. download the video
  2. sample an image every second (configurable)
  3. check for each image what's the probability for each tag (using customvision.ai)
  4. for each tag, take the image with the highest probability
  5. delete local temporary files

Usage

let { pinTagsInVideo } = require('customvision-find-video-tags');

pinTagsInVideo(
  'https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/52856430-0796-4d1b-a05b-b6a42dc14743/image',
  'f49c5905ca3148cfb5a146a0bsa3adc9',
  'http://location.com/urlpath/video.mp4',
  [ 'front', 'back', 'side' ],
  { every_n_seconds: 0.5 },
  (err, anchors) => {
    console.log('done');
  }
);

Using ffmpeg

If you want to use ffmpeg without installing it locally, you can use ffmpeg-ensure:

let { ensureFFMPEG } = require('ffmpeg-ensure');
let { pinTagsInVideo } = require('customvision-find-video-tags');

ensureFFMPEG().then(() => {
  pinTagsInVideo(
    'https://southcentralus.api.cognitive.microsoft.com/customvision/v1.0/Prediction/52856430-0796-4d1b-a05b-b6a42dc14743/image',
    'f49c5905ca3148cfb5a146a0bsa3adc9',
    'http://location.com/urlpath/video.mp4',
    [ 'front', 'back', 'side' ],
    { every_n_seconds: 0.5 },
    (err, anchors) => {
      console.log('done');
    }
  );
});

FAQs

Package last updated on 14 Sep 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc