Skip to content
Jeremy Ayza
All cases

Personal project

AI video pipeline for YouTube

A personal project. I extend an open source project that makes videos with AI, and I use it to run my YouTube channel. I cut the cost per video from about 2.50 USD to under 0.50 USD.

Problem

I extend an open source project, AI Content Automation Engine, that already had the 7-step pipeline: script, images, voice, video, subtitles, music and delivery. AI models do the script, the images, the voice and the subtitles. I added 74 commits of my own, and I use it to run my YouTube channel, Hackea Tu Riqueza (personal finance, in Spanish).

Each video cost about 2.50 USD. Images were the biggest cost: they were generated through the API with many reference images.

Decision

I cut the image cost in two steps:

  1. One reference collage per scene, instead of several images.
  2. Generation through Google Labs Flow, with Playwright and a Chrome extension I built (WXT, React, TypeScript). It can be swapped with the Gemini API. Image generation in Flow uses no credits.

The extension works through a queue of prompts from a script.json file. It reads Flow’s API responses by intercepting fetch and XMLHttpRequest, pauses the queue on rate limits and downloads the images sorted by scene.

The 7 pipeline steps, and the three where I changed something. The original pipeline has 7 steps: script, images, voice, video, subtitles, music and delivery. I changed three: for images, one collage per scene and generation in Flow with Playwright and an extension; for subtitles, Whisper moved from CPU to GPU; for delivery, automatic scheduled upload to YouTube. Original pipeline (7 steps) What I changed 01 Script AI model 02 Images AI model 1 collage per scene Flow, Playwright, extension 03 Voice AI model 04 Video 05 Subtitles Whisper CPU to GPU whisper.cpp with CUDA 06 Music 07 Delivery Automatic upload scheduled on YouTube
The 7 pipeline steps, and the three where I changed something.

I also moved Whisper from CPU to GPU (whisper.cpp with CUDA), moved the steps that did not need a pro model to cheaper models, and added automatic upload to YouTube, which schedules each video on the next free date. I also simplified the architecture, from hexagonal to a feature-based structure that fits the size of the app.

Result

The pipeline generated all 190 videos on the channel (October 2026). The cost per video went from about 2.50 USD to under 0.50 USD.

Limit

It only runs on Windows with an NVIDIA GPU, and it has no tests.

Search this portfolio

The embeddings are computed in your browser. Nothing is sent to a server.