YouTube Shorts generator: programmatic Shorts from a template
Build a YouTube Shorts generator with HTML templates. 9:16, 60-second cap, on-screen captions, MP4 export, batch render from JSON or CSV.
YouTube Shorts is the format with the most leverage right now — Google is putting Shorts in front of long-form viewers, the algorithm is undertested, and the audience tolerates lower production quality than TikTok or Reels. For a developer who can ship one solid template, this is a free distribution channel.
The catch is volume. Shorts rewards posting daily, and "daily" plus "a CapCut session per video" plus "a job" do not coexist. The fix is the same fix as for any high-volume format: template once, render from data.
The Shorts canvas
Shorts is 1080 × 1920, up to 60 seconds, MP4 with H.264 video and AAC audio. Unlike TikTok, YouTube's overlay budget is small — just a tap-to-pause hint and a subscribe pill in the bottom-right, both transparent. You can use almost the full canvas.
Safe area worth reserving: bottom 120px for the subscribe pill, top 60px for the "Shorts" badge.
What works on Shorts vs. what works on TikTok
The two platforms feel similar but their audiences are calibrated differently. From running both in parallel for a year:
| Pattern | TikTok | Shorts |
|---|---|---|
| Talking head with caption | High floor, low ceiling | Higher ceiling, lower floor |
| Data-driven explainer | Medium | High — Shorts viewers carry over from long-form |
| Product demo + voiceover | Medium | High |
| Trend remix | High | Low — Shorts doesn't reward trends |
| Pure text-on-screen | Low | Medium |
The Shorts viewer is more patient and more interested in a payoff. Lean into that with templates that have a setup-and-conclusion structure rather than a hook-and-loop.
A starter template
Five elements, vertically stacked, biased to the upper two-thirds of the canvas:
The template above shows the data-explainer pattern that performs disproportionately well on Shorts: question, leaderboard, conclusion. It is one HTML file with four variables (the question, the rows, the highlight row, the subscribe handle).
The variable surface
type ShortsData = {
question: string;
rows: { label: string; value: string; highlight?: boolean }[];
caption: string;
duration: number; // seconds, default 30
accent: string; // default #ff3b1f
};Five fields, one of them an array. A JSON file with thirty entries gives you thirty Shorts.
Captions: do them yourself
YouTube's auto-captions are good. They are not good enough to drive a 28-second Shorts script where every word matters. Burn captions into the template:
- One line at a time, swapped on word boundaries.
- Bottom-third position, above the subscribe pill.
- High contrast, dark backing rectangle, white text.
See burning subtitles into MP4 for the typography and timing rules.
Deterministic batch from JSON
The render command, conceptually:
hf render \
--template shorts-template.html \
--data shorts-batch.json \
--out ./shorts/ \
--size 1080x1920 \
--fps 30One MP4 per JSON entry, named after a slug. From there, a YouTube Studio bulk upload (or the YouTube API if you want to go further) gets them scheduled.
What scales, what doesn't
This pipeline scales for explainers, leaderboards, listicles, "did you know" cards, and any data-first content. It does not scale for face-to-camera content — for that, you still need a person and a camera.
The right call is to run both pipelines in parallel: one for the templated data-driven shorts (high volume, moderate floor), one for face-to-camera (low volume, high ceiling). The data-driven stream warms the algorithm for the face-to-camera stream to land on.
Open the playground, build one Shorts template, queue thirty for next week.
Cite this postBibTeX · APA · Markdown
@misc{tanaka2026youtube,
author = {Kira Tanaka},
title = {YouTube Shorts generator: programmatic Shorts from a template},
year = {2026},
url = {https://hyperframes.video/blog/youtube-shorts-generator},
note = {HyperFrames blog}
}Kira Tanaka. (2026, May 8). YouTube Shorts generator: programmatic Shorts from a template. HyperFrames. https://hyperframes.video/blog/youtube-shorts-generator
[YouTube Shorts generator: programmatic Shorts from a template](https://hyperframes.video/blog/youtube-shorts-generator) — Kira Tanaka, 2026
Kira works on the render core: headless Chromium scheduling, frame capture, and the encoder pipeline. She cares about reproducible builds and small numbers next to the word "variance."
How to generate TikTok videos from a template (the engineering way)
Render TikTok-ready 9:16 videos from HTML templates. CSV → 100 variants overnight. Vertical layout, safe areas, watermark handling, MP4 export.
Instagram Reels automation: render 50 reels from one HTML template
Automate Instagram Reels production with HTML templates and a data file. 9:16 layout, audio sync, safe zones, deterministic MP4 export.
Make a YouTube intro from code (and render every episode's)
A 5-second channel intro template that re-renders per episode. One HTML file, infinite variants.
Building with HyperFrames? Come hang out.
We're on GitHub, in Discord, and the playground is one click away. Bring weird ideas — we collect them.