Brightness Feature β‘π ‘π π £π
Turn a video's lighting into a signal you can drive other nodes with
- images
- FEATURE
This node reads the brightness of your video frame-by-frame and turns it into a FEATURE - the pack's term for a driveable numeric signal, the same mechanism the audio and depth extractors produce. It's one of the simplest of the "Sources" family, and a good one to reach for when you want a reactive effect but don't have (or don't want) audio or MIDI driving it - the footage itself becomes the control signal.
How it works
You pick an extraction_method, and per frame it computes that specific measure of the input images, sampled at frame_rate and internally worked at widthΓheight. The author's own tooltip lays out the six choices clearly: mean_brightness is the overall brightness of the scene; brightness_variance is high-contrast detection (how much brightness varies within a frame); brightness_histogram is the distribution of brightness values; and dark_ratio/mid_ratio/bright_ratio each give you the percentage of the frame sitting in that brightness band. A flash-cut scene will spike brightness_variance; a mostly-silhouette shot will have a high dark_ratio.
The inputs and outputs that matter
images(IMAGE, required) - "Input images to analyze," per the tooltip.extraction_method- the measure to compute:mean_brightness,brightness_variance,brightness_histogram,dark_ratio,mid_ratio, orbright_ratio.frame_rate(default 30, range 1β120) - frame rate of the input video.width/height(default 512, range 64β4096) - resolution the feature is computed at.
Output: a single FEATURE, the per-frame brightness curve, ready to plug into anything in the pack that accepts a FEATURE - an emitter modulator, a mask modifier, or EffectVisualizer if you just want to see the curve overlaid on your video first.
How to install it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart ComfyUI. This node runs on the pack's opencv-python/scikit-image dependencies - no model weights to download.
Common issues & troubleshooting
The feature signal looks flat and boring. You probably picked mean_brightness on footage that doesn't change much scene-to-scene. Try brightness_variance if what you actually want is a signal that reacts to contrast/motion between light and dark, not just overall exposure.
Signal doesn't line up with what you see in the video. Check frame_rate matches your actual footage's frame rate - set it wrong and the extracted curve gets sampled out of step with the frames it's supposed to describe.
Unsure what a value like "0.6" on dark_ratio actually means. It's a fraction of the frame in the dark band, not an absolute brightness - before wiring it into an effect, drop the output into EffectVisualizer for a sanity check; it burns the raw feature value onto your frames as text so you can see the numbers next to the footage they came from.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| extraction_method | COMBO | Choose how to analyze brightness: - mean_brightness: Overall brightness of the scene - brightness_variance: How much brightness varies - high for high contrast scenes - brightness_histogram: Distribution of brightness values - dark_ratio: Percentage of dark areas in the scene - mid_ratio: Percentage of medium-bright areas - bright_ratio: Percentage of bright areas | |
| frame_rate | FLOAT | 30.01β120 | Frame rate of the video (1.0 to 120.0 fps) |
| width | INT | 51264β4096 | Width of the output feature (64 to 4096) |
| height | INT | 51264β4096 | Height of the output feature (64 to 4096) |
| images | IMAGE | Input images to analyze |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FEATURE | FEATURE | β |