npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

movie-color-strip

v1.0.0

Published

CLI tool for generating a color composition of a movies colors, inspired by [thecolorsofmotion.com](https://thecolorsofmotion.com). The tool generates a linear arrangement of color stripes, each strip representing the average of several frames within t

Downloads

5

Readme

movie-color-strip

CLI tool for generating a color composition of a movies colors, inspired by thecolorsofmotion.com. The tool generates a linear arrangement of color stripes, each strip representing the average of several frames within the movie, ordered by timestamp. The result visualizes the tone and ambience of the movie, as well as its progress.

This image is the result for the last Harry Potter movie. Some segments are easily mappable to specific segments of the movie, such as the orange segment in the middle which was generated from the fire in the room of requirements, or the bright whitish area at the end generated from the segment when Harry met dead Dumbledore at Kings Cross.

More examples are available below.

Contributions

There exist several similar projects already. This project is written as a NPM package, which means you can just run it in your command line with only NodeJS and FFMPEG installed. Additionally, it works on arbitrarily many movies, so you can start a batch of several movies at once and have images generated from all of them. Finally, this project splits the process of computing the colors from an video file, and generating the resulting image, into distinct commands. You can extract the colors from a movie once into a JSON file (which is the long part), and then generate multiple image formats from them with a different command. You can specify the exact dimensions of the image and whether it should be generated horizontally or vertically.

Usage

Install NodeJS and FFMPEG globally. Then, invoke npx movie-color-strip.

Usage: npx movie-color-strip [options] [command]

Options:
-V, --version             output the version number
-h, --help                display help for command

Commands:
parse-movie [options]
generate-image [options]
help [command]            display help for command

First, call npx movie-color-strip parse-movie to generate color files from movies. This might take a significant amount of time (~30 minutes per movie). This will be computed for every movie detected by the glob supplied via --movies (defaults to ./movies/**/*.mkv).

Usage: npx movie-color-strip parse-movie [options]

Options:
-t, --tmp-dir <directory>    Temporary directory for storing image files (default: "./tmp")
-o, --out <filename>         Output filename, must be .json (default: "./{moviename}.colors.json")
-n, --name <name>            Movie name, will be encoded into json file (default: "{moviename}")
-m, --movies <glob>          Glob for finding movies (default: "./movies/**/*.mkv")
-f, --every-frames <frames>  How often to grab a frame from the movie, i.e. every n frames. (default: "120")
-h, --help                   display help for command

Then, call npx movie-color-strip generate-image to create image files from the resulting color files.

Usage: npx movie-color-strip generate-image [options]

Options:
-f, --files <glob>        JSON Color files glob (default: "./**/*.colors.json")
-w, --width <size>        Output image width (default: "800")
-h, --height <size>       Output image height (default: "300")
-x, --orientation <size>  Output orientation, either "horizontal" or "vertical" (default: "horizontal")
-o, --output <name>       Output name, must be .png (default: "./{name}.png")
--help                    display help for command

Examples