(
ctx: click.Context,
threshold: float | None,
weights: tuple[float, float, float, float] | None,
luma_only: bool,
kernel_size: int | None,
min_scene_len: str | None,
filter_mode: str | None,
)
| 608 | ) |
| 609 | @click.pass_context |
| 610 | def detect_content_command( |
| 611 | ctx: click.Context, |
| 612 | threshold: float | None, |
| 613 | weights: tuple[float, float, float, float] | None, |
| 614 | luma_only: bool, |
| 615 | kernel_size: int | None, |
| 616 | min_scene_len: str | None, |
| 617 | filter_mode: str | None, |
| 618 | ): |
| 619 | ctx = ctx.obj |
| 620 | assert isinstance(ctx, CliContext) |
| 621 | detector_args = ctx.get_detect_content_params( |
| 622 | threshold=threshold, |
| 623 | luma_only=luma_only, |
| 624 | min_scene_len=min_scene_len, |
| 625 | weights=weights, |
| 626 | kernel_size=kernel_size, |
| 627 | filter_mode=filter_mode, |
| 628 | ) |
| 629 | ctx.add_detector(ContentDetector, detector_args) |
| 630 | |
| 631 | |
| 632 | DETECT_ADAPTIVE_HELP = """Find fast cuts using diffs in HSL colorspace (rolling average). |
nothing calls this directly
no test coverage detected