darwin.extractor package

Submodules

darwin.extractor.video module

darwin.extractor.video.extract_artifacts(source_file: str, output_dir: str, storage_key_prefix: str, *, fps: float = 0.0, segment_length: int = 2, repair: bool = False) Dict[source]

Extracts video artifacts including segments, frames, thumbnail for read-only registration in the Darwin platform.

Parameters:
  • source_file – Path to source video file

  • output_dir – Directory to store generated artifacts

  • storage_key_prefix – Prefix for storage keys

  • fps – Desired frames per second (0.0 for native fps), defaults to 0.0

  • segment_length – Length of each segment in seconds, defaults to 2

  • repair – If True, attempt to repair video if errors are detected, defaults to False

Returns:

Dict containing metadata and paths to generated artifacts

Raises:

FileNotFoundError – If source_file does not exist

Module contents

Video extraction functionality for Darwin.