Inital Commit
This commit is contained in:
15
modules/format_utils.py
Normal file
15
modules/format_utils.py
Normal file
@ -0,0 +1,15 @@
|
||||
import os
|
||||
|
||||
def detect_format_from_filename(clip_path):
|
||||
"""
|
||||
Determines if a clip is 'wide' or 'vertical' based on its filename.
|
||||
|
||||
Rules:
|
||||
- Filenames ending in -vert.mp4 or -vertical.mp4 → 'vertical'
|
||||
- All others → 'wide'
|
||||
"""
|
||||
filename = os.path.basename(clip_path).lower()
|
||||
if filename.endswith("-vert.mp4") or filename.endswith("-vertical.mp4"):
|
||||
return "vertical"
|
||||
return "wide"
|
||||
|
||||
Reference in New Issue
Block a user