AI-auto-generate-video: From Article to 9:16 in One Command
An automation repo that turns a written post into a vertical short with narration and captions: what it does, how to run it, where it needs you.
Explore the AI-auto-generate-video project, an automation pipeline that turns posts into 9:16 short videos for TikTok, Shorts and Reels by combining HyperFrames, a voice model and FFmpeg. The pitch is one command in, one finished video out, and the pitch is roughly true, which is rare enough to be worth examining properly.
It is not magic and it is not a model that watches your article and gets inspired. It is a chain of ordinary programs with a single door in front of them, which is exactly why its failures are readable instead of mysterious.
What the pipeline actually does with a post
The script reads your text, splits it into scenes, and renders each scene as a vertical card built from HTML, CSS and JavaScript animations. Separately, a voice model reads the narration from your text or from a script file. FFmpeg then joins the cards and the audio into one mp4 and drops it in an output folder. Because each stage is its own program, you can open the intermediate files and see which part went wrong.
Getting the repository ready
- Clone the repository and read the tool list in its README before installing anything.
- Install the dependencies in a clean environment and pin the versions, so a future update does not break a working setup.
- Run the bundled sample input first, with your own article second.
- Watch the sample result on your phone, not your monitor: correct aspect, captions inside the safe area, audio in sync at the start and the end.
Running the one command
The entry point takes an input file, a voice or character choice, and an output folder. Exact flags depend on the version you cloned, so write your working command into a text file next to the project rather than trusting your shell history. For a first real run, feed it the shortest post you have. A short input finishes quickly enough that you will actually watch the result instead of assuming it worked.
What to edit before you publish
Check every name, number and date, because automation will faithfully reproduce your typo. Confirm the caption timing against the narration, since a line that appears early reads as an error. Trim the first and last frame so the loop does not flash. Watch the loudness on a phone speaker with the volume low: narration that disappears under a music bed is the most common reason a short gets swiped past.
Where automated shorts fall apart
Long sentences overrun the card they were given, and the fix is shorter sentences rather than faster narration. Code blocks and tables do not belong on a vertical frame and will be cropped or shrunk into illegibility. Titles written for a blog are too wide for a phone, so write a separate short headline. Music added at full level buries speech, and nothing in the pipeline will tell you it happened.
A schedule that suits a content backlog
Keep a folder of finished posts and run the pipeline once a week at a fixed time, then review every result in the same sitting before anything is queued. A weekly batch with one review window beats a daily scramble, because you notice the pattern in the failures after the third or fourth video instead of after the thirtieth.
| Stage | What runs | What usually breaks |
|---|---|---|
| Scene cards | HyperFrames rendering | Text too wide for the frame |
| Narration | Voice model | Overrun on long sentences |
| Assembly | FFmpeg | Captions out of sync |
| Publish | Your review | Typos reproduced faithfully |
When editing by hand is faster
If the piece is one clip, has no narration, and you already know the shot you want, the pipeline costs you more than the edit does. Automation pays for itself on volume: the tenth video is where the setup time stops mattering.
The practical takeaway is simple: run the sample first, keep your working command written down, review every result on a phone, and reserve the pipeline for backlogs rather than single videos.
— Nam Hoai