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)
| 60 | |
| 61 | |
| 62 | def 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 | |
| 81 | def create_video_info_dict(video_path: str, prompt: str, dimensions: List[str]) -> Dict[str, Any]: |
nothing calls this directly
no outgoing calls
no test coverage detected