Iklan

FFmpeg + Python subprocess + ASS vs. Remotion

 

Laptop glowing with colorful code beside a smartphone playing a bright vertical video, blue and orange light

Remotion is the famous answer when someone asks how to make videos with code. You write React components, Remotion plays them in a headless browser frame by frame, and FFmpeg stitches the frames into an MP4. It works, and the docs are good. But for one specific job, daily vertical reels built from still images, voiceover, music, and burned-in captions, a single FFmpeg binary driven from Python beats it on speed, size, and cost. I compared twelve tools against that exact workload, and the winner was not the famous one.

What Remotion actually costs you

For a solo creator, Remotion costs $0. The free license covers individuals and teams of up to three people, commercial use included. Money is not the reason to leave. The stack is.

Remotion needs Node.js, React, and a headless Chrome to render. All together that runs to about 870 MB on disk, and every render boots a browser to screenshot each frame. Above three people the license turns into $25 per creator seat per month, or $0.01 per automated render with a $100 monthly minimum. None of that hurts a solo dev. What hurts is the failure mode: when Node or Chrome breaks on a headless VM, there is no fallback. Remotion has no "FFmpeg only" mode, so a broken browser means no video at all.

The FFmpeg way, in one paragraph

One binary, no runtime, no browser. A small Python builder reads a JSON job file, writes an ASS caption file, builds one filter_complex string, and calls FFmpeg a single time through subprocess, with the arguments passed as a list, never as a shell string. The same input and the same command give the same output, and a non-zero exit code means the render failed. That is the whole pipeline, and it runs from cron without anyone watching.

Each scene gets a slow Ken Burns zoom through zoompan, scenes join with an xfade chain, captions burn in through the ass filter, a short drawtext call puts a watermark in the top-right corner, and the music track drops to volume 0.12 under the voiceover before amix mixes the two. The JSON job is the only thing an agent writes. The builder owns the filtergraph, because a five-to-eight-scene xfade chain is long and one wrong offset ruins the timing.

The shape of the call looks like this (the builder fills in the image inputs and the filtergraph):

import json, subprocess

job = json.load(open("reel-042.json"))
ass_file = build_captions(job["captions"])   # writes captions.ass
filtergraph = build_filtergraph(job)         # zoompan + xfade + ass + drawtext

cmd = ["ffmpeg", "-y",
       "-i", job["voiceover"], "-i", job["music"],
       "-filter_complex", filtergraph,
       "-map", "[vout]", "-map", "[aout]",
       "-c:v", "libx264", "-preset", "veryfast", "-crf", "20",
       "-pix_fmt", "yuv420p", "-r", "30",
       "-c:a", "aac", "-b:a", "128k",
       "reel-042.mp4"]
subprocess.run(cmd, check=True)

The speed gap is not close

One head-to-head benchmark from videobycode.com, measured 9 August 2026, rendered the same 30-second clip (1920x1080, 30 fps, three scenes plus a caption bar) with FFmpeg 8.0.1 and MoviePy 2.2.1. FFmpeg finished in 7.5 seconds. MoviePy took 86.6 seconds. That is 11.5 times slower, and it matches what the architecture predicts: MoviePy renders frames in Python one at a time, while FFmpeg stays in C the whole way through.

Two caveats before anyone quotes that number. The benchmark ran on Apple arm64 hardware, not on the 2 vCPU, 7.7 GB headless VM this workload targets, so treat 7.5 and 86.6 as direction and order of magnitude, not as a promise for your machine. And the gap narrows or widens with the preset: upscaling images before zoompan costs extra time. The honest test is one real 50-second reel on the real VM, which the research behind this post did not run.

Why ASS, and why not drawtext

Captions are where this workload is won or lost, and ASS wins it. The ass filter hands caption rendering to libass, which gives you font, size, color, outline, alignment, margins, and multi-line wrapping in one file. DejaVu Sans-Bold at 60 px, white with a black outline, bottom-center, wrapping across lines, frame-exact timing: all of that is a few lines in a .ass style block.

drawtext can do one thing well here, and it is the watermark. One short line, top-right, frame-exact. It cannot wrap text and it cannot do multi-line captions, so it stays out of the caption job entirely. Mixing the two filters up is the mistake that makes people say FFmpeg captions are painful. They are not painful. The wrong filter is.

The traps are real, and they are all avoidable

zoompan rounds its x and y coordinates to whole numbers, so a slow zoom jitters unless you upscale the image first (scale=8000:-1 is the usual trick) and scale back down after. The xfade chain for five to eight scenes is long, and every offset has to be right, which is why the builder computes it and no one writes the filtergraph by hand. And not every FFmpeg build ships with libfreetype, so check that drawtext and ass exist in your build before you write the pipeline: ffmpeg -filters | grep -E 'drawtext|ass|zoompan|xfade' tells you in one second.

Validation is part of the pipeline, not an afterthought. A render counts as a success only when the exit code is 0, ffprobe reads the file clean, and two or three extracted frames look right. That last check catches the caption that wrapped wrong or the watermark that landed on a face.

What you give up

None of this is free. Dropping Remotion means dropping Remotion Studio, so there is no scrubbing preview; a preview is a fast render, or a few extracted frames. You lose React components with typed props, the transitions package, the built-in caption and Whisper helpers, and the large template and agent-skill ecosystem around Remotion. You lose Lambda-based scale and the declarative easing functions, spring and interpolate, that make motion graphics code read so well. zoompan expressions and ASS timing replace them, and they read worse. If your job is motion graphics, keep Remotion. If your job is a slideshow with captions and two audio tracks, the trade is worth it.

The rest of the field, briefly

MoviePy 2.x is the runner-up, and it is the easiest code in the whole comparison for an agent to read: ImageClip, CompositeVideoClip, write_videofile. It also renders about 11.5 times slower than raw FFmpeg, and its TextClip in version 2 has a bounding-box bug that clips ascenders and descenders unless you use method='caption' or render text with Pillow. Its last release was May 2025. Keep it as the backup that reads the same JSON job file, in case the filtergraph ever becomes unmaintainable.

After those two, the field thins out fast. Editly gives you a declarative JSON5 spec over FFmpeg and built-in Ken Burns, but its last stable release was December 2022 and its headless-gl dependency has a history of failing to build on Node 22. MLT, the engine behind Kdenlive and Shotcut, is fast C and genuinely headless, but its XML is verbose and its caption tooling never matches ASS for this exact spec. HyperFrames, HeyGen's HTML-to-video framework, has the best typography of any candidate because it is just CSS, yet it is pre-1.0, born March 2026, and still needs Chrome. Revideo's own team says they are focused on Midrender now and are not working on Revideo. Motion Canvas is dormant, Blender's editor needs a bigger machine than the 2 vCPU VM, Manim animates math instead of slideshows, and the cloud APIs all fail the one hard requirement: free, daily, commercial, no watermark.

So which one?

Pick Remotion when the video is the product: motion graphics, reusable React components, a team that already lives in TypeScript, and renders that need to scale on Lambda. FFmpeg with a Python driver fits the other case, when the video is a daily chore: the same shape every day, images plus voice plus music plus captions, rendered by cron on a small headless machine, where the only things that matter are that it finishes, that it finishes fast, and that it costs nothing. Twelve tools were measured against that chore. One binary won.

Sources: videobycode.com, Stork Remotion review, DEV: Remotion vs HyperFrames vs CoAnimator, SpotSaaS Remotion review, The Rundown: Remotion. Version numbers and prices are snapshots from research dated 9 November 2026; check the vendor pages before committing.

Comments