Turning one written request into a finished, subtitled MP4
You have something worth showing people — a new robot vacuum, the one-tap Away button on your dashboard, how the recycling gets sorted. Making a watchable video of it is the part that never happens. Pi Agent ships the tools for a video production line and a Skill that drives them: you write a sentence, and a few minutes later there is an MP4 with narration and burned-in subtitles. Here is what that line does, what it is bad at, and how to run one.
The idea is easy. The editing is the wall.
Explaining something on camera sounds simple until you try it. Operating the interface while talking takes several attempts, and then comes trimming, narration, captions. Three minutes of video eats an afternoon.
The add-on already contains the tools for that work: ffmpeg for editing, Playwright with Chromium for recording a browser, edge-tts for narration, rclone for uploading. An installed Skill connects them — usually called pitch_video or pi-video, though the actual slug depends on the version you install (Part 10).
You are not editing a video. You are describing a job to a workshop that already owns the machines. Your two real tasks are saying clearly what you want, and judging whether what comes back is good enough.
Six stages, and where the minutes go
Worth seeing before you use it: when something breaks, you will want to know which stage broke.
flowchart TD A["Your request"] --> B["1 · Write the script
your AI provider · 30-60 s"] B --> C["2 · Generate narration
edge-tts · 10-30 s"] C --> D["3 · Capture the screen
Playwright · 1-3 min"] D --> E["4 · Align subtitles
word boundaries to SRT"] E --> F["5 · Edit and burn in
ffmpeg · 30 s to 2 min"] F --> G["6 · Upload
rclone · 30 s to 3 min"]
- Stage 1 decides everything else. The AI splits the narration into sections, gives each a duration, and decides what to show. A reasoning model is recommended here.
- Stage 4 is why subtitles line up. edge-tts reports word-boundary timestamps as it speaks and
SubMakerturns those into an SRT file, so captions are timed against the real audio rather than guessed.
Altogether a 3-minute video usually takes about 5 to 10 minutes from approval to Google Drive, depending on your hardware, your connection and the Skill. The job continues whether or not you watch it.
The big download is not the pipeline’s fault
Pi Agent itself is a few dozen MB. The first time you start the add-on it pulls roughly 600–720 MB in the background — a minute or two on a 100 Mbps connection, far more noticeable on a mobile hotspot. That range varies with the Playwright version and its pip dependencies, and after a successful install it never happens again.
Two corrections. The video pipeline does not trigger it; the add-on’s own video-tools-init process starts it on first launch. And it is not all the pipeline’s tools, only the part that goes to the volume.
It is the studio being fitted out, not a film being shot. The equipment arrives when you install the studio, whether or not you ever pick up a camera. There is currently no chat-only switch that skips it.
flowchart LR A["Container image
about 300 MB"] --> B["ffmpeg + libass
Noto fonts · rclone"] C["To /data/pi-agent
600-720 MB, once"] --> D["Chromium
500-600 MB"] C --> E["Python venv + playwright,
edge-tts, pyyaml, mutagen
40-60 MB"]
What it is good at, stated honestly
Everything it does well has one thing in common: short videos driven by explanation, not performance. Nobody appears on screen. Three requests in the shape it likes:
Recipe demonstrations, reviews from your own notes and schedule previews fit the same shape. Burned-in subtitles matter here: videos in a group chat often start muted.
Six places to use something else
- You on camera. Playwright records a browser; it cannot film you. Shoot on a phone instead.
- Background music. Narration only. Add music afterwards in CapCut or iMovie, or from the YouTube Audio Library.
- Anything over 10 minutes. Long captures burn CPU and large renders take longer still. Five minutes is the recommended ceiling; split the rest into episodes.
- Camera moves, effects, real cuts. You get basic xfade transitions, nothing more.
- Live streaming. This is batch production; one video takes 5 to 10 minutes to appear.
- Copyright-sensitive material. For commercial use, check your sources are lawful and read Microsoft’s current terms for commercial use of edge-tts.
Three things first, then six steps
The most common first-time frustration is asking for a video and being told it is not possible. Almost always, a prerequisite is missing.
- The video Skill is installed. Missing, and the AI says it has no tool that can create a video. Check for a green status dot on the
pitch_videoentry under Settings → Skills. - The first-start download finished. Missing, and it sits on “Preparing environment” or reports Chromium or ffmpeg missing. One run that produced a file is the proof.
- rclone points at Google Drive — optional. Missing, and the video finishes but nothing arrives; you go and fetch it by hand.
-
Step 1
Start a Session on a reasoning-capable model
Select New conversation at the top left, then pick a reasoning model — GLM-4.6, Claude Sonnet and DeepSeek-R1 are the source’s examples. Not the cheapest one: the script is the video.
-
Step 2
Describe the video, covering four things
Include length, topic, tone and audience: “Create a 90-second video in English explaining how much electricity our smart plug could save for a typical 3-person household. Use a relaxed tone for an older general audience.”
-
Step 3
Read the outline before anything is produced
You should get an outline and draft script before anything is produced — a 10-second opening, a 60-second middle with three points, a 20-second close. Reply with specific corrections: “Shorten the English opening to 5 seconds.” Several rounds is normal, and far cheaper than rebuilding later.
-
Step 4
Approve it and let the Skill run
Reply “Yes, use this English script.” A tool card appears, reporting the stage it is on. You can close the window; the job keeps going.
-
Step 5
Collect the file a few minutes later
With Drive configured the MP4 turns up in your folder, possibly with a phone notification. Otherwise it stays at
/data/pi-agent/projects/<project-name>/— fetch it with Samba or File Editor. -
Step 6
If it is not right, ask again in the same Session
“Create another English version with slower narration and no opening section.” It reuses the script with new settings. If the script is the problem, ask for a rewrite and it starts again from stage 1.
This is editing by conversation. Instead of opening an application and dragging clips around, you say what is wrong and it goes and changes it. Strange for the first two videos, obvious by the fourth.
- Process details · 2 messages · 2 tool calls is the entire run folded into one line. Open it and you see what was actually run, not what was described.
- The reply “Created notes.md with:” ends in a notes.md chip, and the file has appeared in the EXPLORER panel on the left. A video job deposits its files the same way, into a project folder.
- The cost line reads
187 in · 57 out · 1,152 cache R · $0.0032. That cache read figure is why a long job costs less than the raw token count suggests.
None of it is hidden: the Skill is instructions, and the work is ordinary tool calls.
bash.- The left column — read, bash, edit, write — is the whole list. A Skill adds no machinery; it tells the agent how to use these four, and
bashis where ffmpeg, edge-tts and rclone get called. - The right-hand panel documents whichever tool is selected.
readtakes three parameters:path, required, a string;offsetandlimit, optional numbers. That is the level the agent works at. - Prompt guidelines starts below the parameters — the panel does not only list a tool, it tells the agent when to reach for it.
Every stage leaves something you can reuse
You do not just get one MP4. The intermediate files stay under /data/pi-agent/projects/<project-name>/. This layout is typical, but versions differ — your own project directory is the authority.
| File | What it is | Why you might want it |
|---|---|---|
| final.mp4 | The finished video | Upload it anywhere |
| subtitles.srt | Timed plain-text subtitles | A separate caption track, or a base to translate |
| script.md | The AI-written script, in Markdown | Edit and rerun, or make it a blog post |
| voice/*.wav | One narration track per section | Reuse it, or swap in your own voice |
| clips/*.webm | Raw Playwright screen recordings | Re-narrate one, or cut a GIF from it |
| segments/*.mp4 | Rendered sections, narrated and subtitled | Send one section, not the whole video |
| project.json | The settings used for this run | Reuse them for the next video |
So you are never stuck between accepting the video and starting over. Want your own voice? Record yourself reading script.md, drop the files into voice/, and ask for stages 4 to 6 to run again on that narration.
final.mp4, script.md, subtitles.srt and project.json, and excludes clips/, segments/ and voice/, which can grow large enough to swamp a backup. Copy the project to a NAS if you want every intermediate file.What it costs, and what usually goes wrong
The only direct charge is the API call that writes and revises the script — roughly 1–3K tokens for a 90-second script, depending on the model and the number of revisions. edge-tts, Playwright and ffmpeg add no API charge; they use your host’s CPU and your electricity, and want a dual-core CPU with at least 2 GB of RAM to be bearable.
Almost the whole bill is the writing, not the video. Which is a good argument for paying for a better model on the script and not worrying about the rest — the expensive-looking parts run on hardware you own.
The recording is black, or there is no picture at all
/data/pi-agent/playwright-cache/ and the marker file /data/pi-agent/.video-tools-installed, then restart the add-on to trigger the install again.No subtitles, or subtitles showing as boxes and question marks
fonts-noto-cjk, so boxes usually mean the Skill names a font file that is not there. Set it back to Noto Sans CJK, or run fc-list :lang=zh-tw in a ttyd terminal.It crashes halfway and Home Assistant goes sluggish
Can I change the resolution, the voice, the pacing?
rate="+20%" to speed narration up and -20% to slow it down. The settings live under /data/pi-agent/skills/<skill name>/, usually in config.yaml or the frontmatter of SKILL.md. Save a .bak copy before editing.Where to go from here
You know what the line does. Now make sure it is actually installed.
Part 12 is the 600–720 MB first-start download in detail — when it runs, how to watch it, and how to make it run again if it did not finish. Part 13 sets up the rclone upload to Drive.
Open the full guidePart 11 of the Pi Agent Onboarding Guide series, published by WoowTech.
Based on the Woow HA Pi Agent Onboarding Guide, produced by WoowTech and released under CC BY 4.0.
The Smart Space Solution · 智慧空間解決方案 · © 2026 WOOW Technology Co., Ltd.