MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / __init__

Method __init__

scenedetect/_cli/context.py:81–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

79 """
80
81 def __init__(self):
82 # State:
83 self.config: ConfigRegistry = USER_CONFIG
84 self.quiet_mode: bool | None = None
85 self.scene_manager: SceneManager | None = None
86 self.stats_manager: StatsManager | None = None
87 self.save_images: bool = False # True if the save-images command was specified
88 self.save_images_result: ty.Any = (None, None) # Result of save-images used by save-html
89
90 # Input:
91 self.video_stream: VideoStream | None = None
92 self.load_scenes_input: str | None = None # load-scenes -i/--input
93 self.load_scenes_column_name: str | None = None # load-scenes -c/--start-col-name
94 self.start_time: FrameTimecode | None = None # time -s/--start
95 self.end_time: FrameTimecode | None = None # time -e/--end
96 self.duration: FrameTimecode | None = None # time -d/--duration
97 self.frame_skip: int | None = None
98
99 # Options:
100 self.drop_short_scenes: bool | None = None
101 self.merge_last_scene: bool | None = None
102 self.min_scene_len: FrameTimecode | None = None
103 self.default_detector: tuple[type[SceneDetector], dict[str, ty.Any]] | None = None
104 self.output: str | None = None
105 self.stats_file_path: str | None = None
106
107 # Output Commands (e.g. split-video, save-images):
108 # Commands to run after the detection pipeline. Stored as (callback, args) and invoked with
109 # the results of the detection pipeline by the controller.
110 self.commands: list[tuple[ty.Callable, dict[str, ty.Any]]] = []
111
112 def add_command(self, command: ty.Callable, command_args: dict[str, ty.Any]):
113 """Add `command` to the processing pipeline. Will be called after processing the input."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected