VideoFlowcodeGitHubStudioTry itCoreRenderersReact Video EditorPlaygroundExamplesDocscodeGitHubStudioTry it
← Back to Blog

Composing Videos in Python and Go: The Power of Language-Agnostic VideoJSON

October 3, 2026 · By VideoFlowLearn how VideoFlow's JSON-first architecture enables programmatic video generation in Python, Go, and beyond, decoupling composition from rendering.Composing Videos in Python and Go: The Power of Language-Agnostic VideoJSON

Composing Videos in Python and Go: The Power of Language-Agnostic VideoJSON

For a long time, programmatic video was split into two camps: the "string-concatenation" world of FFmpeg shell scripts and the "component-tree" world of React-based frameworks. If you weren't writing JavaScript, you were often stuck building fragile command-line strings or paying for proprietary SaaS APIs.

VideoFlow changes that by treating the video timeline as a portable, documented data structure: VideoJSON. While our official renderers run on Node.js and in the browser, the definition of your video is just data. This means you can compose complex, cinematic videos in Python, Go, Rust, or any language that speaks JSON, then hand off the rendering to a VideoFlow worker.

The Decoupling Advantage

Most modern video-as-code tools are tightly coupled to their runtime. If you want to use Remotion, your entire scene logic must live inside a React component. This is great for frontend-heavy workflows, but it's a bottleneck for engineering teams whose data pipelines live in Python or whose high-concurrency backends are built in Go.

Architecture of language-agnostic video generation

By centering the architecture on VideoJSON, VideoFlow allows you to separate composition from rendering:

  1. Composition: Your Python or Go service processes data and emits a VideoJSON document.
  2. Rendering: A lightweight Node.js worker receives that JSON and uses the @videoflow/renderer-server to output an MP4.

This separation is what makes VideoFlow a true Remotion alternative for teams that need to scale video generation across different stacks.

Example: Building a Video in Python

You don't need a heavy SDK to generate a VideoFlow project. Since the schema is documented in our docs, you can build it with standard dictionary structures. Here is how you might define a simple branded title card in Python:

import json

video_json = {
    "name": "Python Generated Video",
    "width": 1920,
    "height": 1080,
    "fps": 30,
    "layers": [
        {
            "type": "text",
            "text": "Generated from Python",
            "fontSize": 6,
            "color": "#FF5A1F",
            "position": [0.5, 0.5],
            "keyframes": {
                "opacity": [
                    { "time": 0, "value": 0 },
                    { "time": 0.5, "value": 1 }
                ]
            },
            "settings": {
                "transitionIn": {
                    "transition": "blurResolve",
                    "duration": 0.6
                }
            }
        }
    ]
}

# Send this to your VideoFlow rendering worker
print(json.dumps(video_json))

Because the VideoFlow builder API is just a fluent wrapper around this JSON structure, your Python code remains clean and the resulting video is byte-for-byte identical to one authored in TypeScript.

Scaling with Go Workers

In high-throughput environments, you might use Go to handle the orchestration of thousands of video jobs. A Go service can manage the state, pull assets from S3, and construct the VideoJSON payload. It then pushes that payload to a pool of rendering workers running @videoflow/renderer-server.

Sleek render pipeline blocks

This pipeline is significantly more maintainable than chaining FFmpeg filters. You get access to the full suite of 27 transition presets (like blurResolve and lightSweepReveal) and 42 GLSL effects (like bloom and vhsDistortion) without ever writing a line of C++ or complex shell scripts. You can even test your JSON structures instantly in the VideoFlow Playground by pasting the raw data into the editor.

Why This Matters for AI and Agents

As we discussed in our post on how AI agents speak VideoJSON, LLMs are remarkably good at emitting structured data. Giving an agent a tool to generate video becomes trivial when the "tool" just expects a JSON schema. An agent can "think" in Python, generate the video structure, and trigger a render—all without needing to understand the nuances of a specific UI framework.

Getting Started with Agnostic Rendering

If you are ready to move beyond FFmpeg scripts but don't want to rewrite your entire backend in JavaScript, VideoFlow is the bridge you've been looking for.

By treating video as data, we've made it possible for every developer—regardless of their primary language—to build cinematic, professional-grade video automation.

VideoFlow

Open-source toolkit for composing videos from code.

Product

CoreRenderersReact Video EditorPlaygroundStudio

Learn

DocsAPI referenceExamplesvs. Remotionvs. FFmpeg

Project

GitHubLicenseContactTermsPrivacy

From the blog

All posts →Animated Infographics as Code: Building a Reusable Data-Viz LibraryBeyond Static Images: Generating Dynamic Social Share Videos from MetadataHow to Embed a Full-Featured Video Editor in Your React AppStop Concatenating Strings: A Migration Guide from FFmpeg to VideoFlowHow to Give Your AI Agent a Video Tool: An LLM-to-Video PlaybookComposing Videos in Python and Go: The Power of Language-Agnostic VideoJSONMarkdown to MP4: Automating Technical Explainer Videos with VideoFlowMastering GLSL Effects: Building Cinematic Pipelines with Code
© 2026 VideoFlow. Apache-2.0 core.