fix(reframe): lower SCENE_MIN_SEC default 1.0s -> 0.4s
A/B audit on 10 topic-diverse clips showed the 1s merge deleted real sub-second shots in fast-cut content (10/13 lost real cuts in gaming, 9/10 in anime, 5/8 in music videos were present in the raw TransNetV2 output and removed by the merge). 0.4s still kills flash/single-frame scenes and snap bursts without eating real fast cuts.
This commit is contained in:
parent
36cf6d33b1
commit
ef43c282c7
1 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ case can never kill a job.
|
||||||
Environment variables:
|
Environment variables:
|
||||||
SCENE_ENGINE "transnetv2" (default) | "pyscenedetect" (legacy)
|
SCENE_ENGINE "transnetv2" (default) | "pyscenedetect" (legacy)
|
||||||
SCENE_MIN_SEC minimum scene length in seconds; shorter scenes are
|
SCENE_MIN_SEC minimum scene length in seconds; shorter scenes are
|
||||||
merged into a neighbor (default 1.0, TransNetV2 path
|
merged into a neighbor (default 0.4, TransNetV2 path
|
||||||
only — the legacy path stays untouched)
|
only — the legacy path stays untouched)
|
||||||
TRANSNETV2_THRESHOLD shot-boundary probability threshold (default 0.5)
|
TRANSNETV2_THRESHOLD shot-boundary probability threshold (default 0.5)
|
||||||
TRANSNETV2_DEVICE torch device: "auto" (default) | "cpu" | "cuda" | "mps"
|
TRANSNETV2_DEVICE torch device: "auto" (default) | "cpu" | "cuda" | "mps"
|
||||||
|
|
@ -119,7 +119,7 @@ def _detect_transnetv2(video_path):
|
||||||
if total_frames > bounds[-1][1]:
|
if total_frames > bounds[-1][1]:
|
||||||
bounds[-1] = (bounds[-1][0], total_frames)
|
bounds[-1] = (bounds[-1][0], total_frames)
|
||||||
|
|
||||||
min_sec = float(os.environ.get("SCENE_MIN_SEC", "1.0"))
|
min_sec = float(os.environ.get("SCENE_MIN_SEC", "0.4"))
|
||||||
bounds = _merge_short_scenes(bounds, fps, min_sec)
|
bounds = _merge_short_scenes(bounds, fps, min_sec)
|
||||||
|
|
||||||
scene_list = [(FrameTimecode(s, fps), FrameTimecode(e, fps))
|
scene_list = [(FrameTimecode(s, fps), FrameTimecode(e, fps))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue