Select Scene Range
Pick one scene out of the detected list
- start_sec
- end_sec
- duration_sec
- scene_json
This is a pure plumbing node, and it's honest about it. MKRSelectSceneRange takes the scene_ranges_json that MKRSceneCutDetector produces, you give it an index, and it hands back that one scene's start, end, and duration as clean numeric outputs. Nothing is generated, nothing is written - it exists to turn "scene list" into "the specific numbers I need for a trim or a crop."
What it's for
It's the socket between detection and action. Scene detection gives you a whole list; almost every real workflow then wants one of those scenes. Set scene_index to 2, and you get the third scene's timecode as actual float outputs you can wire into a trim node, a frame extractor, or anything else that wants seconds. The index clamps safely, so an out-of-range index returns the last scene instead of erroring out.
Inputs and outputs
Two inputs: scene_ranges_json (the scene list, typically straight from MKRSceneCutDetector) and scene_index (default 0). Four outputs:
start_secandend_sec- the range in seconds.duration_sec- end minus start, computed for you.scene_json- the full selected scene object, in case a downstream node wants the whole record.
Installing it
Same pack install as everything else:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
restart ComfyUI, or search MKRShift_Nodes in ComfyUI Manager. No ffmpeg, no extra dependencies - pure JSON parsing and arithmetic.
Common issues
The one real gotcha: it's a dumb picker, so garbage in is garbage out. An empty scene_ranges_json (the default []) returns a zero-filled range {0.0, 0.0, 0.0} and a scene_json with index 0 - it won't tell you anything is wrong. If you're getting zeros everywhere, check that the detector actually ran and produced ranges, not that the selector is broken. Also remember the index is zero-based: scene 1 is scene_index = 0.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| scene_ranges_json | STRING | [] | — |
| scene_index | INT | 00–100000 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| start_sec | FLOAT | — |
| end_sec | FLOAT | — |
| duration_sec | FLOAT | — |
| scene_json | STRING | — |