Fix: Cloud-friendly config (max 20 shorts, no face tracking)
Browse files- backend/config.py +13 -13
backend/config.py
CHANGED
|
@@ -13,17 +13,17 @@ class Settings(BaseSettings):
|
|
| 13 |
"""Application settings loaded from environment variables."""
|
| 14 |
|
| 15 |
# Video Processing Limits
|
| 16 |
-
max_input_duration: int =
|
| 17 |
min_short_duration: int = 15
|
| 18 |
-
max_short_duration: int =
|
| 19 |
-
max_shorts: int =
|
| 20 |
-
min_shorts: int =
|
| 21 |
|
| 22 |
# Scene Detection (PySceneDetect)
|
| 23 |
scene_detection_threshold: float = 27.0
|
| 24 |
|
| 25 |
-
# Highlight Detection (
|
| 26 |
-
score_threshold: float = 4.5
|
| 27 |
|
| 28 |
# Whisper.cpp Configuration (use env vars in Docker)
|
| 29 |
whisper_bin_path: str = "/usr/local/bin/whisper"
|
|
@@ -58,15 +58,15 @@ class Settings(BaseSettings):
|
|
| 58 |
output_width: int = 1080
|
| 59 |
output_height: int = 1920
|
| 60 |
|
| 61 |
-
# V2: Caption Settings
|
| 62 |
-
caption_style: str = "
|
| 63 |
-
highlight_keywords: bool =
|
| 64 |
|
| 65 |
-
# V2: Face Tracking
|
| 66 |
-
face_tracking_enabled: bool =
|
| 67 |
|
| 68 |
-
# V2: Faster-Whisper (for
|
| 69 |
-
faster_whisper_model: str = "
|
| 70 |
|
| 71 |
class Config:
|
| 72 |
env_file = ".env"
|
|
|
|
| 13 |
"""Application settings loaded from environment variables."""
|
| 14 |
|
| 15 |
# Video Processing Limits
|
| 16 |
+
max_input_duration: int = 3600 # 1 hour max for cloud (was 2 hours)
|
| 17 |
min_short_duration: int = 15
|
| 18 |
+
max_short_duration: int = 90 # Shorter max for faster cloud processing
|
| 19 |
+
max_shorts: int = 20 # Cloud friendly limit (was 150!)
|
| 20 |
+
min_shorts: int = 5 # Minimum shorts to aim for
|
| 21 |
|
| 22 |
# Scene Detection (PySceneDetect)
|
| 23 |
scene_detection_threshold: float = 27.0
|
| 24 |
|
| 25 |
+
# Highlight Detection (higher = more selective)
|
| 26 |
+
score_threshold: float = 6.0 # Only best clips (was 4.5)
|
| 27 |
|
| 28 |
# Whisper.cpp Configuration (use env vars in Docker)
|
| 29 |
whisper_bin_path: str = "/usr/local/bin/whisper"
|
|
|
|
| 58 |
output_width: int = 1080
|
| 59 |
output_height: int = 1920
|
| 60 |
|
| 61 |
+
# V2: Caption Settings (use simple for cloud stability)
|
| 62 |
+
caption_style: str = "simple" # "simple" for cloud (trendy needs more RAM)
|
| 63 |
+
highlight_keywords: bool = False
|
| 64 |
|
| 65 |
+
# V2: Face Tracking (DISABLED for cloud - very CPU heavy)
|
| 66 |
+
face_tracking_enabled: bool = False
|
| 67 |
|
| 68 |
+
# V2: Faster-Whisper (tiny for cloud speed)
|
| 69 |
+
faster_whisper_model: str = "tiny" # tiny for speed (was base)
|
| 70 |
|
| 71 |
class Config:
|
| 72 |
env_file = ".env"
|