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

find_dark_intervals

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find_dark_intervals

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Find Dark Intervals

Finds sections in a video with sufficient darkness. Works without relying on complex machine learning solutions.

How it works

  1. Takes an input video file and splits it into image frames using ffmpeg.
  2. Computes a mean grayscale color value for each frame using ImageMagick.
  3. Identifies sufficiently dark frames using standard score.
  4. Computes start/end timeframes for dark segments and trims the original video.

What can this be used for?

Quickly finding points of interest in a video that correspond to changes in brightness.

Installation

Install it yourself as:

gem install find_dark_intervals

Usage

Make sure you have a recent version of ffmpeg and convert in your PATH.

On Mac, they can be installed using Homebrew:

brew update
brew install ffmpeg imagemagick

Then in irb, run:

require 'find_dark_intervals'
FindDarkIntervals::IntervalsFinder.new('your/video/path.mp4').run

After some time, you should see a new file <video_name>_highlights.mp4 in the same directory as the original video.

FAQs

Package last updated on 12 Dec 2018

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