Free effect · AI Creator Library
- Type
- Workflow
- Format
- 9:16 · 1080×1920
- Tool
- Claude Code · Opus 5.5
- Level
- Medium
- Video
- Example coming soon
Start here · Free
Setup: The One-Time Prompt Every Effect Needs
The one-time prompt that installs ffmpeg, word timestamps, a person mask and shared helpers for every effect.
Claude Code · Opus 5.59:16Medium
- Open the folder with
input.mp4in Claude Code - Paste this prompt and press Enter
- Approve the installs, then pick an effect
New to Claude Code? Start with the beginner guide →
Want all 17 at once? Get the full pack →
The prompt
Set up a video effects toolkit in this folder that we will use to add effects to my talking-head videos.
Source video: input.mp4 (vertical, 1080x1920).
What to set up:
1. Check whether ffmpeg is installed and install it if not. Create a Python virtual environment (venv).
2. Transcription: transcribe the video word by word with timestamps using faster-whisper
(language: [LANGUAGE, e.g. English]). Save the result as words.json: [{word, start, end}].
3. Person mask: with Robust Video Matting, extract an alpha mask for every frame that separates
the person from the background (if it doesn't work, use MediaPipe Selfie Segmentation).
Save the masks as PNGs in the masks/ folder. Soften the edges by 2-3 px and apply
temporal smoothing to reduce flicker between frames.
4. Write a shared helper module called fx.py:
- read / write frames (through an ffmpeg pipe, keeping the original audio)
- easing functions (easeOutCubic, easeInOutQuint, easeOutBack, spring)
- "foreground / background" layering: use the mask to put a graphic BEHIND the person
(the graphic goes on the background, the person on top)
- motion blur (with sub-frame sampling on moving layers)
- finding the frame number from a word time: frame_at("word")
- rendering graphics designed in HTML/CSS to transparent PNGs with Playwright
5. Caption style: bold sans-serif (use Inter Black / Gilroy if available),
white text, accent words in [ACCENT COLOR, e.g. #FFE14D], with a word-by-word
pop animation (scale 0.8→1.05→1, 180 ms).
Output settings: 1080x1920, the source video's fps, H.264, CRF 18, audio AAC 192k.
We will write each effect as a separate Python file (in the effects/ folder).
When the setup is done, run a short test: add only captions to the first 3 seconds of the video,
export it as test.mp4 and summarize what is ready.Fill in the brackets
| Placeholder | What to put there | Example |
|---|---|---|
[LANGUAGE, e.g. English] | The language you speak in input.mp4. faster-whisper uses it to transcribe your words. | English |
[ACCENT COLOR, e.g. #FFE14D] | Colour of the highlighted words in your captions, as a hex code. | #FFE14D |
[MAIN COLOR] / [ACCENT COLOR] / [LIGHT COLOR] / [DARK COLOR] | Optional style block only: your brand palette as four hex codes. | #2D5BFF / #FFE14D / #F5F1E8 / #111111 |
[FONT] | Optional style block only: a font installed on your computer, used for headings and accent words. | Inter |
Optional add-on
Shared style block (optional)
Style rules:
- Color palette: [MAIN COLOR], [ACCENT COLOR], [LIGHT COLOR], [DARK COLOR]
- Font: headings in [FONT] Black/ExtraBold, accent words in [FONT] Italic
- Nothing moves linearly: entrances use easeOutBack (a slight overshoot),
exits use easeInCubic. When there are several elements, they enter staggered 60-80 ms apart.
- Fast moves get motion blur.
- Graphics never cover my face; keep the area of my face clear.About Setup
The setup prompt is the one-time step that prepares a folder for every effect on this site. Paste it into Claude Code with Opus 5.5 and Claude installs ffmpeg, transcribes your video into word-level timestamps, cuts a person mask for every frame, writes a shared helper module and caption style, then exports a short test clip so you can check it worked.
Use it when: Once per video folder, before you paste any effect prompt.
What the setup does
The setup prompt turns an ordinary folder with one video in it into a small editing workspace. You paste it once, and Claude Code installs the tools, analyses your footage and writes the shared code that every effect prompt on this site relies on. The effect prompts refer to words.json, to the masks/ folder and to helpers in fx.py, and none of those exist until this step has run.
The prompt ends with a check. Claude adds captions to the first three seconds, exports test.mp4 and tells you what is ready. If that clip plays with the right words at the right moments and your own sound, the groundwork is done.
When to run it, and when to run it again
Run it once per video folder, before any effect prompt. The transcript and the masks belong to that one input.mp4, so a new video needs its own. The code carries over between projects; the analysis does not.
Run part of it again when something upstream changes. If you trim the video, the timestamps and mask frames stop lining up, so ask Claude to redo steps 2 and 3. If the transcript mishears you, fix it before adding effects, because many of them start on a spoken word.
What each piece is for
Word timestamps. faster-whisper, an open-source speech-to-text model, writes every word with its start and end time into words.json. That is how an effect can begin when you say a particular word instead of at a second you guessed. The frame_at("word") helper turns a word into a frame number.
The person mask. Robust Video Matting produces a soft greyscale image for each frame: white where you are, black where the room is. Effects use it to put graphics behind you, cut you out or draw you over a frame. MediaPipe’s selfie segmentation is the fallback if Robust Video Matting will not run. The edge softening and temporal smoothing stop your outline from flickering between frames, and saving the masks as PNGs means this slow job happens once.
fx.py. One helper module keeps every effect consistent: reading and writing frames through ffmpeg with your audio intact, easing curves, layering behind the mask, motion blur from sub-frame samples, and rendering HTML and CSS designs to transparent PNGs with Playwright. Each effect then gets its own file in effects/.
Caption style. Heavy white sans-serif, accent words in your colour, each word popping in over 180 ms. Defining it here means every effect uses the same captions.
Output settings. 1080×1920 at your source frame rate, H.264 at CRF 18, AAC audio at 192 kbps. The FFmpeg H.264 guide describes CRF values around 17–18 as visually lossless or nearly so.
Make it yours
Fill the two brackets before you paste: [LANGUAGE] is the language you speak, [ACCENT COLOR] is your caption highlight. If you have neither Inter Black nor Gilroy, name a heavy font you do have.
The shared style block is optional. Add it to the end of any effect prompt to apply your palette, fonts and motion rules across the board: easeOutBack entrances, easeInCubic exits, a 60–80 ms stagger, motion blur on fast moves and a clear zone around your face.
Questions
Can I do this in the claude.ai chat instead of Claude Code?
Only partly. In a chat, Claude can write the code, but it cannot open your video file frame by frame or run ffmpeg on your machine. Claude Code works inside the folder on your computer, so it can install the tools, process every frame and write the finished MP4.
Do I need a GPU?
No, though it speeds things up. faster-whisper and Robust Video Matting both run on an ordinary processor, just more slowly. On a laptop without a dedicated graphics card, expect the mask step to be the longest wait, and use low-resolution previews while you are still adjusting an effect.
Do I have to run the setup for every video?
Once per video. The transcript and the masks describe one specific input.mp4, so new footage needs new ones. The helper code carries over: copy fx.py and the effects folder into the new project, or package the setup as a Claude Code skill and start each new folder with one request.
What is the shared style block for?
It is a short list of brand rules: your palette, your fonts, how things ease in and out, the stagger between items, motion blur and a clear zone around your face. Paste it at the end of any effect prompt and that effect follows the same rules. Skip it if each prompt's defaults suit you.
Step by step
Open the folder in Claude Code
Put your vertical video in an empty folder and name it input.mp4. Open that folder in Claude Code, either in the desktop app or in the terminal.
Choose Opus 5.5
Select Claude Opus 5.5 as the model before you paste anything. Every prompt on this site was written for it.
Paste the setup prompt
Replace [LANGUAGE] with the language you speak and [ACCENT COLOR] with your caption highlight, then send. Claude will ask before installing ffmpeg and Python packages; approve the installs you expect.
Check test.mp4
When Claude finishes, play test.mp4: the first three seconds of your video with captions. Check the words, their timing and the sound, read Claude's summary of what is ready, then move on to an effect prompt.
You need: Claude Code on a paid Claude plan or API · Vertical input.mp4 (1080×1920 ideal) · A folder for the project
Tips
- Film against a plain wall in even light if you can. The person mask comes out much cleaner, and every effect that layers graphics behind you benefits.
- Open words.json after the setup and skim it for misheard names or brand terms. Fixing them now saves re-renders later, because many effects start on a spoken word.
- If renders feel slow, ask for a 540×960 preview first and keep full resolution for the final. The masks are saved once, so later renders skip the slowest step.
- Add the shared style block to the end of each effect prompt if you want every video to share the same colours, fonts and motion rules.
- Once the setup works, you can ask Claude to turn it into a Claude Code skill, so a new folder can be prepared with one short request.
If it goes wrong
Robust Video Matting fails to install or runs out of memory.
The prompt already allows a fallback. Ask Claude to switch to MediaPipe Selfie Segmentation, or to run Robust Video Matting on smaller batches of frames, then look at the masks for a few frames before going on.
Captions in test.mp4 show the wrong words or land late.
Check that [LANGUAGE] matches the language you speak. Ask Claude to re-run faster-whisper with a larger model, or correct the misheard words in words.json by hand and keep their timings.
test.mp4 is silent or drifts out of sync.
Ask Claude to confirm that fx.py copies the original audio stream and writes frames at the source frame rate rather than a fixed 30 fps, then export the test again.
The captions use a plain default font.
Neither Inter Black nor Gilroy is installed. Install Inter, which is free, or tell Claude which heavy font you do have and ask it to update the caption style.
What it does not do
- The first run is the slowest. Installing packages, downloading models and computing a mask for every frame takes a while, and how long depends on your computer and the length of the video.
- Mask quality depends on the footage. A plain background and even light give clean edges; a busy room, hair against a wall of similar colour or fast hand movement give rough ones, and every effect inherits them.
- Everything is tied to one input.mp4. Trimming the video or swapping in a new one means redoing the transcript and the masks.
- Speech recognition is good but not perfect. Names, brand terms and mixed-language speech can come out wrong, and an effect that fires on a misheard word fires at the wrong moment.
Sources
- faster-whisper — GitHub — SYSTRAN. Accessed October 21, 2026.
- Robust Video Matting (RVM) — GitHub — PeterL1n. Accessed October 21, 2026.
- Image segmentation guide — Google AI Edge — MediaPipe. Accessed October 21, 2026.
- H.264 encoding guide — FFmpeg Wiki. Accessed October 21, 2026.
Want the whole library?
Lifetime opens every AI Video Effect, AI Motion Graphic and AI Creator Concept, inside Claude via MCP, for one payment of $79.