---
name: jilaoshi-video-workflow
description: "吉老师中文口播混剪视频完整制作工作流。收到定稿文案和配音后，用于全网搜索相关视频素材、名人采访优先匹配、逐字字幕对齐、素材去重防循环、9:16主体感知裁成4:3、3:4黑色画布包装、黑金封面、4K输出、背景音乐混音和剪映可编辑草稿交付。用户提到文案配音成片、吉老师视频、全网找素材、字幕对齐、3:4视频、4:3画面、黑金封面或剪映草稿时使用。"
agent_created: true
---

# 吉老师视频完整制作工作流

## Mission

Given the user's final Chinese script and voiced audio, autonomously deliver:

1. One latest `2160x2880`, 25 fps MP4 with a black `3:4` canvas and a clean `2160x1620` `4:3` picture window.
2. One black-gold cinematic `3:4` cover, saved separately and embedded as video frame 0.
3. Exact one-line Chinese captions synchronized to the narration.
4. Unique downloaded sources, clean ordered 4:3 clips, source manifest, shotlist, and QA reports.
5. An editable Jianying/CapCut draft when the local draft helper is available.

Read [runtime-and-tools.md](references/runtime-and-tools.md) at the start of the first production on a machine. Read [production-workflow.md](references/production-workflow.md) before editing. Read [jianying-draft.md](references/jianying-draft.md) when an editable draft is requested. Read [delivery-checklist.md](references/delivery-checklist.md) before reporting completion.

## Input Contract

Required:

- Final script supplied by the user.
- Final narration audio supplied by the user.

Reuse when discoverable:

- The user's fixed BGM.
- The latest approved 吉老师 cover as the Image2 style reference.
- The user's `俪金黑` font file.
- The local Jianying draft helper.

Do not ask for values that can be discovered locally. Ask only when a required asset is genuinely missing and no safe fallback exists.

## Non-Negotiable Rules

### Timing And Captions

- Narration audio is the only timeline backbone. Measure its real duration first.
- ASR provides timing only. Caption text must come from the user's original script.
- Remove punctuation and whitespace from displayed captions, but preserve every spoken character.
- Split at real pauses, breaths, sentence endings, or short semantic beats.
- Every caption is one line. Adjacent captions never overlap.
- Concatenate all caption text and compare it with the punctuation/whitespace-stripped script; require exact equality.
- Find the longest caption, make it nearly fill the width with about one or two Chinese characters of side space, then use that same font size for every caption.

### Shot Planning And Sources

- Build the complete duration-first shotlist before searching or downloading.
- Use roughly one visual for one or two closely related sentences; prefer an average hold of about 5-8 seconds unless speech rhythm requires otherwise.
- A requested 5-second shot needs a source at least 5 seconds long. Trim a stronger continuous range from a longer source.
- If no long-enough source exists, slow one short clip once, normally to `0.5x-0.6x`, then trim. Never loop it.
- Never repeat, ping-pong, freeze-extend, concatenate a moving clip with itself, or reuse the same source content under another filename.
- Validate content hashes, not filenames. Each shot must have one unique source-content identity.
- Save every downloaded source inside the current episode folder.

### Named People And Semantic Matching

- Before general search, extract all named people, quoted speakers, events, books, speeches, interviews, and explicit sources.
- When a public figure is named, source in this order: exact speech/interview/event; another directly relevant real video of that person; general real video of that person; one or two accurate stills; semantically related footage; clean establishing shot.
- Video is primary. Do not replace available relevant real-person footage with easy generic stock.
- Every visual must support the actual spoken sentence, not merely the broad topic.
- Record the public source page and rights/license note. Prefer licensed stock, public-domain, official/public material, user-authorized assets, or generated alternatives for the delivered edit.

### Clean 4:3 Picture Assets

- Ordered visual clips are clean `2160x1620`, 25 fps, without title, captions, black canvas, source label, watermark, platform UI, or original subtitles.
- For `9:16` or other portrait footage, crop around the person or main action into a true `4:3` frame.
- If the person is centered, use a centered crop. If off-center, move the crop to preserve face, hands, product, and action.
- Do not default to blurred side pillars. Blur-fill is a documented last resort only when a meaningful 4:3 crop would destroy essential content.
- Inspect people for cropped eyes, malformed anatomy, awkward body outlines, conflicting perspective, or suggestive framing.

### Packaging And Typography

- Final canvas: black `2160x2880`, 25 fps.
- Middle picture: `2160x1620`, approximately `x=0, y=580`.
- Two-line title appears once in the top black area, never burned into each source clip.
- Main caption sits inside the lower edge of the 4:3 picture, not in the lower black band.
- Title and captions use `俪金黑` when available; otherwise use the closest heavy Chinese black-font fallback and record it.
- Captions are white with a strong black outline; selected keywords may be gold. Avoid a large opaque caption box.
- Add small `来源网络` at the lower-left of the picture as a separate overlay/track.

