← Back to Leaderboard
Cbenjiyaya

benjiyaya/ComfyUI-ReaVideoBreakdown

ComfyUI nodes for shot analysis and video prompts with OpenCV and a native VLM

View on GitHub ↗
Engineering Health (Methodology)
A+ · 88/100
Maintenance Activity
● Updated 9d ago
Latest Release
v0.2.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption13/25
Release Cadence20/20
License Clarity20/20
Self-HostedGPU
Total Stars
★ 192
24h Growth
+3
7d Growth
+23
Forks
25

GitHub Star History

Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.

benjiyaya/ComfyUI-ReaVideoBreakdown Star History (2026-11-22 - 2026-12-04) DAILY STAR HISTORY (13-DAY D1 TELEMETRY) +143 in 12d · avg +12/day 200 115 29 2026-11-22: ★ 492026-11-23: ★ 1192026-11-24: ★ 1422026-11-25: ★ 1562026-11-26: ★ 1622026-11-27: ★ 1692026-11-28: ★ 1702026-11-29: ★ 1722026-11-30: ★ 1782026-12-01: ★ 1812026-12-02: ★ 1892026-12-03: ★ 1892026-12-04: ★ 192 ★ 192 11-22 11-28 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ReaVideoBreakdown is a Python extension that runs inside a ComfyUI graph. The first node receives a decoded IMAGE batch and its frame rate. On the CPU, OpenCV uses HSV histogram distances and pixel differences with adaptive thresholds to find shot boundaries. On consecutive frame pairs, Lucas–Kanade optical flow and a RANSAC similarity fit estimate global image motion. These measurements are kept distinct from the VLM's interpretation of the scene.

For each shot, the node samples frames and calls the CLIPLoader encoder through ComfyUI's native tokenize → generate → decode interface. It passes the sample as video when supported and otherwise falls back to images. The resulting shot records feed the report and prompt outputs. The second node uses ComfyUI's V3 io.Schema and dynamic image inputs to pass the structured breakdown, edit instruction, and reference images through the same VLM interface. The package declares NumPy and opencv-python-headless; PyTorch and model loading come from ComfyUI.

Key Capabilities & Differentiators

The breakdown node detects cuts, fades, dissolves, and flashes. Its defaults are 0.5 sensitivity, a 0.24-second minimum shot duration before merging, and eight sampled frames per shot with a 512-pixel longest-side cap. It pairs estimated pan and zoom with VLM-generated descriptions of subject, setting, lighting, style, and apparent production type. Outputs include a VIDEO.md-style report, structured JSON, timecoded prompt blocks, a summary, the first frame of each shot, and a shot count. Reports and prompts can be produced in English or Chinese.

The reference node takes breakdown_json, an edit instruction, and up to nine images. It produces one six-section MiniMax H3 Ref2VA prompt plus prompt_json and a label map. It is designed to retain shot order, cuts, and camera cues while asking the VLM to fit the timeline to target_seconds; zero uses the source duration. Soundscape and music sections are generated prompt text, not measurements of the source audio. Video generation remains the job of the downstream node.

Trade-offs & Limitations

Compared with a standalone OpenCV detector, the extension adds semantic descriptions and generation prompts without requiring a separate processing pipeline. Compared with using ComfyUI's Generate Text node alone, it adds shot boundaries, motion estimates, and structured per-shot packaging. The cost is a VLM generation pass per detected shot. More shots, larger samples, and longer responses increase inference work. Lowering max_side or frames_per_shot reduces VLM input load but can hide fine details or brief actions, and it does not shrink the upstream decoded frame batch.

The motion fit estimates global image motion, not physical camera movement; large moving subjects can influence it. Production labels such as live action or AI video are model judgments, not proof of provenance. Very slow dissolves can be missed, and users should review cut points and rewritten timestamps before relying on them. There is no source-audio or BPM analysis, OCR, or subtitle export, and the H3 prompt rewriter is not a rendering or editing tool.

Hardware & Deployment Guide

