To create a video using AI, write a short script, turn it into narration with an AI voice, put the visuals on a timeline and render an MP4. We can do all of that for free on a laptop with open tools, or pay a hosted tool such as Gemini, Runway or HeyGen to produce the video from a text prompt.
Making even a 30-second video the old way is a painful process. We record a voiceover, record it again because of one stumble, drag clips around an editor timeline, retime every caption by hand and export the whole thing again when one word changes. This guide shows how we can skip most of that. It starts with the free method we use for every DevToolLab Short, then covers three hosted tools for the cases where the free method is the wrong fit.
Three Ways to Create a Video Using AI
"AI video" covers three different jobs, and the right tool depends on which one we need. Prices and limits below were checked on each vendor's own page on December 3, 2026.
| Way | What the AI does | What it costs | Best for |
|---|---|---|---|
| Build it in code (how we do it) | Writes the script and speaks the narration; code draws the visuals | $0, runs on a laptop | Tutorials, product demos, explainers, Shorts |
| Generate clips from a prompt (Gemini, Runway) | Creates the footage itself, 3 to 10 seconds at a time | Gemini needs a Google AI plan; Runway has 125 free one-time credits, then $15 a month | Scenes that do not exist: b-roll, ads, concept shots |
| Presenter video from a script (HeyGen) | An AI avatar reads the script on camera | 3 free videos a month with a watermark, then $29 a month | Training, onboarding, announcements |
How We Create Our Videos for Free
Every Short on the DevToolLab YouTube and Instagram accounts is made without a camera, a microphone or a paid subscription. The rule we set for ourselves was free tools only: no paid APIs, voices, fonts or music.
For example, say we want a 30-second Short for our Website Down Checker. The finished video runs 32.5 seconds, has seven narrated lines, and went from script to MP4 with four free pieces:
- A script of 92 spoken words, drafted with an AI model and edited by hand.
- A voice from Kokoro, an Apache 2.0 text-to-speech model that runs offline on teh same laptop.
- The visuals built with Remotion, a framework that turns React components into video frames. The screens in the video are real captures of the tool in a browser.
- Music from the free stock music library on Mixkit.
Rendering every video from the same components had one side effect: after a few weeks our Shorts all looked alike in the feed. So the pipeline now has 14 templates. A template is one whole look (the colors, the background texture, the frame around the video, the headline font, how the spoken word is marked in the captions), and it changes nothing else, so any script renders in any of them. A new video cannot reuse a template from the last five.

The five steps below are the same ones our pipeline runs, cut down to the smallest version that works.
Step 1: Write a Script That Fits the Length
A narrated video is its script, so we write that first. Our 32.5-second Short has 92 spoken words, which is the range to aim for: 70 to 120 words for 30 to 50 seconds.
We ask an AI model for a draft with a strict shape: the problem in the viewer's words, the fix, what the result means, one honest limit, and where to find the tool. Any chat model can do this, including one running locally. Then we edit by hand and keep each line under 18 words, because short lines are easier to caption and easier to follow by ear.
The script for our example opens like this: "A site won't load. Is it down for everyone, or just you? Type the site into the free Website Down Checker and press Check Website."
Step 2: Turn the Script Into a Voice
Kokoro reads the script aloud. It is an 82-million-parameter model, small enough to run on a laptop CPU, and the kokoro Python package (version 0.9.4 here) wraps it in a few lines:
Pythonimport numpy as np import soundfile as sf from kokoro import KPipeline script = ( "A site won't load. Is it down for everyone, or just you? " "Type the site into the free Website Down Checker and press Check Website." ) pipeline = KPipeline(lang_code="a") # "a" is American English chunks = [r.audio for r in pipeline(script, voice="af_heart", speed=0.94)] samples = np.concatenate(chunks) sf.write("public/voice.wav", samples, 24000) # Kokoro outputs 24 kHz audio print(f"{len(samples) / 24000:.2f} seconds")
Running it prints the length of the narration, 8.57 seconds. The whole run took about 18 seconds on an Apple silicon Mac, most of it loading the model. We use the af_heart voice slowed to 0.94, which sounds less rushed than the default speed. When a word comes out wrong, we change the spelling the model reads, not the audio: our script says "D N S" and "dev tool lab dot com" in the spoken version while the captions keep "DNS" and "devtoollab.com".
Step 3: Build the Scenes in Code
In Remotion a video is a React component, and the current frame number is a value we can read. Animation is math on that number. This component fades a headline in over the first 15 frames and plays the narration from Step 2:
React TSimport React from "react"; import { AbsoluteFill, Audio, Composition, interpolate, staticFile, useCurrentFrame } from "remotion"; const FPS = 30; const SECONDS = 9; const Short: React.FC = () => { const frame = useCurrentFrame(); const opacity = interpolate(frame, [0, 15], [0, 1], { extrapolateRight: "clamp" }); const lift = interpolate(frame, [0, 15], [40, 0], { extrapolateRight: "clamp" }); return ( <AbsoluteFill style={{ background: "#0f172a", justifyContent: "center", padding: 90 }}> <Audio src={staticFile("voice.wav")} /> <h1 style={{ color: "white", fontSize: 110, fontFamily: "sans-serif", opacity, transform: `translateY(${lift}px)` }}> Down for everyone or just you? </h1> </AbsoluteFill> ); }; export const Root: React.FC = () => ( <Composition id="Short" component={Short} width={1080} height={1920} fps={FPS} durationInFrames={FPS * SECONDS} /> );
The 1080 by 1920 size is the vertical 9:16 format that Shorts and Reels use. Swap the two numbers for a regular 16:9 video. A real video adds more scenes the same way. Our pipeline has ten scene types, among them a real page scrolling inside a phone frame, the tool captured state by state, a terminal that types a command, and a replay of a terminal session we recorded.
A look works the same way. Each of our templates is a plain object, and the component reads its colors from the one the video names. This is the mint template, trimmed to a few fields:
tsconst mint = { bg: "#F0FDF4", primary: "#059669", secondary: "#0891B2", ink: "#052E2B", texture: "cross", marker: "highlight", };
In the component above, background: "#0f172a" becomes background: template.bg, and a second look costs one more object.
Step 4: Render the Video
One command turns the component into an MP4:
Bashnpx remotion render src/index.ts Short out/short.mp4
textRendered 270/270 Encoded 270/270 + out/short.mp4 503.3 kB
Those 270 frames (9 seconds at 30 frames a second) rendered in under 15 seconds. A full Short takes longer. Our 32.5-second one, with seven scenes and screen captures, rendered in about two and a half minutes at full speed. We now run renders at background priority so the laptop stays usable, and a 34-second video takes about 23 minutes that way. One render produces both files: a 1440 by 2560 master for YouTube and a 1080 by 1920 copy for Instagram. When a line in the script changes, we rerun the voice and the render and recieve a new file with everything retimed. That is the part a timeline editor cannot do.
Step 5: Add Captions and Music
Most short videos are watched with the sound off, so captions matter more than music. Because the narration comes from text, we already know every word, and the voice step gives us each line's duration. Our pipeline writes those timings to an .srt file and draws the same words on screen, highlighted as they are spoken. If the timing drifts after an edit, the Subtitle Timing Shifter moves every cue at once.
Music goes in as a second <Audio> tag with a low volume. We mix ours 20 dB below the voice so it never competes with the narration, and we credit the track in the video description.
What the Free Way Does Not Do
It does not create footage. Everything on screen is something we drew in code or captured from a real page, so this method fits tutorials, demos and explainers and does not fit a cinematic shot of a city at night.
It also takes setup. The first video means building the components; later videos reuse them. And "free" has one condition worth reading: the Remotion license is free for individuals, non-profits and for-profit organizations with up to 3 employees, and larger companies need a company license.
Three AI Video Tools That Do the Work for You
When we need generated footage, or a finished video without writing code, a hosted tool is the better choice. These are the three we would start with.
Gemini generates short clips inside a chat. Google's help page names Gemini Omni 1.2 Flash as its current video model, with clips from 3 to 10 seconds (up to 15 on the AI Ultra plan), a choice of aspect ratio, and edits made by replying in the same conversation. It needs a Google AI plan on a personal account, so it is not a free option.
Runway is a full generation and editing studio. The free plan includes 125 one-time credits to test it. The Standard plan is $15 a month, or $12 a month billed annually, and includes 625 credits a month, which Runway's pricing page equates to 52 seconds of its Gen-4.5 model. That number is the one to plan around: generated footage is priced by the second.

HeyGen makes presenter videos. We paste a script, pick an avatar, and it produces a person reading the script on camera. The free plan allows 3 videos a month of up to 1 minute each, with a watermark. The Creator plan at $29 a month exports in 1080p and removes the HeyGen branding.

Common Problems
The voice sounds robotic. Slow it down before changing the model. A speed of 0.94 and shorter sentences fixed most of it for us. Spell out anything the model misreads: acronyms as separate letters, version numbers as words.
The video is longer than the audio, or cuts it off. The composition length is fixed in frames. Our first test set 8 seconds for an 8.57-second narration and clipped the last word. Read the duration the voice step prints and round up.
A generated clip changes the subject between shots. Prompt-based tools create each clip separately. Reuse the same reference image for every shot, and keep each clip to one action.
Conclusion
If the video explains or demonstrates something, build it in code: a script, a Kokoro voice and a Remotion render cost nothing, and every later video reuses the same components. If the video needs footage that does not exist, spend the money on a prompt-based generator and budget by the second. If it needs a person talking to the camera, an avatar tool gets there fastest, and its free plan is enough to find out whether the format works for you.
Related DevToolLab Tools
- Aspect Ratio Calculator - work out the exact pixel size for a 9:16 Short or a 16:9 video before setting the composition width and height.
- Video Bitrate Calculator - estimate the file size of a render at a given length and bitrate before uploading it.
- Subtitle Timing Shifter - move every caption cue earlier or later when the narration is retimed.
- SRT to VTT Converter - convert the caption file for web players that only accept WebVTT.