### Cover Identity

- Use Image2/image generation with the latest approved cover as a style reference.
- Keep the fixed black-gold cinematic poster system: oversized tightly stacked Chinese headline in the upper half; first row distressed orange-gold; following rows distressed white; hard black extrusion/shadow; new realistic episode-specific person and metaphor below; compact orange-gold line at the bottom.
- Reject plain centered two-line typography, PPT layouts, cards, unrelated poster styles, cropped eyes, malformed hands, inconsistent ground planes, and incoherent perspective.
- Save the approved cover at the episode root and `08_封面/封面.png`; embed that exact file as frame 0.

### Audio

- Preserve the supplied narration; do not introduce hiss through unnecessary processing.
- Make narration forward and loud, with compression/limiting and no clipping.
- Start BGM around `0.08-0.14`; duck it under speech. BGM may loop, visuals may not.
- Measure the final mix. Use approximately `-16 to -14 LUFS` integrated and true peak no higher than `-1 dBFS` as a practical target unless the user specifies otherwise.

## Required Execution Sequence

1. Run `scripts/check_runtime.py` and resolve missing core tools.
2. Create the episode structure with `scripts/create_episode.py` or the same folder contract.
3. Audit narration quality and lock duration.
4. Transcribe with word timestamps; align timing back to the exact original script.
5. Generate captions and run `scripts/validate_captions.py`.
6. Build the complete duration-first shotlist from the embedded template in [templates.md](references/templates.md).
7. Perform named-person/source audit and search one source per shot.
8. Download, inspect, hash, and record each source.
9. Trim/reframe/slow once into clean ordered 4:3 clips.
10. Run `scripts/validate_shotlist.py`; stop and fix every failure.
11. Assemble the clean visual master and apply a restrained dark cinematic grade.
12. Generate the approved black-gold cover and inspect faces, hands, text, and perspective.
13. Package title, captions, source label, cover frame 0, narration, and ducked BGM into the 4K MP4.
14. Generate and sync the editable Jianying draft when supported.
15. Extract contact sheets and inspect the beginning, named-person shots, portrait crops, middle sections, and ending.
16. Verify format, duration, caption exactness, source uniqueness, zero loops, audio loudness, and draft contents.
17. Remove superseded public-facing exports. Keep one latest root-level MP4.

Do not stop at a plan when the user has supplied the script and audio. Continue through production, validation, final MP4, cover, and draft unless the user pauses the work.

## Tool Routing

- `ffmpeg` / `ffprobe`: mandatory media inspection, trimming, crop, scale, grade, mix, packaging, frame extraction, and validation.
- `yt-dlp` plus `video-downloader`: public video search/download and browser fallback.
- `transcribe` or local Whisper/faster-whisper: word/phrase timestamps.
- `video-use`: practical cutting, captioning, color, and media operations when available.
- `imagegen` / Image2: cover generation and still-image fallback only after suitable video search fails.
- HyperFrames: optional designed motion graphics, title/overlay animation, or authored visual scenes. Read its skill before use.
- Remotion: optional reusable React-based packaging/template pipeline. Do not require it for ordinary FFmpeg production.
- Jianying helper: optional but required for editable draft delivery when installed.

Use the best available route; missing optional plugins must not block the final MP4. Missing `ffmpeg`, `ffprobe`, a timing-capable transcription route, or image generation for the cover is a real blocker unless an equivalent is available.

## Validation Commands

```bash
python3 scripts/validate_captions.py \
  --script "/absolute/path/原文.txt" \
  --timing-json "/absolute/path/字幕时间码.json"

python3 scripts/validate_shotlist.py \
  --csv "/absolute/path/镜头表.csv" \
  --source-root "/absolute/path/03_素材/下载素材"
```

The final reports must show:

- exact caption character match
- one-line caption count with zero overlap
- shot count equals unique source-content count
- duplicate source-content groups `0`
- visual loop count `0`
- every source has enough effective duration
- final `2160x2880`, 25 fps, audio/video streams present
- frame 0 matches the approved cover
- Jianying draft visual count matches the current shot count when a draft is delivered

## Delivery

Return clickable paths to:

- latest root-level final MP4
- root-level `封面.png`
- editable Jianying draft location, if generated
- source manifest and shotlist
- SRT/timing JSON
- no-loop and final QA reports

Also report duration, resolution, shot count, caption count, named-person real-video count, BGM level, integrated loudness, true peak, and any documented fallback.
