Clip Feedback — Prompt Intent vs Reality
What this does
Takes a video clip plus the prompt that generated it, analyzes what the clip actually looks like (via Gemini 2.5 Pro), and returns:
- Rule violations — character names in prompt, 4th wall breaks, missing focal length, safety trigger stacking
- Intent gaps — emotion mismatch, world palette drift, shot type wrong, energy level off
- Quality issues — text overlays, CGI artifacts, motion blur, missing face
- Specific prompt fixes — exact corrections to improve the next generation
Usage
Quick rule check (no API call — instant)
python3 scripts/prompt_feedback.py \
--clip /path/to/clip.mp4 \
--prompt "the generation prompt used" \
--rules-only
Full analysis (calls Gemini 2.5 Pro — ~10s)
python3 scripts/prompt_feedback.py \
--clip /path/to/clip.mp4 \
--prompt "the generation prompt used" \
--source veo
Supported sources: veo, seedance, kling, runway, or any label.
From a prompt file
python3 scripts/prompt_feedback.py \
--clip /path/to/clip.mp4 \
--prompt-file /path/to/prompt.txt \
--source seedance
JSON output (for piping to other tools)
python3 scripts/prompt_feedback.py \
--clip /path/to/clip.mp4 \
--prompt "..." \
--json
When the user says "check the clip"
- Ask which clip (path) if not obvious from context
- Ask for or find the prompt that generated it
- Run
--rules-onlyfirst for instant feedback - If the user wants deeper analysis, run the full version
- Present the feedback summary and suggested fixes
- Offer to apply the fixes and regenerate
What it checks (canonical rules)
| Rule | What it catches |
|---|---|
| No character names | "Jane" → should be "the daughter" |
| No 4th wall | "looking at camera" → eyeline off-camera |
| No resolution text | "2K" in prompt → handled by tool settings |
| No music/dialogue | "music" in prompt → add to avoid line |
| Safety stacking | 3+ trigger words in one sentence → split |
| Focal length required | Missing "85mm, f/1.4" → add lens spec |
| Material descriptors | No textures → add tactile nouns |
| World palette | Palette drift → strengthen palette direction |
| Emotion match | Prompt says "dread", clip reads "calm" → add atmosphere cues |
| Quality flags | Text overlays, CGI glow, motion blur → add negative prompts |
Configuration
Configure your canonical rules in reference/prompt-rules.md. Each rule gets:
- A pattern (regex or keyword list) to detect violations in prompts
- A fix template (the correction to suggest)
- A severity (block / warn / info)
Dependencies
- Python 3.10+
google-generativeaifor Gemini analysisffmpegon PATH for frame extraction
Setup
pip install google-generativeai pillow
export GEMINI_API_KEY=your_key_here