Refactor CLI and add preprocessing pipeline
- New CLI structure: -p project, -a action (required flags) - Add -i import, -f force, -v verbose, --dry-run, --no-cache options - Add preprocessor.py with chroma key filter (ProRes 4444 output) - Support background images from shared_assets folder - Support video metadata JSON files (talkinghead.json) - Add validation for preprocessed output before render - Update gnommo.sh with import command and new CLI interface - Fix Python 3.9 compatibility (Optional[] instead of | None) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+20
-4
@@ -74,12 +74,28 @@ def validate_project(
|
||||
project_path / "videos.json"
|
||||
))
|
||||
|
||||
# Check background video exists (if specified)
|
||||
if config.background_video:
|
||||
bg_path = project_path / config.background_video
|
||||
# Check preprocessed output exists if preprocessing is defined
|
||||
if video_source.preprocess and video_source.output_file:
|
||||
output_path = project_path / video_source.output_file
|
||||
if not output_path.exists():
|
||||
issues.append(ValidationIssue(
|
||||
f"Preprocessed output not found: {video_source.output_file}. "
|
||||
f"Run with -a preprocess first.",
|
||||
project_path / "videos.json"
|
||||
))
|
||||
|
||||
# Check background exists (image or video)
|
||||
# Try 'background' first, fall back to deprecated 'background_video'
|
||||
bg_file = config.background or config.background_video
|
||||
if bg_file:
|
||||
# Check in project folder first, then parent (for shared_assets)
|
||||
bg_path = project_path / bg_file
|
||||
if not bg_path.exists():
|
||||
# Try parent directory (shared_assets at repo root)
|
||||
bg_path = project_path.parent / bg_file
|
||||
if not bg_path.exists():
|
||||
issues.append(ValidationIssue(
|
||||
f"Background video not found: {config.background_video}",
|
||||
f"Background not found: {bg_file}",
|
||||
project_path / "project.json"
|
||||
))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user