All posts
Wait, Claude Can Edit Videos Now? We're So Cooked.

Wait, Claude Can Edit Videos Now? We're So Cooked.

Tuan Phan V. Q.'s avatarTuan Phan V. Q.15 min read
Table of Contents10 sections

An introduction to Remotion, and how I ended up making an animated music video using Claude Code and React.

Wait, Claude can animate now?

I've been using AI coding agents for quite a while now. As a software engineer, watching Claude write code, build applications, or put together entire interfaces isn't particularly surprising anymore. It's impressive, sure, but at some point you get used to it.

Recently, though, I've started hearing about people using Claude Code for something a little different: animation.

And I'm not talking about those small HTML, CSS, and JavaScript animations that Claude occasionally produces in a browser. Those can be pretty neat, but they're usually closer to animated web interfaces than actual animated videos.

Then I came across something that genuinely caught me off guard.

Someone had made a fan-made animated music video for Mili's world.execute(me); (2016), using Claude Code.

If you're familiar with the song, you'll probably appreciate the irony. It's a song built around programming metaphors, simulations, execution, and the relationship between a program and its creator. Almost a decade later, someone decided to bring it to life by asking an AI coding agent to write the code for an animated music video.

You really can't make this stuff up.

The creator, HuJK, used gpt-image-2 through Codex to generate the artwork and Claude Code to handle the animation, with a framework called Remotion doing the actual video rendering.

Now, when someone tells me they made an animation with Claude, I usually expect a few illustrations sliding around, some fades, maybe a couple of camera zooms, and a generous amount of motion blur to make everything look cinematic.

But this was different.

There were character movements, scene transitions, synchronized lyrics, camera movements, recurring visual elements, and an overall sense of artistic direction. It actually looked like someone had put thought into how the music and visuals should work together.

And perhaps the most surprising thing?

It didn't immediately look like AI slop.

I'm not saying it was indistinguishable from professionally produced animation. But considering the number of AI-generated videos floating around the internet, it was considerably better than I expected.

Naturally, I had to figure out how it worked.

I assumed there was some clever After Effects automation involved, or perhaps a collection of Python scripts stitching everything together through FFmpeg.

Nope.

It was React.

Yes, React. The same library we use to build websites, dashboards, and all those forms nobody particularly enjoys filling out.

Apparently, we're making anime music videos with it now.

And that's how I discovered Remotion.

Wait, we're animating with React?

To understand why this surprised me, it helps to look at how I traditionally thought video animation worked.

Take Adobe After Effects, for example.

You create a composition, import your assets, arrange them into layers, and use a timeline to control what happens throughout the video. Want a character to move from left to right? Set a position keyframe at the beginning, another at the end, and adjust the easing so it doesn't look like the character is being dragged across the screen.

Want a title to fade in? Animate its opacity. Want to simulate a camera movement? Animate the relevant properties of your layers or camera.

Of course, After Effects supports expressions, scripts, plugins, and plenty of automation. But much of the traditional workflow revolves around manipulating things visually on a timeline.

Now imagine doing something similar, except instead of dragging keyframes around, you write JavaScript.

That's essentially the idea behind Remotion.

Remotion is a framework for creating videos programmatically using React. Rather than building a traditional video-editing interface, you describe what each frame should look like through React components.

You can still have layers, transitions, animations, effects, and all the other familiar pieces of a video composition. The difference is that much of the animation logic lives directly in code.

For example, suppose we want some text to fade in and slide upward during the first second of a video.

In Remotion, we can do something like this:

import {
  AbsoluteFill,
  interpolate,
  useCurrentFrame,
  useVideoConfig,
  Easing,
} from "remotion";

export const AnimatedTitle = () => {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();

  const progress = interpolate(
    frame,
    [0, fps],
    [0, 1],
    {
      extrapolateRight: "clamp",
      easing: Easing.out(Easing.cubic),
    }
  );

  return (
    <AbsoluteFill
      style={{
        justifyContent: "center",
        alignItems: "center",
      }}
    >
      <h1
        style={{
          opacity: progress,
          transform: `translateY(${(1 - progress) * 40}px)`,
        }}
      >
        We're so cooked.
      </h1>
    </AbsoluteFill>
  );
};

Here, useCurrentFrame() tells us which frame we're rendering, while interpolate() maps that frame number to an animation value.

At the beginning, the text is transparent and positioned slightly lower. Over the next second, it becomes visible and slides into place.

That's it.

No manually placed keyframes. The animation is calculated from the current frame.

Of course, this doesn't mean keyframes are obsolete. Remotion has its own ways of describing transitions, sequences, easing, and spring animations. It simply makes those concepts accessible through code rather than requiring every animation to be authored through a graphical timeline.

You can also use CSS, SVG, Canvas, and WebGL, which opens up some rather interesting possibilities.

Remotion also provides a preview environment called Remotion Studio, where you can scrub through the timeline, inspect compositions, and preview changes. When it's time to render, Remotion uses browser rendering and video encoding tools to produce an actual video file.