Install into ComfyUI/custom_nodes, install requirements.txt in the same Python environment, and restart ComfyUI. The package requires Python 3.10 or later. Feed decoded frames and the source frame rate into the breakdown node and load a vision-capable text encoder through CLIPLoader; plain SD1.5 or SDXL CLIP is not sufficient. The reference rewriter requires a recent ComfyUI build with comfy_api and the native H3 nodes. Match reference image slots on the rewriter and the downstream H3 node; wire any reference audio directly into H3.

The analysis and prompt rewriting require neither clip_vision nor an external API. CPU resources cover frame analysis, while GPU sizing for local inference depends on the chosen VLM and its visual inputs. The v0.1.0 release introduced the breakdown node; v0.2.0 added the V3 reference rewriter. Running python tests/test_offline.py exercises the first node with synthetic footage and a mocked VLM without a GPU or PyTorch. It does not validate real-model output or end-to-end H3 wiring, so test both in the intended ComfyUI installation.

Segmentation: Adaptive thresholds on HSV histogram distance and pixel differences detect cuts, fades, dissolves, and flashes.
Motion estimation: Lucas–Kanade optical flow and a RANSAC similarity fit produce pan in px/s, zoom in %/s, and static, smooth, or handheld labels.
Inference: Native ComfyUI tokenize → generate → decode path, with a fallback from video batches to sampled images.
Outputs: VIDEO.md-style report, structured shot JSON, timestamped prompt blocks, summary, keyframes, and shot count.
Reference prompting: V3 node rewrites a breakdown into one six-section MiniMax H3 Ref2VA prompt with up to nine reference images.
Test coverage: A CPU-only synthetic three-shot test mocks the VLM contract and checks segmentation, parsing, output structure, and example workflow widget order.
Best For

ComfyUI teams turning reference footage into inspectable shot records, timecoded prompts, or a reference-image rewrite for MiniMax H3.

Skip If

You only need cut detection, lack a compatible vision-language encoder, or need source-audio analysis, verified provenance, or a finished video from the extension itself.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedGPU
cd ComfyUI/custom_nodes
git clone https://github.com/benjiyaya/ComfyUI-ReaVideoBreakdown.git
cd ComfyUI-ReaVideoBreakdown
pip install -r requirements.txt   # just numpy + opencv-python-headless; torch comes with ComfyUI

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/benjiyaya/ComfyUI-ReaVideoBreakdown.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

benjiyaya/ComfyUI-ReaVideoBreakdown Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ComfyUI-ReaVideoBreakdown

How do I wire the nodes into an existing ComfyUI graph?

Connect the decoded IMAGE batch and source frame rate to Video Breakdown, and supply a vision-language encoder from CLIPLoader. Use breakdown_json when downstream nodes need structured shot records. For MiniMax H3, connect the rewriter's prompt output to MiniMaxH3ReferenceToVideo and put each reference image in the same numbered slot on both nodes.

What should I plan for in terms of GPU memory and runtime overhead?

Shot detection and optical-flow analysis run on the CPU. For local VLM inference, start with the defaults of eight frames per shot and a 512-pixel longest side, then increase resolution or sampling only where the output misses important details. Total memory use depends on the encoder and the decoded frame batch: the sampling settings reduce the visual input to the VLM, not the size of the upstream batch.

Can I self-host it for commercial work?

The extension is MIT-licensed and can be self-hosted. Preserve the applicable copyright and license notices when redistributing it, and check the terms of your encoder weights, downstream video model, and source footage or reference images separately. Neither analysis node requires an external API, but that does not establish whether a downstream generation node runs locally.

When is plain OpenCV or ComfyUI's Generate Text node a better fit?

Use a standalone OpenCV pipeline if all you need is shot boundaries or motion estimates. Use ComfyUI's native Generate Text node if you already segment footage and only need VLM output. This extension is most useful when you want segmentation, motion estimates, structured shot reports, and prompt drafting in one graph; it does not replace an editor or renderer.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining benjiyaya/ComfyUI-ReaVideoBreakdown? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature benjiyaya/ComfyUI-ReaVideoBreakdown on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare