Nodes/MediaKit Toolkit/Scene · 场景切分
ComfyUI Node

Scene · 场景切分

Auto-slice your footage at the scene changes, and get a timeline back

By fudanll-sys·Created about a month ago·Updated 27 days ago· 1
Scene · 场景切分
  • video
  • scenes_json
  • raw_json
enable_clip_fadefalse
segment_threshold0
min_duration0
max_duration0
poll_interval_seconds10
max_poll_attempts720

Shot-boundary detection, in one node: Scene · 场景切分 watches your video for transitions and frame changes, and returns a cut timeline - where each scene starts and ends. It's the analysis step behind a hundred editing jobs, and it's genuinely useful if you batch-process footage or want a scene index before you start cutting a montage. Just know up front: the output is a timeline, not a video. This node doesn't render your cuts for you; it tells you where they should be.

The inputs that matter

  • enable_clip_fade (BOOLEAN, default false) - when on, detected fade-in/fade-out segments become their own clips instead of being folded into the neighboring scene. Flip it on for footage with a lot of crossfades, where you want dissolves counted as their own beats.
  • segment_threshold (FLOAT, 0–99, default 0) - detection sensitivity. 0 means "use the algorithm's default," which is the right starting point. Lower values = more aggressive splitting; raise it if you're getting too many cuts.
  • min_duration / max_duration (FLOAT, seconds, default 0) - floor and ceiling for a single clip, with 0 again meaning "use the default." Handy for forcing a minimum clip length so a blink-length "scene" doesn't become a clip.

Plus video and the standard poll_interval_seconds (default 10) / max_poll_attempts (default 720).

Two STRING outputs: scenes_json (the cut timeline) and raw_json (the complete redacted result). Both are JSON - you'll pair them with a display node, a script that actually splits the file, or a downstream analysis step.

How it works

Same cloud plumbing as every node in this pack: the video materializes to a temp file, mediakit-cli submits an async segmentation task to your MediaKit account, the node polls, then returns the timeline as JSON. Segmentation runs server-side on Volcengine's AI MediaKit; your machine just uploads, waits, and gets billed per task.

Install and the cloud setup

ComfyUI Manager, search "MediaKit Toolkit" / mediakit-toolkit, full restart - or:

cd ComfyUI/custom_nodes
git clone https://github.com/fudanll-sys/comfyui-mediakit-toolkit.git

No Python dependencies, no model downloads. You need a Volcengine account with AI MediaKit activated, an API key, and the CLI installed and authed in the environment that starts ComfyUI:

npx @volcengine/mediakit-cli install -y
mediakit-cli init --mode cloud-first --api-key "YOUR_MEDIAKIT_API_KEY" --credential-store config --yes

Where it fits

If you're already in a MediaKit workflow, this slots in as the front end of an auto-cut pipeline - scene detection feeding a script, or feeding the Highlight node so you're only analyzing the segments worth keeping. The local alternative, PySceneDetect, is free and perfectly good for a single clip; the cloud version earns its keep on long footage and batch jobs where you don't want to babysit. The trap is expecting a rendered edit - remember it returns metadata, and give yourself a small script or node to act on the timestamps. Test the threshold on a short clip first; "too many cuts" is the most common first-run disappointment.

CategoryMediaKit/Video AI

Inputs (7)

NameTypeDefaultDescription
videoVIDEO
enable_clip_fadeBOOLEANfalse将检测到的淡入淡出片段作为独立切片。
segment_thresholdFLOAT00–99切分敏感度阈值;0 表示使用算法默认值。
min_durationFLOAT00–7200单个切片最小时长(秒);0 表示默认。
max_durationFLOAT00–7200单个切片最大时长(秒);0 表示默认。
poll_interval_secondsINT102–60
max_poll_attemptsINT7201–5000

Outputs (2)

NameTypeDescription
scenes_jsonSTRING
raw_jsonSTRING