Portal
Claude generates a full script (YAML) from the event, target duration and settings.
Project plan · draft
A local web portal that takes a YouTube episode from a topic to a finished MP4.
The channel’s niche is “You lived through a historical event”. Each episode is told in the second person, from the point of view of a fictional protagonist inside a real event. The protagonist is invented; events, dates and details must be historically accurate.
ВЕРДЕН. 1916
s050The portal runs locally on one machine and binds to 127.0.0.1 only.
An episode moves through five stages. Previews get richer with each one.
Portal
Claude generates a full script (YAML) from the event, target duration and settings.
User
Sets the settings, approves the draft.
Portal
Shows scenes with narration text, Russian scene description and English image prompt.
Preview
Scene text, scene description, and estimated duration per scene and in total, from word count.
User
Edits lines and prompts, fact-checks, approves the final YAML.
Portal
Generates TTS per scene.
Preview
Real audio with pauses, and text cards instead of images: the “radio version”.
User
Listens, regenerates bad lines, fixes stress via the pronunciation dictionary, approves.
Portal
Generates images for image scenes; lets the user upload their own files for map and archive scenes.
Preview
Near-final video: images with camera motion plus audio, with placeholders where images are missing.
User
Regenerates bad images, edits prompts, approves.
Portal
Builds the MP4 with ffmpeg and a package for manual editing.
User
Reviews the result.
Set in stage 1, before Claude writes the draft.
One YAML file per episode. An excerpt from the Verdun script:
projects/verdun/episode.yaml
episode: id: verdun title: "Ты прожил Верден" language: ru style: > 1916, World War I, Verdun, French soldiers in horizon-blue greatcoats and Adrian helmets, 2D animated illustration, hand-painted look, muted desaturated palette, soft overcast lighting, paper grain, cinematic composition, serious dramatic tone, no gore characters: lucien: name: Люсьен description: > a 20-year-old French infantryman, thin face, short dark hair, light stubble, tired brown eyes, horizon-blue greatcoat, Adrian helmet reference: refs/lucien.png # optional character sheet voices: narrator: voice_id: "VOICE_ID" documentary: voice_id: "VOICE_ID" pronunciation: Дуомон: Дуомо́н Сувиль: Суви́ль scenes: - id: s010 part: Хук voice: narrator text: > Представь: февраль 1916 года. Ты лежишь в промёрзшей траншее, и земля под тобой дрожит. visual: type: image scene: > Крупный план лица молодого солдата в каске, иней на шинели. Со стенки окопа сыплются комья земли. characters: [lucien] motion: zoom_in - id: s050 part: Хук voice: narrator text: > Солдаты назовут это место адом. Немцы — мельницей для костей. Сегодня ты проживёшь Верден. pause_after: 1.5 visual: type: title text: "ВЕРДЕН. 1916" - id: s080 part: Кто ты voice: documentary text: > Твоя часть стоит к северу от Вердена, старой крепости на реке Мёз, окружённой кольцом фортов. visual: type: map scene: Верден, река Мёз, кольцо фортов вокруг города.
| Field | Required | Meaning |
|---|---|---|
id | yes | Stable ID like s010, in steps of 10 so scenes can be inserted (s015) |
part | no | Episode part, for navigation |
voice | yes | Key from voices |
text | yes | Narration text |
pause_after | no | Silence after the line, in seconds |
visual.type | yes | image, video, map, archive or title |
visual.scene | for image, video, map, archive | Scene description in Russian |
visual.characters | no | Characters in frame; their descriptions are injected into the prompt |
visual.motion | no | Camera motion at export: zoom_in, zoom_out, pan_left, pan_right, static |
visual.motion_prompt | for video | What moves (reserved for the future animation stage) |
visual.prompt | no | English image prompt; if present, it is used as is |
visual.text | for title | Title card text |
notes | no | Notes for manual editing |
imagevideoimage until the animation stage exists.map, archivetitleRun before any paid call. Errors block the pipeline, and the portal shows a list of all problems.
voice and every referenced character exists in the header.video scenes does not exceed a configured limit.Suggested layout
projects/<episode_id>/ ├── episode.yaml # the script, single source of truth for content ├── state.json # per-scene, per-stage statuses, costs, approvals ├── audio/<scene_id>.mp3 ├── images/<scene_id>.png ├── uploads/<scene_id>.<ext> # user files for map/archive scenes ├── rejected/ # rejected files are moved here, never deleted └── exports/ # MP4, SRT, timeline, editing package
Each scene has one of four statuses per stage:
| When this changes | What happens |
|---|---|
| Narration text | Audio of that scene goes back to pending. |
| Scene description | The prompt needs regeneration, then the image. |
| Prompt | Image of that scene goes back to pending. |
| Episode style or a character description | The portal shows how many scenes a regeneration would touch and how much it would cost, and asks for confirmation. |
1080p, H.264 video, AAC audio
pause_after.visual.motion.visual.text.All media named by scene ID, a timeline with start and duration per scene, the SRT, and a project importable into DaVinci Resolve (e.g. FCPXML).
Lists missing files and placeholders before the build starts.
Build the pipeline as CLI scripts first, then the web UI. If an episode assembled by scripts looks bad, the UI will not fix it.
.env, .env in .gitignore.Scene animation, background music, multi-user access with authentication, style presets per era.
Proposed, not final.
| Risk | Mitigation |
|---|---|
| Factual errors in generated scripts | Mandatory human fact-check at the script stage |
| YouTube monetization rules on mass-produced or inauthentic content | Check the current YouTube Partner Program rules before investing; invest in a recognizable authored style |
| Runaway API costs from a bug | Provider spending limits, cost counter, confirmation before paid steps |
| API key leaks | Keys only in .env, .env in .gitignore, private repo |
| Payment issues with foreign providers | Check in step 0, before choosing providers |
Start with step 1. Do not build the web UI until the Verdun episode can be produced end to end, from YAML to MP4, with CLI scripts.
Ask before making any paid API call during development.