And here's where it gets interesting.

A coding agent is already very good at reading and modifying code.

Instead of teaching Claude how to navigate a complicated graphical video editor, we can give it a project where the entire animation is represented as source code.

Want to change when a lyric appears? Modify its timestamp.

Want the camera to move differently? Adjust the animation function.

Want a character to blink every few seconds? Write that behaviour as a reusable component.

And because the composition is deterministic, the agent can render individual frames, inspect the results, and make changes without needing to sit through the entire video.

Suddenly, letting Claude animate something doesn't sound quite as ridiculous.

Well, it still sounds ridiculous.

But now it makes technical sense.

Naturally, I had to try it

After watching the original MV and exploring its repository, I decided to try making something similar myself.

One important thing to clarify: I didn't start from scratch.

HuJK's repository wasn't just an empty Remotion template. It already contained a working music video, audio-analysis tooling, animation helpers, scene structures, rendering scripts, and a workflow for coordinating animation work.

A significant amount of the engineering groundwork was already there, and I used that as the foundation for my experiment.

I wasn't trying to reinvent an animation engine. I wanted to see whether I could take an existing approach, supply my own song and visual direction, and let Claude Code produce a different music video.

The setup was straightforward enough.

I used ChatGPT to generate character illustrations and backgrounds. Claude Code handled the code, asset preparation, animation components, and scene construction. Remotion assembled everything into the final video.

At least, that was the idea.

In practice, Claude ended up coordinating quite a few more tools than I expected.

First, Claude needed to understand the music

One thing I hadn't really thought about before this experiment was how much audio analysis matters when you're making a music video.

You can't simply place a few effects at random timestamps and expect everything to feel synchronized.

The music needs structure.

Using the original project's audio-analysis tooling as a starting point, Claude processed the track to identify its beat grid, musical sections, and lyric timings.

The remix I chose had a fixed tempo of 140 BPM. Once that was established, beat and bar positions could be calculated mathematically instead of manually guessed.

The track was divided into sections such as the introduction, verses, pre-chorus, drops, breakdown, and ending.

Then came the vocals.

Claude used Demucs for vocal separation and Whisper with stable-ts to align the lyrics to the audio, giving individual words their own timestamps.

This wasn't entirely automatic. The remix omitted some lyrics from the original song, which confused the initial alignment process. Claude had to adjust the approach, and a few timestamps still needed manual correction.

Eventually, the timing information ended up in JSON files that the animation could read.

That meant lyrics, effects, and camera movements could be synchronized using actual timing data.

Not particularly glamorous, but pretty clever.

Then came the artwork

This was probably the part where I made my own life unnecessarily complicated.

I used ChatGPT to generate the artwork, with separate conversations acting as a character studio and an environment studio.

The goal was to maintain a consistent visual style throughout the music video, so I started with a character reference sheet and a set of design rules.

Claude used browser automation to interact with those ChatGPT conversations, submit image-generation prompts, and download the results. It also maintained a queue and logged the generated assets.

By the end, the process had produced around 33 source images, including character sheets, different poses, backgrounds, and other visual elements.

Of course, generating illustrations is one thing. Actually animating them is another.

A background image can be used relatively easily, but characters need to be separated from their backgrounds, sometimes divided into individual poses, and prepared so the animation system can manipulate them.

Claude used Real-ESRGAN to upscale images, rembg to remove backgrounds, and additional processing to clean up sprites and split pose sheets.

And then it did something I found considerably more interesting.

It generated depth maps.

Making a flat image pretend it's 3D

You know those shots in animated videos where the camera moves slightly and the foreground shifts differently from the background?

That creates a sense of depth, even when the original artwork is two-dimensional.

It's commonly called a parallax effect.

Claude used Depth Anything V2 to estimate depth information from the generated background images. The result is effectively a grayscale representation of how far different parts of an image might be from the camera.

Using those depth maps, the project could apply a custom WebGL shader to simulate camera movement through a flat illustration.

The camera could move forward, pan, zoom, or rotate slightly, while nearby and distant parts of the background responded differently.

It isn't true 3D, of course. A depth map can't magically reconstruct scenery hidden behind objects, and sufficiently aggressive camera movements can reveal distortions.

But for subtle cinematic movements, the illusion can be surprisingly effective.

Around that, Claude built or adapted components for character movement, blinking, breathing, swaying, animated lyrics, visual effects, and props.

Individual scenes were React components, with animations calculated from the current time and the audio-analysis data.

The project eventually contained ten scenes, with some of the scene-building work delegated to additional Claude agents in parallel.

And here's the part I found amusing: Claude wasn't just writing a few animation functions.

It was coordinating asset generation, image processing, audio analysis, shader code, scene composition, and rendering.

All to make some PNGs move.

LMAO.

Of course, something broke

Because it wouldn't be a software engineering project if everything worked on the first attempt.

After the scenes were assembled, Claude used still-frame rendering and contact sheets to inspect the composition. Rather than constantly rendering the entire video, it generated selected frames and arranged them into grids to check framing, timing, and visual consistency.

Then the actual render got stuck.

Remotion couldn't get past the composition-loading stage, and Chrome was throwing errors involving a missing icudtl.dat file.

After some debugging, the problem turned out to be related to macOS folder permissions and the way the browser process was launched from a project stored under the Desktop directory.

The workaround involved placing the headless browser somewhere accessible and configuring Remotion to use that executable.

It was strangely reassuring.

Even when we're supposedly making an anime music video with artificial intelligence, we're still debugging obscure browser and operating-system issues.

Some things never change.

Eventually, the render worked. The output was a little under three minutes long, at 1080p and 60 FPS.

And then I finally got to watch the result.

The result: well, it's still kinda slop

Okay, here's where I have to be honest.

My version was nowhere near as polished as the original video.

LMAOOOO.

The overall result was coherent. It followed the song, switched between scenes, synchronized the lyrics, and maintained a recognizable visual direction.

But there were plenty of imperfections.

Character consistency was an obvious problem. The character looked similar across most scenes, but small details changed between generated images. Clothing, proportions, line weight, lighting, and other design elements weren't always consistent.

Some of the cut-out sprites had imperfect edges. Certain backgrounds didn't quite match the characters placed in front of them. And although the animation was technically smooth, some movements felt a little too smooth.

You know that floating, endlessly swaying look that makes something immediately feel AI-generated?

Yeah. That.

A few scenes were also too busy, and there were some visual glitches that definitely weren't intentional artistic choices.

It was still pretty slop.

But here's what surprised me.

Despite all those issues, it was still a coherent animated music video.

The lyric timing worked. The scenes followed the structure of the music. The camera movements were generally smooth. The composition had a beginning, a middle, and an ending.

And I didn't personally animate those scenes through a traditional video editor.

I had supplied the creative direction, generated the artwork through ChatGPT, and used an existing project as the foundation. Claude handled much of the engineering and assembly.

That's a rather strange thing to experience.

One observation from this experiment is that the source artwork matters enormously.

Even a well-implemented animation system can't magically fix inconsistent illustrations. If the character's outfit changes between poses, or the generated backgrounds have noticeably different visual styles, no amount of easing or shader work will completely hide it.

I suspect a stricter asset-generation workflow, better character references, more manual selection, or a different image-generation model might improve the result.

The original creator also chose a visual style that appeared better suited to this kind of animation. Simpler shapes and more controlled designs can make inconsistencies less noticeable.

I haven't tested those approaches against each other, so I wouldn't call that a definitive conclusion.

But it does make me wonder how much better the result could become with improved source assets, even without major changes to the animation code.

So, are we cooked?

I've gotten fairly accustomed to AI writing code.

If Claude can generate an API, create a frontend, or debug some complicated application issue, I don't find that particularly shocking anymore. I've seen enough of it that it has become part of my normal development workflow.

But this experiment felt different.

Not because Claude suddenly became an expert animator. It clearly didn't. Put my result next to professionally produced animation, and the differences are obvious.

What surprised me was how well a coding agent could coordinate tools from several completely different disciplines.

Audio processing, image generation, computer vision, shader programming, React components, video rendering — none of these technologies is particularly new on its own.

Remotion has existed for years. Depth-based parallax isn't a new idea. Audio separation, image upscaling, and programmatic animation have all been around in different forms.

But combining them into a working production pipeline traditionally requires knowledge across several technical and creative domains.

And now a coding agent can help assemble and operate that pipeline.

That's what caught me off guard.

I'm not an animator. I don't have professional motion graphics experience, and I certainly wouldn't have thought to build a depth-based WebGL camera system myself just to animate some illustrations.

Yet here I was, watching Claude coordinate a collection of tools, write animation code, generate scenes, inspect frames, fix rendering issues, and eventually produce a video.

The result was imperfect, but the fact that it worked at all was impressive.

And maybe that's the slightly unsettling part.

I used to think of AI coding agents primarily as tools for writing software. But software is also how we build many of the tools used in creative work.

Give a coding agent access to the right framework, assets, and production workflow, and suddenly the line between writing software and producing something creative with software starts looking a little less obvious.

That doesn't mean human animators are obsolete. There is an enormous difference between getting images to move and creating genuinely expressive animation with consistent artistic judgment.

But the barrier to experimenting with animation has become much lower than I expected.

So, can Claude edit videos now?

Well, sort of.

It isn't sitting inside After Effects dragging keyframes around. It's writing code that describes a video, using other tools to prepare the assets, and letting Remotion render the result.

And somehow, that makes the whole thing even more ridiculous.

I started this experiment expecting some animated PNGs.

I ended up with a functioning little animation-production pipeline, a surprisingly coherent music video, and a new appreciation for just how weird AI-assisted development has become.

It's still slop.

But the slop is getting surprisingly sophisticated.

We're so cooked.


References and credits

This was a personal technical experiment built on an existing open-source project. The results and observations are my own; the original project's engineering and creative work belong to its creator.