Skip to main content

A tool to generate and analyze color barcodes from video files.

Project description

moviesigdb: The Movie Color DNA Analyzer

Python Version License Status

moviesigdb is a powerful Python toolkit designed to extract, visualize, and archive the color palette of video files. By condensing thousands of frames into a single "Movie Barcode" or projecting them into 3D space, you can analyze the cinematography, mood, and lighting evolution of any film or TV episode.

What is a Movie Barcode? > It is a time-compressed visualization where every vertical slice of the image represents the average color of a specific moment in the video.


📸 Visualization Capabilities

moviesigdb goes beyond simple stripes. It offers three distinct ways to view your data:

  1. The Barcode: A linear timeline of the video's color.
  2. 3D RGB Cube: Plots every frame as a point in 3D space (Red, Green, Blue axes) to show color clusters and separation.
  3. HSV Polar Wheel: Maps the mood.
    • Angle = Hue (Color)
    • Radius = Saturation (Intensity)
    • Great for seeing if a movie is "Teal and Orange" or "Neon Noir".

🚀 Features

  • Smart Extraction: Uses tqdm to show a real-time progress bar while processing large video files.
  • Adjustable Granularity: Extract 1 frame per second, 10 frames per second, or 1 frame per minute using the processing_fps parameter.
  • Metadata Archiving: Uniquely embeds JSON data (Show Name, Season, Episode, FPS) directly into the output PNG file headers.
  • Scientific Plotting: Leverages matplotlib for high-resolution, publication-quality figures.

📦 Installation

Option 1: From Source (Recommended)

Cloning the repo allows you to modify the source code easily.

git clone [https://github.com/shreyanbruh/moviesigdb.git](https://github.com/shreyanbruh/moviesigdb.git)
cd moviesigdb
pip install -e .
import moviesigdb as msdb

# 1. Load your video
video_path = "path/to/your_video.mp4"
cap = msdb.get_video_capture(video_path)

# 2. Extract frames (e.g., 1 frame per second)
frames = msdb.extract_frames_fast(cap, processing_fps=1.0)

# 3. Calculate average colors
avg_colors = msdb.get_average_colors(frames)

# 4. Display the results
msdb.display_movie_barcode(avg_colors, title="My Movie Analysis")
msdb.plot_hsv_polar(avg_colors)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moviesigdb-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moviesigdb-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file moviesigdb-0.1.0.tar.gz.

File metadata

  • Download URL: moviesigdb-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for moviesigdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67658ca3b3da23e0e85998196a43053e450a34c436c8b800f4b2abdf214b66af
MD5 ed9dd910874840506511cd03e3075893
BLAKE2b-256 e02effc8184dbcb829853168020b2946bd72dc9e6147c5a9bc6fb6ef870c06c3

See more details on using hashes here.

File details

Details for the file moviesigdb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moviesigdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for moviesigdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 147e7976c2c39e1b637146f6552f2afc073943b6c870707db3faeeca3bbff7f3
MD5 47388f5010a67e5bcac68ffd29d0efa4
BLAKE2b-256 b580d1154c1240056de168a09473649d459da32911f8b77417b0d339144742c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page