blender-motion-state-inspection
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
Rewrites short user ideas into detailed, structured, single-paragraph prompts for streaming (indefinitely extending, chunk-by-chunk) text-to-video generation. Enforces a static or subject-tracking camera that keeps the main subject centered, open-ended continuable motion, natural pace, strict input fidelity, and a fixed length band; supports single-event, batch multi-event, and sequential (interactive) multi-event rewriting with cross-event consistency, including image-to-video prompts that stay consistent with the input image, plus a rule validator and a feedback-retry loop. Use when expanding or rewriting video generation prompts, preparing prompts for streaming, long, or infinite video models or for a video that starts from an input image, writing multi-event or interactive video stories, or building an LLM prompt-rewrite pipeline for video benchmarks.
Turn a short idea (or an ordered series of event ideas) into a detailed, objective, single-paragraph video prompt that a streaming video model can keep extending indefinitely without reaching a dead end.
system_prompt.md — the full rule set. Read it before the first rewrite in a session. It doubles as a drop-in system prompt: the BASE section plus one MODE section.examples.md — worked examples for each mode, plus quick conversions. examples_CN.md is localized, not a line-by-line translation: its examples and section numbers differ, and it adds a stationary-subject single-mode example.SKILL_CN.md / system_prompt_CN.md / examples_CN.md — the same rule set in Chinese; read those instead when the output language is Chinese.scripts/validate_prompt.py — rule validator and pipeline helpers, shared by both languages (Python 3 standard library only). --lang / lang= picks the language of the reported violations; the checks themselves are language-independent.| Mode | Input | Output |
|---|---|---|
| Single | one sentence | one prompt |
| Batch multi-event | N ordered events, all known upfront | N prompts separated by a line containing only @@@EVENT_BREAK@@@ |
| Sequential (streaming) | finalized rewrites of earlier events + one new raw event | one prompt for the new event only |
Use Sequential when events arrive interactively (the next event is written after the previous one has been generated); it never looks at future events. Use Batch only when the whole sequence is known and consistency can be planned upfront.
Static or tracking camera only. Pick exactly one base behavior and state it once, verbatim:
The camera remains static, keeping <named subject> centered. (Chinese output: 镜头保持静止,始终将<主体>保持在画面中央。)The camera tracks <named subject>, continuously keeping <named subject> centered. (Chinese output: 镜头跟随<主体>移动,始终将<主体>保持在画面中央。)Use tracking when a clear main subject moves through space, and static when it is stationary or moves only within a small central area. Convert every other requested movement (pan, zoom, push/pull, dolly, tilt, crane, rise/descend, orbit, roll) to the closer of the two: "zoom in on the runner" becomes tracking, and "orbit a stationary statue" becomes static. A static camera never reframes, widens, or narrows. Viewpoint, lens, and pace words (low angle, bird's-eye, FPV, macro, fisheye, slow motion, time-lapse) may stay when the input asks for them. Do not add "tracking shot", "static shot", or "the camera follows" anywhere else, and do not put an adverb between "camera" and "tracks" (the validator won't recognize it).
Centered subject. A clear main subject (or the active group plus core action objects) stays at or near the frame center throughout; a tracking camera keeps recentering it. Close-ups are only for stationary or small-range subjects; use medium or wide shots for subjects that travel. If there is no clear main subject, use a balanced static wide shot (The camera remains static.). Never invent a subject, especially not to justify tracking.
Open-ended action. Describe ongoing, repeating, or bounded motion that stays coherent if generation continues. Never use ending language: finally, eventually, in the end, at last, concluding, concludes, to conclude, in conclusion, the end of [the interaction/scene/moment], wraps up, comes to an end/close, settles into its final state; 最后, 最终, 终于, 至此结束, 告一段落. After the opening sequence (Initially / Then / Next / As), switch to Throughout / Meanwhile / All the while / As this continues.
Natural pace by default. Unless the input names a speed, motion is real-world pace. Do not stack intensifiers (rapidly, frantically, relentlessly, explosively, in a blur); express continuity with steady, sustained, rhythmic, continuous. Summarize crowds and repeated small elements broadly instead of giving each its own motion. With a static camera and nothing else moving, the subject must still visibly move (breathing, blinking, swaying, gesturing).
Strict fidelity. Keep every entity, attribute, exact quantity, event order, requested style, and on-screen text. Never invent a protagonist or major object; never drop a named entity or group; cluster ensembles ("a cluster of spice merchants"). Plausible descriptive detail on existing entities is fine.
Style defaults to cinematic realism, even for fantastical subjects, unless the input explicitly names or implies another style. The style tag appears once, at the very end, in 3–10 words (Chinese output: about 5–15 characters; realistic default: Cinematic photography realistic style.).
Language. Chinese or English input gives same-language output; any other language gives English. On-screen text stays in the input language. Well-known franchise characters whose original name is English keep their official English name instead of a local translation.
Format. Output only the prompt: one continuous paragraph, no line breaks, no Markdown, no labels, no self-reference ("this video shows"). Length: English 150–300 words; Chinese 150–350 Chinese characters, punctuation excluded. Budget about 45% subjects, 25% background, 30% camera, lighting, composition, style, and mood. Change the band only if the target model's caption distribution differs.
The image is the first frame. It fixes the subject, its appearance, the setting, the lighting, and the composition; the prompt describes that frame and how it continues.
- [ ] 1. Identify the mode and output language; for multi-event, note the established camera setup and entity descriptions
- [ ] 2. Extract subjects, exact quantities, actions, setting, requested style/viewpoint/speed, on-screen text; with an input image, what it shows
- [ ] 3. Choose the camera: static or tracking (from the subject's movement), plus viewpoint, angle, and shot size
- [ ] 4. Choose the style (default cinematic realism) and lighting
- [ ] 5. Draft following the prompt structure
- [ ] 6. Validate, fix, and regenerate until clean (at most 3 attempts)
- [ ] 7. Output only the final prompt(s)
When a shell is available, run the validator on the draft:
python scripts/validate_prompt.py prompt.txt # single or sequential output
python scripts/validate_prompt.py response.txt --batch 3 # batch output, 3 events expected
echo "<prompt>" | python scripts/validate_prompt.py -
Exit code 0 means pass. It checks: non-empty, length band, single paragraph, no wrapper or label, no ending language, no self-reference, no camera trajectory other than static or tracking and no static reframing (a motion word that describes the subject, as in "keeping the narrowing waterfall centered", is not a camera move), exactly one camera statement (static and tracking never mixed), a tracking camera that explicitly keeps the subject centered (unless the text describes a frame exit), and (in batch mode) exactly N parts. Options: --lang {en,zh}, --no-length, --min-words/--max-words/--min-chars-zh/--max-chars-zh, --json.
Without a shell, apply the same checks by hand. Either way, also check what the script cannot see: fidelity (no invented or dropped entities, exact counts), static vs. tracking matching the subject's movement, the named subject in the camera sentence, identity re-anchoring, the style tag at the end, natural pace, visible subject motion under the static camera, cross-event consistency and pronouns, and, for image-to-video, consistency with the input image.
On failure, regenerate the complete prompt with this block appended to the request:
VALIDATION FEEDBACK FROM THE PREVIOUS ATTEMPT:
- <violation 1>
- <violation 2>
Regenerate the complete output and correct every issue above.
Stop after 3 quality attempts and report the failure rather than returning a prompt that still violates the rules.
BASE plus one of MODE: SINGLE, MODE: BATCH, or MODE: SEQUENTIAL from system_prompt.md. If the API has no system role, prepend it to the user message.Event 1: ... lines, one per event. Sequential mode uses this template:PREVIOUS EVENTS (already finalized, read-only context — do NOT rewrite or repeat these):
Event 1 (already rewritten, finalized): <rewritten prompt 1>
Event 2 (already rewritten, finalized): <rewritten prompt 2>
NEW EVENT TO REWRITE:
<raw new event>
Rewrite ONLY the new event above into one complete prompt, following the Multi-Event Streaming Mode rules.
For the first event, replace the history block with PREVIOUS EVENTS (already finalized): None — this is the first event in the sequence.
BASE. Attach the image to the user message when the model accepts images; otherwise add what the user says about the image to the raw sentence.scripts/, or add it to sys.path):from validate_prompt import (
build_system_prompt, build_streaming_user_message, build_batch_user_message,
rewrite_with_validation,
)
system = build_system_prompt("sequential")
history = []
for event in events:
prompt = rewrite_with_validation(call_llm, system, build_streaming_user_message(history, event))
if prompt is None:
raise RuntimeError(f"Rewrite failed validation: {event}")
history.append(prompt)
call_llm(system_prompt, user_message) -> str wraps whatever model or API is in use. For batch mode, pass expected_count=N to get back a list of prompts.
movieroll.generate reads one row per sample: index, an integer seed, and either a prompt column (single event) or event_1, event_2, … holding the N prompts of a batch or sequential run in order (see example/multi_event_base.csv). The video is split evenly across the events; there are no timestamp columns. Optional columns: global_content_prompt and global_quality_prompt, used only when both exist, are joined around every event as global_content event global_quality; the rewritten prompts are already complete, so they can be left out. input_image is a path relative to the CSV's directory; an empty cell means text-to-video, and one run must be all image-to-video or all text-to-video. Write the file with a CSV writer, since the prompts contain commas.
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
ANanthropics/skills203k近 7 天新增 3,265 个 star
HAharry0703/MoneyPrinterTurbo147k近 7 天新增 1,608 个 star
SHShubhamsaboo/awesome-llm-apps147k近 7 天新增 907 个 star
GAgarrytan/gstack143k近 7 天新增 598 个 star