All constants are in config
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user