Skip to content

Conversation

@ASchwad
Copy link

@ASchwad ASchwad commented Nov 29, 2025

A Next.js starter template that utilizes an LLM to generate Remotion code, allowing users to preview and edit the output directly in the browser.

Requirements

  •  LLM-based Remotion Code Generation (Initial Code generation)
  • Live editing: Allow manual edits of the remotion code (changes should be "live" visible in the Video Preview)
  • Easy copy paste UX
  • Prompt examples
  • (Optional) LLM-based Remotion Code Editing (Allow user to edit the generated code with a follow up prompt)
  • (Optional) Leverage @remotion/lambda to render and download the generated video
  • (Optional) Documentation, once we have some experience with the Generation process

@vercel
Copy link
Contributor

vercel bot commented Nov 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
remotion Error Error Dec 7, 2025 0:53am

@ASchwad ASchwad changed the title Templates: LLM-based Code Generation Template: LLM-based Code Generation Nov 29, 2025
@vercel
Copy link
Contributor

vercel bot commented Nov 29, 2025

@ASchwad is attempting to deploy a commit to the Remotion Team on Vercel.

A member of the Team first needs to authorize it.

});

if (!response.ok) {
throw new Error(`API error: ${response.status}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get back a 500 error code if you did not enter a API key. Can we properly handle this (not 500) and propagate the error to the frontend, instructing the user that they need to set an API key?

Like for your example:

The environment variable "OPENAI_API_KEY" is not set. Add it to your .env file and try again.

promoBanner: {
width: 1280,
height: 720,
src: '/img/code-generation-template.png',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't seem to exist.

contributedBy: null,
},
{
homePageLabel: 'Code Generation',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call the template "Prompt to Motion graphics"?

And the slug and folder name is prompt-to-motion-graphics and template-prompt-to-motion-graphics

While it is longer, it is more descriptive of the use case and aligns with the other template template-prompt-to-video

Also happy to hear better name suggestions!

repoName: 'template-code-generation',
description: 'AI-powered code generation for Remotion',
longerDescription:
'A template that uses AI to generate Remotion video code from prompts.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'A template that uses AI to generate Remotion video code from prompts.',
'A SaaS template for "Prompt to Motion Graphics" products. Generates Remotion code, streams it to the frontend, and compiles and previews it in the browser.',

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old logo, can be removed

});

export const defaultMyCompProps: z.infer<typeof CompositionProps> = {
title: "Next.js and Remotion",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this can be removed


@custom-variant dark (&:is(.dark *));

:root {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check what parts of this are actually necessary and which ones are dead code?
We also don't seem to have light/dark theme support, so the variant can probably be removed

/>
<Composition
id="NextLogo"
component={NextLogo}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NextLogo composition can probably be removed

useVideoConfig,
} from "remotion";

export const TextFade: React.FC<{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused component (also remove all related code)

const { fps } = useVideoConfig();
// Text content - easily customizable
const WORDS = ["One sec please :)", "Getting started", "with your", "Code Generation"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cute, maybe too cute 😄

The user may be confused and think this is the output animation since it has a Play button and is animated.
Can we replace it with a boring, ordinary spinner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants