ractogateway.pipelines.video_processor._loader

Unified video source resolver for VideoProcessorPipeline.

Accepts five input types:
  • str / Path : local file path -OR- http/https URL -OR- YouTube URL

  • bytes : raw video buffer → written to a temp file

  • list[str|Path]: pre-extracted frame image paths (skips extraction step)

ractogateway.pipelines.video_processor._loader.resolve_video_source(source)[source]

Resolve any supported video source into a concrete path or frame list.

Return type:

tuple[Path | None, list[Path] | None]

Returns:

  • (video_path, None) – For file-path / URL / bytes inputs — caller should use video_path with OpenCV.

  • (None, frame_paths) – For pre-extracted frame lists — caller skips OpenCV extraction entirely.