diff --git a/services/imajin-video/service/src/config/settings.py b/services/imajin-video/service/src/config/settings.py index dcf095fb..f984746c 100644 --- a/services/imajin-video/service/src/config/settings.py +++ b/services/imajin-video/service/src/config/settings.py @@ -49,6 +49,11 @@ class Settings(BaseSettings): model_boss_timeout_s: float = 60.0 # Max concurrent per-frame scoring calls to model-boss (bounds GPU fan-out). classify_concurrency: int = 4 + # Priority sent to model-boss for frame scoring. "high" (≤5) lets the coordinator + # spawn a SECOND vision slot on the idle GPU (parallel scoring); "normal" keeps it + # to one serialized slot. High preempts normal-priority interactive vision during + # peak — deliberate: video classification is bounded, high-value work. + classify_vision_priority: str = "high" # Content-aware (scene-change) keyframe sampling — clamp band is the GPU-cost lever. classify_scene_min_keyframes: int = 3 @@ -58,6 +63,24 @@ class Settings(BaseSettings): # Sync /classify-video/sync only accepts clips up to this duration. classify_sync_max_seconds: float = 20.0 + # ---- /classify-video object-store source (decision 5 reversed for large videos) ---- + # imajin pulls video bytes from MinIO by storage_key (streamed to disk), so the + # platform never holds the full file in memory and there is no base64 size cap. + # Same MinIO the platform's image path reads (mac-sync bucket on black:9000). + minio_endpoint: str = "black.lan:9000" + minio_access_key: str = "" + minio_secret_key: str = "" + minio_bucket: str = "mac-sync" + minio_secure: bool = False + + # Server-capability bound on CONCURRENT video decodes. The throttle lives HERE, + # on the server — never on the client. This is the ceiling; it is clamped down to + # available RAM at startup (see pipeline.capability.derive_video_concurrency). + classify_video_concurrency: int = 4 + # Approx RAM headroom to reserve per concurrent decode (4K decoder + frame buffers + # + slack). The RAM clamp keeps concurrency × budget under available memory. + classify_video_ram_budget_bytes: int = 1_500_000_000 + model_config = SettingsConfigDict(env_prefix="IMAJIN_VIDEO_", case_sensitive=False)