MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / get_video_properties

Function get_video_properties

motion_rep/motion_checker.py:50–59  ·  view source on GitHub ↗

Extract width, height, and fps from video file.

(video_path: str)

Source from the content-addressed store, hash-verified

48
49
50def get_video_properties(video_path: str) -> Tuple[int, int, int]:
51 """Extract width, height, and fps from video file."""
52 cap = cv2.VideoCapture(video_path)
53 if not cap.isOpened():
54 raise ValueError(f"Cannot open video file: {video_path}")
55 width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
56 height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
57 fps = int(cap.get(cv2.CAP_PROP_FPS))
58 cap.release()
59 return width, height, fps
60
61
62def get_R_T(

Callers 1

motion_visFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected