Rendering video on your own computer instead of the cloud
3 min readguideother
Short answerYou can draw the picture with code, produce the frames on your own computer and turn them into video with your graphics card. Sound, narration and subtitles also come out locally with free tools. What wasted the most time was the quality check itself, so you have to put a limit on it.
Why local
I make the videos for five YouTube channels with a single Python package. My rule was clear from the start, no paid services. Cloud rendering charges by the hour, and AI image services cost money and also make every video look like the others. On my own computer I decide every frame, and I can try as many times as I want.
The list of channels and their numbers are on the studio page.The pipeline step by step
- Every video starts with a folder and a recipe file. Narrated videos also have a script of 1,200 to 1,400 words and a list of sources.
- First a rough storyboard comes out, and it gets checked for looking too much like earlier videos.
- A preview render is made at low resolution. Most mistakes show up here, and only after that does it move on to the full render.
- Full render. The picture is drawn in 2D with Skia, frames are produced in parallel, and ffmpeg turns them into video with the NVIDIA graphics card’s encoder.
- Measurement and critique. Picture, sound and length get measured, then a separate model that has never seen the video watches it and critiques it.
- The package goes to the upload folder. When I approve, it gets uploaded and scheduled, and subtitles get added.
Only one heavy job runs at a time. When I started two renders on top of each other, both slowed down and the computer became unusable. A simple lock file fixed that.
Sound
On the piano channels the music is played from a MIDI file. sfizz or fluidsynth makes the sound, and hall reverb is added on top. Every video is brought to the same loudness, −14 LUFS, which is the level YouTube pulls things to anyway.
Narration is done with Gemini TTS. I use separate voices for English and Turkish, and if the service is down, Kokoro running locally takes over.
Subtitles
faster-whisper works out which second every spoken word is said at. With that timing, subtitles are produced in nine languages. There’s no need to write subtitles by hand at all.
Physics videos
The marble races and press experiments on the Half Second channel happen in a real physics engine. pymunk calculates the collisions, Skia draws them, and the video comes out at 1440p and 60 frames per second. I only see the result when the render is done too, I don’t know ahead of time who’s going to win the race.
What didn’t work
Human animation with code
On 22 November I tried drawing a talking, walking cartoon character with code in eight different ways. A stick figure with motion capture, two separate pixel art styles, a ready-made sprite pack, 3D with Three.js and others. They all got stuck in the same place, the character never felt alive. I switched the channel to wordless physics worlds.
The painted look
I tried a layer that gives the picture an oil paint effect. It lowered the quality, and I dropped it on 25 November.
Endless critique
For a while I had every video critiqued for seven rounds, and 324 lessons had piled up. The videos weren’t getting better, they were only getting later. Now there are at most two rounds of fixes.
If you’re going to build one
- Always do a low-resolution preview first.
- Run one heavy job at a time.
- Measure loudness, don’t set it by ear.
- Put a limit on critique rounds from the start.
- If you need character animation, look at ready-made tools before code.
The tools come from the studio’s architecture notes, the dates from the log. I wrote this post together with Claude.