HDR Dynamic Metadata (RUDRA)
The four JSON files that make an HDR file actually display properly
- image
- summary
- hdr10plus_json
- dovi_json
- analysis_json
- hdr10plus_path
Metadata is the payload, not a footnote
An HDR10 file without dynamic metadata plays. It just plays badly - the TV applies one static tone curve to a movie that swings from a night interior to a sunlit desert, and the dark scenes come out milky while the bright ones clip. The metadata is what tells the display "this shot peaks at 640 nits, this one at 3100". Without it you've shipped a technically-HDR file that nobody enjoys.
HDR Dynamic Metadata measures your master the way a display will receive it, and writes the files that get injected at encode time. It's the least glamorous node in Radiance and probably the one that most separates "I made an EXR" from "I delivered an HDR master". It's also the one that feels most like the finishing-suite half of the pack rather than the ComfyUI half - which is exactly the gap FXTD Studios built this thing for.
What it measures and what it writes
Statistics are MaxRGB per pixel, per CTA-861.3 and Dolby's L1 model, and they don't change within a shot - the whole point of shot-based metadata. Four files appear next to filename_prefix:
<prefix>_hdr10plus.json- forx265 --dhdr10-infoorhdr10plus_tool inject<prefix>_dovi_generate.json- adovi_tool generateconfig, profile 8.1, L1 per shot<prefix>_hdr10plus_scenes.json- the scene breakdown<prefix>_hdr_analysis.json- every frame, in nits and 12-bit PQ
Shots come from cut_data if you have it (the cut_data output of Scene Cut Detect, either a JSON list or '0, 48, 120'), otherwise RUDRA finds them with a histogram-distance test you can tune with shot_threshold. Higher threshold, fewer and longer shots - and the tooltip makes the honest argument for erring that way: a trim inside one shot that changes brightness will pump if you've split it into two shots.
The inputs worth setting
image is a batch treated as a movie, and image_space has to be right - scene-linear in Rec.709, Rec.2020, ACEScg or AP0. PQ and HLG inputs aren't accepted; this node wants the linear master.
peak_nits (default 1000) is the mastering display peak and lands in the Dolby L6 header, so it should be the display you're mastering for, not the brightest pixel you happen to have. reference_white_nits stays at 203 unless your pipeline defines white differently. apply_peak_fit and peak_fit let the node run RUDRA's own shoulder before measuring, so it reports what the encoder will actually see; knee_nits defaults to 0, meaning 0.75 × peak.
Five outputs: summary (per shot, in words), hdr10plus_json, dovi_json, analysis_json (all three also as text on the outputs), and hdr10plus_path - the written file path, which is the one you wire into Radiance Write's hdr10plus_json input. write_files off gives you the outputs without touching disk.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/fxtd-studios/radiance
cd radiance
python -m pip install -r requirements.txt
Manager → Radiance → Install, then restart and refresh. Windows portable users, pip via python_embeded\python.exe. This node downloads nothing - but injecting the metadata afterwards needs x265 or hdr10plus_tool / dovi_tool, which are not part of the pack. That's a separate install and the honest half of the story.
Where people get burned
filename_prefix must be a plain name. No slashes, no subfolders - the node rejects them with a clear error. Put the folder in output_path instead (empty means ComfyUI's output directory).
Short batches make a mockery of "dynamic". On five frames from one shot you get one shot's worth of metadata, which is correct and useless. This is a whole-clip tool; feed it the clip.
PQ in, and it fails. Easy mistake if your master came out of the analytic node with output_encoding set to PQ - that's a delivery-encoded image, not a scene-linear master. Go back and set Linear.
The JSONs are not a delivery. Shipping _hdr10plus.json next to an MP4 does nothing; the file has to be muxed in. If you don't own that step, hand the JSONs to whoever does - they're the standard format, which is the whole reason they're plain JSON on disk rather than buried in an EXR header. That's also the escape hatch when a host strips your metadata: a sidecar survives a re-encode in a way an embedded chunk doesn't.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The movie's frames (a batch), scene-linear HDR. | |
| image_space | COMBO | Linear (Rec.709) | What the HDR is: scene-linear in these primaries, 1.0 = reference_white_nits. PQ / HLG are not accepted. |
| peak_nits | FLOAT | 1000100–10000 | Mastering display peak (Dolby L6, and the peak fit). |
| filename_prefix | STRING | rudra_master | The four files are <prefix>_hdr10plus.json and so on. |
| write_files | BOOLEAN | true | Off: only the outputs. |
| cut_dataopt | STRING | Shot starts: ◎ Scene Cut Detect's cut_data, a JSON list or '0, 48, 120'. Empty: RUDRA finds them. | |
| apply_peak_fitopt | BOOLEAN | true | Measure after RUDRA's shoulder and peak fit, as the encoder will get it. Off: the frames are already mastered to the peak. |
| peak_fitopt | COMBO | Keep luminance (RUDRA default) | For a colour too bright for the display: give up saturation (Keep luminance) or brightness (Scale). |
| knee_nitsopt | FLOAT | 00–9999 | 0: RUDRA's 0.75 x peak. |
| mastering_min_nitsopt | FLOAT | 0.00010–1 | Mastering display black (Dolby L6). |
| shot_thresholdopt | FLOAT | 0.350.01–2 | With no cut_data: RUDRA's histogram distance that declares a cut. Higher: fewer, longer shots (safer: a trim that changes mid-shot pumps). |
| hdr10plus_target_nitsopt | INT | 400100–10000 | Targeted display in the scene analysis JSON. |
| reference_white_nitsopt | FLOAT | 20380–400 | Nits of 1.0 in the HDR (BT.2408: 203). |
| output_pathopt | STRING | Folder. Empty: ComfyUI's output folder. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| summary | STRING | What was measured, per shot. |
| hdr10plus_json | STRING | The x265 / hdr10plus_tool JSON, as text. |
| dovi_json | STRING | The dovi_tool generate config, as text. |
| analysis_json | STRING | Every frame in nits and PQ, as text. |
| hdr10plus_path | STRING | The written _hdr10plus.json, for Radiance Write's hdr10plus_json (empty with write_files off). |