Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.28 KB

README.md

File metadata and controls

55 lines (35 loc) · 1.28 KB

Dominant Colour Video Map Generator

This is a node.js app that while take a video, break it up into individual frames, find the dominant colour on every frame and then generate a HTML file that you can render the colour map out in the browser

Setup

First you need to make sure you have Homebrew installed

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Make sure you have ffmpeg installed on your system

brew install ffmpeg

If you dont already have Node.js installed run

brew install nodejs

Clone this repo

git clone https://github.com/SamMalcolm/dominant-video-colour.git

Move to the directory

cd dominant-video-colour

Install the dependancies

npm install

Then when you are ready to go, simply run:

node index /path/to/video.mp4 {frame_count}

Note: frame_count is optional, if provided will only produce a colour map across the entire video for the specified frames spread out over the entire video

Important

The process will be much quicker if the video is heavily compressed, currently the app does not handle this for you. You can use the tool Handbrake to compress the video. Results should not change if the video quality is heavily reduced.