youtube-skill/skills/china-yt-longform/SKILL.md
Eric 905eb9a83e Require scene-locked SRT so narration stays A/V synced.
Forbid whole-timeline stretch that drifts ahead of the picture; name on-screen details only after they are visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-24 14:57:07 +08:00

160 lines
8.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: china-yt-longform
description: >-
Batch-produce Alone-in-China YouTube long-form assets from raw mp4 dumps or
themed folders: analyze footage, split into per-video folders (prefer 8–15 min
when natural — never pad unrelated clips), CapCut-safe EN SRT woven to food /
life-in-China citywalk beauty / YouTube money, ≥3 A/B-test covers with
photographic super-res HD, titles. Use when the user mentions 剪辑, 长视频,
封面, 字幕, SRT, CapCut 朗读, Alone in China, 夜市, 街拍, 骑行, V3批次, 素材,
分集, A/B, 超分, YT_COVER, YT_CAPTIONS, probe_durations, validate_deliverables,
or drops a folder of mp4s for YouTube upload.
---
# China YT Long-form Batch Ops
Pack root = parent of `.cursor/skills/china-yt-longform` (or ask user).
Human SOP: `README.md` · Details: [reference.md](reference.md)
Scripts: `scripts/probe_durations.py`, `validate_deliverables.py`, `new_batch.py`, `_gen_srt_copy.py`, `_make_covers_v4.py`
## Channel cores (hard — every SRT / title / description)
Weave **all three** into narration (match real footage first, then steer):
1. **Food** — street food, canteen, menus, prices, steam, orders
2. **Life in China** — citywalk POV, scooters, neon, **real street beauty/faces** (tasteful; no creepy framing)
3. **YouTube money** — channel ops, consistency, watch time, how the channel changed life / honest income talk (no fake flex)
Do **not** ignore the picture to force a pillar. Ground lines in what is on screen, then connect to the cores.
## Deliverables (each media subfolder = one upload)
| File | Role |
|------|------|
| `*.mp4` (1+) | Source clips for this one video (CapCut timeline order ≈ name/time order) |
| `YT_CAPTIONS_EN.srt` | EN CapCut 朗读 TTS |
| `YT_COVER.jpg` | A — default thumbnail 1280×720 |
| `YT_COVER_B.jpg` | B — A/B test variant 1280×720 |
| `YT_COVER_C.jpg` | C — A/B test variant 1280×720 |
| `YT_TITLES.txt` | 5 EN titles + description + tags |
**≥3 covers required** (A/B/C) for YouTube thumbnail experiments. Extra `YT_COVER_D.jpg`… OK.
`YT_COVER_ALT.jpg` is legacy alias for B — prefer `YT_COVER_B.jpg`.
**One subfolder = one YT video.** Multiple mp4s in a folder = concat by summed duration.
`_` / `.` prefixed dirs = tools/cache, not media.
## Duration policy (prefer 8–15 min — never 硬凑)
- **Prefer** ~8–15 min per folder when clips **naturally** form a coherent scene/theme/time block.
- **Do not** glue unrelated scenes just to hit 8 min.
- **Do not** split a tight coherent story just to avoid going over 15 if a clean split would hurt (prefer a clean thematic cut; ~16–18 min OK if one continuous scene).
- **Short packs OK** (e.g. 5–7 min) when that is the real material — label honestly in titles; tell the user.
- **Long continuous clips** (>15–20 min): split on scene/location/time boundaries, not arbitrary clock cuts mid-action.
- Target band is a **guide for upload strategy**, not a padding rule.
## Workflow
### A) Flat mp4 dump (common: `V3YYYY-MM-DD…` with dozens of clips)
```
- [ ] 1. List / ffprobe all root *.mp4 (duration + time-of-day from filename)
- [ ] 2. Sample mid-frames (ffmpeg) → cluster by time + scene (ride / street / food / canteen / night…)
- [ ] 3. Create numbered theme folders; MOVE clips in (same-drive rename). Write _BATCH_PLAN.txt
- [ ] 4. python scripts/probe_durations.py <batch>
- [ ] 5. Copy/edit _gen_srt_copy.py + _make_covers_v4.py into batch root for THIS footage
- [ ] 6. CapCut-safe EN SRT (dense) + YT_TITLES — 3 cores + real content
- [ ] 7. ≥3 covers A/B/C from REAL frames + photographic super-res HD
- [ ] 8. python scripts/validate_deliverables.py <batch> → must pass
```
Folder naming example: `01_night_scooter_ride`, `05_food_street_walk` — sortable, theme-clear for CapCut.
### B) Already-foldered batch
```
- [ ] 1. python scripts/probe_durations.py <batch>
- [ ] 2. CapCut-safe EN SRT (dense)
- [ ] 3. YT_TITLES.txt
- [ ] 4. ≥3 covers A/B/C + super-res HD
- [ ] 5. python scripts/validate_deliverables.py <batch> → must pass
```
Default order: **organize (if needed) → SRT + titles → covers**. Pure AI; no unrelated Boom kits unless asked.
### New empty batch
```bash
python scripts/new_batch.py "D:/Desktop/V3-YYYY-MM-DD主题" street nightmarket
```
Then drop mp4s, probe, edit pack scripts, generate, validate.
## CapCut SRT (hard)
- English; **picture-true** first, then food / life-in-China beauty / YT money
- **1 line/cue**; **no overlap**; gap ≈ 0.28–0.35s
- Duration ≥ speech (~2.3–2.4 wps + buffer)
- ≈ 1 cue / 8–12s; ≥8 min → **40–60+ cues** (shorter videos: scale down, still dense)
- Pass validate: overlap=0, multiline=0, last end ≈ duration
**Timeline sync (hard — 音画同步, no drift):**
- Core rule: **what the TTS says must match what is on screen at that moment** (food, street, faces, ride…). 招牌/品牌只是例子,不是唯一检查项。
- Concat timeline = sum of folder mp4s **in name/time order**. Cue windows from `_meta_probe.json` per-clip durations.
- Lines about a scene **only inside that clip’s `[start, end)`** — never spill into the next clip.
- **Forbidden:** one global line-list stretched evenly across the whole video (旁白超前/滞后画面).
- Inside a clip: open with **what is already visible** (or neutral ambience while camera settles) → name specific objects/brands/dishes **only after** they are clearly in frame (not 2–5s early).
- Prefer cue start ≈ when the described visual is on screen (±0.5s). If unsure, delay the specific line, don’t advance it.
- Spot-check major beats: scrub SRT vs picture — if旁白 already named it but画面还没到, move the cue later or rewrite.
## Cover (hard)
**Count:** **minimum 3** distinct thumbnails per folder for YouTube A/B testing:
| File | Variant |
|------|---------|
| `YT_COVER.jpg` | A (default upload) |
| `YT_COVER_B.jpg` | B |
| `YT_COVER_C.jpg` | C |
Variants must **differ** in at least two of: source frame / crop focus / hook copy (same video, different CTR bets).
**Pixels (never print on image):** real faces/bodies (prefer women); face + readable figure.
**On-image text only:** viewer hooks — `UNDER $3`, `SHE LOOKED AT MY CAMERA`, `MALATANG STEAM`…
**Forbidden on cover:** 人脸 / 全身 / 中国女人 / FACE+FULL BODY / CHINA GIRL; yellow frames; sticker badges.
Design: real-frame composite + left hooks + soft shade. Use v4-style; no yellow insets.
**HD / super-res (hard) — AI only, no local compute:**
- **Forbidden:** running Real-ESRGAN / OpenCV EDSR-FSRCNN / heavy DNN upscale / GPU-Vulkan SR on the **user’s PC**. User has banned local SR compute.
- **Required:** agent **AI image generation** (GenerateImage / equivalent) for heavy photographic restore + cover compose — like old-photo HD restore, **not** oil-paint.
- Pipeline: extract 1–2 reference stills per variant (ffmpeg frame grab only — lightweight) → AI generate each cover from those refs → save `YT_COVER.jpg` / `_B` / `_C` at 1280×720 into the folder.
- Goal: **clear photo HD**; preserve real people/scene from refs; viewer hooks as text on image.
- Still: no meta cover text; no yellow boxes; ≥3 distinct A/B/C variants.
## Titles
Viral, honest — can lead with food, citywalk/life, or channel-money angle; stay true to the folder’s footage.
## Fix loop
| Complaint | Action |
|-----------|--------|
| Meta cover text | Viewer hooks only |
| Yellow box | Remove frames/badges |
| Oil-paint / mushy HD | Cut sharpen stack; re-run photographic super-res only |
| Only 1–2 covers | Generate B/C with different frame+hook |
| Sparse SRT | Add lines + regenerate |
| Pillars missing / off-topic | Rewrite lines: on-screen → pillar bridge |
| Hard-padded mashup | Re-split by theme; allow short/long folders |
| validate fails | Fix listed issues, re-run |
## Script notes
- Prefer pack `scripts/` tools; copy into batch root when customizing
- Super-res models: `tools/opencv_sr/EDSR_x2.pb` (and optional `tools/realesrgan/`)
- Unicode JPG: `cv2.imencode` + `Path.write_bytes`
- Deps: `pip install -r requirements.txt`