All constants are in config

This commit is contained in:
2026-05-20 14:00:11 +02:00
parent 6a0259c6cf
commit b4daa28354
7 changed files with 96 additions and 23 deletions

View File

@@ -6,10 +6,17 @@ from pathlib import Path
import cv2
def load_frames(zip_path: Path, max_frames: int, display_max: int, fps_fallback: int):
video_bytes = zipfile.ZipFile(zip_path).read("left.mp4")
def load_frames(
zip_path: Path,
max_frames: int,
display_max: int,
fps_fallback: int,
video_in_zip: str = "left.mp4",
video_tmp_suffix: str = ".mp4",
):
video_bytes = zipfile.ZipFile(zip_path).read(video_in_zip)
with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as f:
with tempfile.NamedTemporaryFile(suffix=video_tmp_suffix, delete=False) as f:
f.write(video_bytes)
tmp_path = f.name