Featured
- Get link
- X
- Other Apps
Rendering Videos on GitHub Actions for Free: My Remotion Setup
When I started building tutorial videos for my YouTube channel Omilabs with code, the slowest part was never writing the script. It was waiting for renders. A single 8-minute 1080p episode made with Remotion could keep my machine busy for a long time, and I had dozens of episodes and Shorts in the queue. In this post I explain how I moved all of that rendering to GitHub Actions, how the setup is structured, what it costs, and the limits you should know before copying it.
Why I Stopped Rendering Videos Locally
My videos are generated, not edited. Each episode starts as a small Python spec file with the narration and scene list. A build step turns that into speech with an open text-to-speech model, aligns timings, and produces a JSON "props" file. Remotion, a React-based video framework, then renders the final MP4.
This works well, but rendering is CPU-heavy. Running it on a cloud dev box or my own PC had three problems:
- It blocked everything else. While a render was running, the machine was close to useless.
- It was fragile. If the session went idle or the machine slept, the render died halfway and I had to start again.
- It was sequential. One episode after another meant a long series took days.
I wanted something that could render many videos in parallel, did not depend on my laptop being awake, and cost nothing.
The Idea: One Video = One GitHub Actions Job
GitHub Actions is usually used for tests and deployments, but a workflow job is really just a Linux machine that runs your commands. A video render is also just a command. So I treated each video as a job.
I created a separate public repository that contains only the rendering engine, the episode specs, research notes and pipeline scripts. It contains no credentials at all. Public repositories get free minutes on GitHub's standard hosted runners, which is the main reason this setup costs me nothing. Uploading to YouTube happens in a different, private repository, so the public one never needs secrets.
The to-do list trigger
The render workflow is triggered by a push that changes a single file, ci/todo.json. That file is just a list of item names, for example an episode or a batch of Shorts. The workflow reads the list and turns it into a matrix: every item becomes its own job, and GitHub runs them in parallel.
This gave me a very simple interface. To render something new, I add its spec, add its name to the list, and push. Nothing else.
What each job does
Every matrix job runs the same script with the item name as an argument. Inside, the steps are:
- Install dependencies. Node packages for Remotion, Python packages for the pipeline, ffmpeg, and the open TTS model files.
- Build audio. Generate narration with Kokoro, an open-weight TTS model, and build the timeline.
- Render. Run the Remotion render for the episode or Short composition.
- Post-process and QA. Normalise loudness, check duration and pacing rules, and write an audit file with pass/fail flags.
- Publish the output. Push the finished MP4 and a small metadata package to dedicated branches.
On my first measured test, the audio build took about 3 minutes and render plus post-processing took about 17 minutes for one long episode. Because many jobs run at the same time, a whole series finishes in roughly the time of the slowest few jobs, not the sum of all of them.
Handling Large Video Files Without Paid Storage
The tricky part was storing the outputs. Git rejects single files larger than 100 MB, and Git LFS has a limited free quota. I did not want to pay for storage just to move files between two repositories.
My solution was simple:
- Each finished video is split into parts of at most 45 MB.
- The parts are committed to an orphan branch named after the file, such as
media/episode-name. An orphan branch has no history, so it does not bloat the main branch. - A second branch,
pkg/item-name, holds the metadata: title, description, tags, captions and the QA audit.
The uploader in my private repo fetches a video's parts only when it is about to upload it, joins them back together, and deletes the branch after a successful upload. Storage stays small because videos only live on GitHub while they are waiting.
Making the Workflow Safe to Re-run
Things fail. On my first full run, a handful of jobs failed because two Python packages were missing from the install step. Because of how the workflow is designed, fixing it was easy:
- Idempotent items. If a
pkg/branch for an item already exists, the job skips it. Re-running the whole list only renders what is missing. - Independent jobs. Set the matrix
fail-fastoption to false so one failed job does not cancel the others and a single bad spec does not waste the whole batch. - Audit gates. A video is only eligible for upload if all its QA flags pass. A video that renders but fails a pacing or audio check is held back instead of going live.
I also keep each job self-contained. It installs everything it needs from scratch, so there is no hidden state on a runner that could make one render behave differently from another.
Practical Tips If You Want to Try This
Keep secrets out of the render repo
If you make the repository public for free minutes, assume everything in it is visible to the world. Keep API keys, OAuth tokens and upload logic in a separate private repository. The render side should only produce files.
Use a lighter render for Shorts
Vertical Shorts of 25 to 40 seconds render much faster than long episodes. I group several Shorts into one batch item so I do not pay the setup cost (installing packages and models) for every single Short.
Watch your runner limits
Hosted runners have limits on job duration, disk space and how many jobs run at once depending on your plan. Long 4K renders may not fit comfortably. For my 1080p tutorials it works, but test one item before queuing fifty.
Check the licences
Remotion has its own licence terms, which depend on who is using it, and TTS models also come with licences. Read them for your situation before you build a production pipeline on top of them.
What This Changed for My Channel
The biggest change was not speed, although parallel rendering helped a lot. It was reliability. My machine no longer has to stay awake. Rendering happens on GitHub, uploading happens on GitHub, and YouTube itself publishes each video at its scheduled time because I upload them as private with a publish date. I check status from a browser and only step in when an audit fails.
It also made the channel easier to improve. If I change a visual style in the engine, I can re-render a batch by editing one list and pushing. That kind of iteration would have been painful with manual editing.
There are honest limits. Debugging a failed render on a remote runner is slower than on your own machine, because you read logs instead of watching the preview. Free minutes and runner limits can change, so I treat this as a smart free option today, not a permanent guarantee.
Conclusion
If you already generate videos with code, rendering on GitHub Actions is a practical way to remove your own computer from the loop. Put one video in one matrix job, keep the render repository free of secrets, store large outputs as split files on orphan branches, and make every job safe to re-run. With that structure, a full series of tutorials can render in parallel while you work on the next script.
Written by Omkar Vijay Ghate, Mumbai.
More guides on this blog
Voice AI agents
- How to Reduce Latency in AI Voice Agents
- How to Write a System Prompt for an AI Voice Agent
- How to Test an AI Voice Agent Before Launch
- How to Read AI Voice Agent Call Logs
- Connecting AI Voice Agents to VICIdial and Asterisk
- Multilingual Voice AI for India
- Voice Cloning for Business in India
AI agents and automation
- What Is Agentic AI?
- How to Build an AI Agent Without Code
- How to Build a WhatsApp RAG Chatbot
- AI Workflow Automation with n8n
- Prompt Engineering Guide 2026
- AI Customer Service in India
- AI vs Human Customer Service
- The Future of Work with AI Agents
- AI and Human Creativity
YouTube automation
- Get link
- X
- Other Apps
Popular Posts
How to Reduce Latency in AI Voice Agents: A Practical Checklist
- Get link
- X
- Other Apps
How to Read AI Voice Agent Call Logs: Status vs Real Outcome
- Get link
- X
- Other Apps
Comments
Post a Comment