Skip to content

Zoranner/filmspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filmspec

A CLI tool to generate film spectrum images from video files.

中文 | 日本語 | 한국어 | Español | Français | Deutsch | Русский

How It Works

Filmspec uniformly samples frames from a video file over time, processes each frame according to the selected mode, and generates a unique visual spectrum.

Slice Mode - Extract pixel lines from each frame:

slice example

Hue Mode - Analyze dominant color of each frame:

hue example

Examples Gallery

A collection of spectrum examples from music videos:

Monica
Monica
不要爱他
不要爱他
为你钟情
为你钟情
共同渡过
共同渡过
大热
大热
我
春夏秋冬
春夏秋冬
热情的沙漠
热情的沙漠
至少还有你
至少还有你

Process Modes

Mode Description
slice Extract a pixel line (row or column) from each frame and stack them
hue Analyze dominant color of each frame and create a color band spectrum

Sample & Layout Modes

Sample Mode Description
row Extract middle horizontal line from each frame (slice mode only)
col Extract middle vertical line from each frame (slice mode only)
Layout Mode Description
h Stack horizontally (left to right)
v Stack vertically (top to bottom)
r Radial layout (disc-shaped, like a CD)

Prerequisites

  • Rust 1.70+
  • FFmpeg (must be available in system PATH)

Installation

cargo install --path .

Usage

filmspec <INPUT> [OPTIONS]

Options

Option Short Description Default
<INPUT> - Input video file path required
--output -o Output image path <filename>_spectrum_slice.png or <filename>_spectrum_hue.png
--width -w Frame count (h/v: image width, r: circumference frames) 1920
--height -H Band length (h/v: image height, r: ring width) 300 (h/v), 500 (r)
--mode -m Process mode: slice/hue slice
--layout -l Layout direction: h/v/r h
--sample -s Sample direction: row/col (slice mode only) row
--inner-radius - Inner radius for radial layout (pixels) 250

Examples

# Default slice mode (1920×300, horizontal layout, row sample)
filmspec movie.mp4

# Hue spectrum mode (dominant color analysis)
filmspec movie.mp4 -m hue

# Custom output path and size
filmspec movie.mp4 -o output.png -w 1280 -H 400

# Vertical layout (stack top to bottom)
filmspec movie.mp4 -l v

# Column sample in slice mode (extract vertical pixel lines)
filmspec movie.mp4 -s col

# Hue mode with vertical layout
filmspec movie.mp4 -m hue -l v -w 400 -H 1920

# Radial layout (disc-shaped spectrum)
filmspec movie.mp4 -l r

# Radial layout with custom parameters
filmspec movie.mp4 -l r -w 2400 -H 600 --inner-radius 200

# Hue mode with radial layout
filmspec movie.mp4 -m hue -l r

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages