Skip to content
Local Remotion Animations W/ Ollama, OpenCode, and Gemma4 episode artwork

Jul 24, 2026 39 min

Local Remotion Animations W/ Ollama, OpenCode, and Gemma4

from Digital Dopamine Hosted by Digital Dopamine LLC

Local Model Aspirations For all of the folks out there who want to embrace AI but also have issues with the energy consumption and cost, I’m right there with you. When AI started to become mainstream and then eventually mandatory in enterprise work, I was very reluctant to use it and train these models that my company will eventually replace me with. Well…….that happened verbatim 😅. My previous place of work has been going through rounds of layoffs after a new set of C-suite execs strolled in to make “improvements” to the business, aka, “the company isn’t making enough money so, hire offshore, fire employees with IP knowledge, and go heavy on using AI.” I’m obviously exaggerating (kinda), but the point I’m trying to make is that AI is great when you have a solid plan on how to use it and try not to rush the process. Most companies didn’t take that approach, though, and got shot in the foot because of it. Does that mean we should oppose AI? Absolutely not. I actually love what AI can be used for, and I think there isn’t enough fine-tuning out there for specific use cases. Now, with Chinese models becoming much more competitive in intelligence, the cost difference is a no-brainer, and many companies are switching to these cheaper yet very capable models. (Image Source: https://techstartups.com/2026/06/29/western-companies-are-quietly-switching-to-chinese-ai-models-as-u-s-frontier-ai-prices-rise/) Then, when you use platforms like DeepInfra as your provider, scaling becomes less of an issue, and you only pay for usage and not a monthly subscription. Add the OpenRouter API in the mix, and you have the ability to swap providers at will. If costs ever change, if one provider hits you with rate limits, or if a provider goes down completely, OpenRouter is the failsafe that will forward your request to a different provider automatically (with the proper configurations) so your clients won’t have issues with the products/software you built for them. This just goes to show how far we’ve come with AI development, and like it or not, it’s a tool almost as important as the internet itself but potentially much more dangerous. While that danger may include physical harm, I’m more worried about the mental and intellectual harm that it’s doing and will continue to do if we don’t make some major changes in how the average person should approach AI. This is why I started diving into local models, with the understanding that they are not as capable as the frontier models, but that’s the point. They are SLMs and MLMs that you can leverage, but it will still require you to do some sort of critical thinking, which is a good thing. There is absolutely no reason for people who are using AI to just chat or ask a simple question, to be using the compute power and energy consumption of the frontier models. That’s one reason why I marveled over Google’s Gemma 4 series because, in theory, they have a model that should serve on just about any device. In practice, though, I’m learning some major limitations with these models, but most of them have to do with local compute power (as well as my current lack of knowledge on how to fine-tune these systems). That isn’t to say local models will never work; we have come so far with local models already that I'm sure in the next year or so, there will be a better generation of local 1st models that will work as smoothly as using a frontier cloud model. And “smoothly” is the keyword here, because in terms of intelligence, that’s not the main selling point of these local and more ethical models. Local Model Experimentation So that leads us to this lil ol’ experiment with me trying to build a “lower third” animation for my podcast intro. A “lower third” is just an animation on the lower left or right of your screen with the host name and title, or whatever you’d like to pop up there briefly (or at least that’s how I understand it 😄). So you’d think that a local model would be able to knock this out no problem, right?? If you have a beefy enough local machine, you’re golden. However, most people do not have a $5k+ home lab that can run these local models without major lag and bottlenecks. When the Gemma4:12b model was released, I was ecstatic because it was small enough for my Mac Mini (M4) not to hit memory limits, and it allowed enough headroom for me to record on OBS without OBS crashing. But reality hit me hard when I needed this model to run efficiently in any capacity for the task at hand. So I crafted 3 separate prompts for this task since, given the small context window limit of 32k I had to set, we needed to make sure to break up the tasks into individual prompts and sessions so the 12B model can stay as focused as possible. The original prompts are below: [1/3] Create src/LowerThird.tsx. Transparent background. Static layout only, no animation yet: a 12px-tall horizontal gradient bar (linear-gradient 90deg, #7B5BF0 to #4B7BE5) at x=120 y=880, an off-white (#F4F4F6) rounded rectangle behind two lines of text: primaryText in Archivo bold 48px #111111, secondaryText in Space Grotesk 32px below it. Props: primaryText, secondaryText (zod schema). Register in src/Root.tsx: id "LowerThird", 1920x1080, 30fps, 150 frames. [2/3] Animate the entrance (frames 0-21): the gradient bar scales in from the left using spring({frame, fps, config: {damping: 200}}), the rectangle then expands from behind it, the two text lines slide up 20px and fade in with a 4-frame stagger. Use only useCurrentFrame/interpolate/spring. [3/3] Animate the exit: frames 129-150 reverse the entrance. Hold frames 21-129. Then I'll run pnpm lint and paste any errors. But these evolved greatly throughout my multiple rounds. Before we get into what the final prompts were, we need to make sure that folks who want to follow along can get set up with the tools I used during this process. Setup 0. Scaffold the Remotion project # Prereqs: Node 18+ and pnpm pnpm create video # → name the project, pick a template (Blank is fine — the agent writes the rest) cd pnpm dev Then install the skills: npx skills add remotion-dev/skills That drops remotion-best-practices into the agent folders (.opencode/skills/, .claude/skills/, .agents/skills/, …) and records it in skills-lock.json, so OpenCode — and any other agent you point at the repo — picks it up automatically. 1. Serve the model with a real context window Ollama’s default context (~4k tokens) is far too small for agentic coding — OpenCode stuffs system prompt + skill rules + file contents into context, and when it overflows, Ollama silently truncates the oldest tokens. The model “forgets” your instructions mid-task and the failure looks like model stupidity. It’s a config problem. Note for context We will be setting 2 different contexts for Gemma. One will allow me to record at the same time but will reduce my context window. The other will give a better context window for a lesser chance of hallucination. You will also need to create Modfiles for our customized models to reference. Each modfile will be above the cat call. You can name the files whatever you want, but I’ve named the models according to their context window. To bake it in permanently via a Modelfile: Smaller Context cat > /tmp/gemma4-12b-16k.Modelfile /tmp/gemma4-12b-32k.Modelfile digitaldopaminellc.substack.com/subscribe

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Local Remotion Animations W/ Ollama, OpenCode, and Gemma4

0:00 39:20

No transcript yet.

Requests help us decide what to transcribe next.

Ələmdar Manafov Ələmdar Manafov Mən qarşıma çıxan suallara cavab axtarıram və hər kəs ilə paylaşıram. Sloqanım: Be Positive Sosial media hesablarım: Ələmdar Manafov INSTAGRAM və LİNKEDİN hesabı. Ələmdar Manafov known 8+ years Marketing Strategist | Branding & Digital Expert | Founder of Be Positive Company. He was born on 29th July, 1994 in Baku, Azerbaijan. Alamdar started his career at the age of 23 as a Social Media Advisor . He later started releasing his trainings on Social Platforms. He first released Personal Branding course in 2019.Alamdar is best known for his trainings on Instagram, Facebook. In November, 2020 Alamdar started to work with Big Companies. Then he created a YouTube channel which he uses for making videos and also to teach, provide tips, guide and help fellow Entrepreneurs to fit in the world. Hold The Line with Buck Sexton The First Digital Inc “Hold The Line with Buck Sexton” is Conservatism’s new command and control center. Former CIA Analyst and nationally syndicated radio host Buck Sexton is ready to stand athwart the progressive tidal wave. One of the movement’s fiercest “wartime conservatives”, Buck brings his unique perspective to America’s most pressing concerns, from domestic policy that values liberty to a foreign policy that puts American interests first. Hold The Line draws upon Buck’s encyclopedic knowledge of the issues, and his experience combatting America’s enemies abroad. Under assault on all fronts, Buck Sexton is ready to inspire viewers to take their place on the battlements and prepare to Hold The Line. The Brendan Ecker Influence Brendan Scott Ecker The Brendan Ecker Influence is hosted by Brendan Scott Ecker — a 27-year-old American entrepreneur, Michigan real estate agent, CEO of Gold Shark Media Ai, founder of PassRE USA, investor, law enforcement officer, former NCAA two-sport athlete, and author of Beyond the Beat and How I Made My Dorm My Office. Ecker went from a middle-class “Matrix” upbringing to building a fast-growing digital brand, scaling multiple businesses, and growing a YouTube channel with over 27,000 subscribers. With a background in Criminology, law enforcement, and competitive athletics, he blends discipline, strategy, and mindset into everything he teaches. On this podcast, Brendan breaks down the real frameworks behind wealth, business, real estate, marketing, AI, geopolitics, mindset, and personal growth. He discusses the journey in growing his businesses, documenting the wins, failures, and the tactical steps that helped him escape

Frequently asked questions

How long is this episode of Digital Dopamine?

This episode is 39 minutes long.

When was this Digital Dopamine episode published?

This episode was published on July 24, 2026.

Can I download this Digital Dopamine episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.