AI Video Full Workflow (Codex Director's Cut)
This workflow solves one problem: produce a satisfying AI video from an idea with minimal cost and the lowest possible failure rate. The method is derived from Eian's practical article (x.com/EianLu/article/2118317430665613741). This skill replaces Claude with Codex as the director—you only have Codex, so let Codex handle everything from start to finish: write the story, write prompts, draw images, and write post-production code.
Core Principle: Catch Errors Before Spending Money
The cost ladder determines the order of all work:
- Changing a few prompt words: nearly free
- Redrawing an image: no extra cost
- Regenerating a video: pay per second (2.5 approx. ¥1.5/second, 2.0 mini approx. ¥0.5/second, 720p)
Therefore: Errors found in text should not make it to images; errors found in images should not make it to videos. Every step has its own independent checkpoint. Only when the previous level says "passed" can you proceed to the next.
Division of Roles
| Role | Responsibility |
|---|---|
| Me (Human) | Choose direction, confirm style, approve spending, review motion, listen to audio |
| Codex (Director + Artist) | Write story and storyboard, write all prompts, use its own image generation tool to create style/concept images, sample frames, start/end frames, perform frame-by-frame checks, write ffmpeg/Python post-production code |
| Seedance (Animator) | Turn start/end frames into several seconds of video |
| Independent Review Session | Open a brand-new session for each checkpoint. Only provide materials, no conclusions. Only point out errors, never modify files. |
Independent review is the secret to the low failure rate: the main session has been chatting with you for a long time, knows what you want to say, and tends to auto-complete when reviewing materials. A new session knows nothing; whatever it finds confusing indicates a genuine lack of clarity. The review session only gets the current checkpoint's materials, no conclusions, and no other files.
Environment Check (First Task Before Starting)
Run python scripts/env_check.py to check for codex, ffmpeg, Python ≥3.9, and the environment variable ARK_API_KEY. If anything is missing, tell the user to install it first.
Create a new project folder and put all files inside. Recommended structure:
project_folder/
├── 00-story/ # Story, storyboard
├── 01-style/ # Style, concept art
├── 02-frames/ # Start/end frames for each shot
├── 03-prompts/ # Video prompts for each segment
├── 04-videos/ # Generated clips (keep all old versions)
├── 05-post/ # Post-production intermediate files, final output
└── review-log.md # Review conclusions and cost records for each checkpoint
Getting Started Prompt
Send the full content of templates/00-director.md to Codex to start the project. It will first ask you about video length, aspect ratio, total budget, music and subtitles, then run the environment check. After that, communicate only with Codex throughout the entire process.
Eight-Step Workflow
Each step specifies: What to do → Which template to use → Passing criteria.
Step 1: Idea → Complete Storyline
- Share the initial idea with Codex, discuss until the story outline is finalized. The preferred story structure is episodic (segments don't need to connect seamlessly, the most stable). Continuous narratives are most prone to continuity errors.
- 5 criteria for a good story: ① Logically consistent (ask "why does this happen?" for every twist; where do things come from? Can you reach them?) ② Can be summarized in one sentence ③ Grabs attention from the start ④ Other characters react like real people (separate each twist into 3 parts: problem → how the protagonist solves it → how others react; reactions must have a clear sequence) ⑤ The visuals can be generated by AI (avoid the weakness list: crossed limbs, hands holding small objects, text, mirror reflections, left-right asymmetry, changing light within a single shot, a character performing three consecutive actions, top-down shots where faces aren't visible, too many minor characters).
- Template: Fill in
templates/01-story.mdand send to Codex. - Pass: Open a new review session, provide only the finalized story, use
templates/02-story-review.mdto review, and get a "passed" verdict.
Step 2: Storyboard (Most Important Early Stage – Composition and Color Matter More Than the Plot)
- For each shot, specify: time within the video, duration in seconds (round up, add 0.5 seconds buffer), shot scale, camera position, camera movement, who moves where (describe screen left/right), what emotion drives the action, what is moving, how to transition to the next shot.
- 6 hard requirements: ① Change the angle for each shot; eye-level frontal shots can appear at most twice in the entire video ② Something should always be moving on screen ③ Alternate between full-body, mid-shot, and close-up ④ At least one thing moves in each shot; it should move when expected and be still when expected ⑤ Camera movement must have a reason (following something, slowly pushing in, pulling out) ⑥ Golden ratio composition; the subject's head or eyes should fall at 38% or 62% from the left.
- Design color schemes separately; list the color palette for each scene. Check the image in black and white; if the character and background are indistinguishable, redesign the color scheme.
- If there are reference clips, have Codex measure camera positions and entry/exit frame proportions frame by frame, then imitate.
- Template:
templates/03-storyboard.md. - Pass: Provide the user with a color block sketch overview (1920×1080 with 38%/62% markings) for confirmation.
Step 3: Define Style, Create Concept Art
- Reference images are best; just provide them. Codex writes prompts and draws them; the user only checks the style.
- For each character and fixed prop, create a concept sheet: front view, side view, several expressions. Fix characteristic details explicitly (e.g., "tattoo is on the left arm").
- Pass: After the user confirms the style, only then can the official shot images be drawn.
Step 4: Generate Start/End Frames for Each Shot (Most Critical Step for Reducing Failure Rate)
- Sequence: First, have AI write down for each shot "what is in the start frame?", "what is in the end frame?", "what happens in between?", pass review before drawing (to save token usage) → First draw the most content-heavy end frame → Modify the end frame to create the start frame (to ensure consistent camera and composition) → For the same location and camera position, only apply local changes → For push-in shots, crop and enlarge a part of the start frame as the end frame → Check for 16:9 ratio and that start/end frames are the same size.
- After drawing, use
templates/04-frame-check.mdto check item by item 8 criteria (action props present in the start frame, reactions positioned in advance, poses not all the same, leave action space, consistent wind direction, check at phone size, zoom in to check for extra objects, overlay start and end frames to check for misalignment). - Small objects like rain, hats, and tattoos must be drawn in both start and end frames; just writing them in text leads to them disappearing during generation.
- Pass: All 8 checks passed, user agrees to modifications before re-editing images.
Step 5: Write Video Prompts, Review Before Submission
- Fixed seven-part structure: [Style] [Camera] [Composition and Colors] [Characters] [Per Second] [Sound] [Constraints] — document what happens every second. Template:
templates/05-video-prompt.md. - Before writing, consult
references/pitfall-table.mdfor 20 common mistakes—when problems arise, suspect the prompt first, then the model. - Pass: Before each submission, open a new review session, use
templates/06-pre-submit-review.mdto check every detail of the prompt and images against each other (history has caught cup size differences of 13%, a hat present in one frame but missing in another, left/right written incorrectly), write "passed" before submission, quote the price, and only proceed after user approval.
Step 6: Generate Videos
- Use
scripts/seedance.pyfor submission (720p, start/end frame mode), poll and retrieve clips. - Cost-saving tips: Output in 720p and upscale to 1080p later; don't shoot test clips—shoot the first official shot directly; for new approaches, test one or two of the hardest shots first, if they work, submit all; for tight budgets, use 2.0 mini (about 1/3 the price), sufficient for non-complex shots; listen to audio before using it (2.5 often mixes in music even when "no music" is written).
- Problem-solving sequence: ① Can it be cut out? (only problematic at the first/last few frames) ② Can it be fixed with code? ③ Only then reshoot, and first modify the prompt or start/end frames, then reshoot that single shot. Never delete old clips; choose the best from old and new later.
- Pass: User has seen the motion, listened to the audio.
Step 7: Stitching, Transitions, Color Grading, Upscaling
- All done with code; Codex writes ffmpeg/Python scripts. Template:
templates/07-postprocess.md(motion blur at transitions, split into 8–16 half-frame shutter; only adjust saturation and brightness, never change hue; BT.601 decoding for intermediate lossless, deliver as BT.709; use lanczos upscaling to 1080p with slight sharpening; beat sync only from the original track's detected beats). - After completion, spot-check 3 frames before and after each cut point.
Step 8: Full Film Review and Delivery
- Open a new review session, provide only the final video with no conclusions, let it watch from start to finish like a first-time viewer. Template:
templates/08-final-review.md. - Have Codex write a summary archive: style, prompts, mistakes made. Save it in the project folder for direct reuse in the next project.
Four-Thread Mode (Optional Advanced)
For complex projects or large budgets, send templates/09-four-threads.md to Codex: four concurrent sessions—Main Production + Review + Supervisor + Agent. The Agent can only approve submissions within the total budget. Not needed for everyday small projects; a single review session is sufficient.
Iron Rules (Enforce in All Sub-Sessions)
- Before I confirm the story, don't draw any images; before I confirm the style, don't draw official shots.
- Before submitting a video generation, an independent review must have "passed"; the quoted price must be approved by me before submission.
- If a video has issues: first try to cut it out, then fix with code, only as a last resort re-edit the script and reshoot, and only that one shot.
- Save new versions as new files; never overwrite or delete old files.
- For anything not yet seen in motion or heard in audio, explicitly tell me "not seen yet / not heard yet."
- Do not top up or purchase credits; if the API returns insufficient balance, stop and show me a rough cut of the already generated clips.
- Wait for Codex token quota to replenish; do not draw too many images at once. When modifying a small area, paste the modified part back into the original image.
File Index
templates/— 10 prompt templates numbered 00–09 corresponding to the workflow steps. Fill in[square brackets]and send.references/pitfall-table.md— 20 common model mistake checklist. Cross-check item by item when writing prompts.references/roles.md— Division of roles and four-thread role descriptions.scripts/env_check.py— Environment check.scripts/seedance.py— Seedance submission/polling/download.