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

Function validate_video_path

mbench/utils.py:62–78  ·  view source on GitHub ↗

Validate that a video file exists and has a supported extension Args: video_path: Path to video file Returns: True if valid, False otherwise

(video_path: str)

Source from the content-addressed store, hash-verified

60
61
62def validate_video_path(video_path: str) -> bool:
63 """
64 Validate that a video file exists and has a supported extension
65
66 Args:
67 video_path: Path to video file
68
69 Returns:
70 True if valid, False otherwise
71 """
72 if not os.path.exists(video_path):
73 return False
74
75 valid_extensions = {'.mp4', '.avi', '.mov', '.mkv', '.wmv', '.flv'}
76 extension = Path(video_path).suffix.lower()
77
78 return extension in valid_extensions
79
80
81def create_video_info_dict(video_path: str, prompt: str, dimensions: List[str]) -> Dict[str, Any]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected