Converting a Remotion project to an app
If you have started from any Remotion template except the Next.js and Remix templates, you currently have an app where you can start the Remotion Studio.
If you would like to now turn your project into an app, follow these steps.
remotion/Root.tsx
file of the new project, replace the sample code with the code from src/Root.tsx
from your existing project. Include all other components recursively, until npx tsc -w
does give no errors anymore.public
folder into the new project.<Player>
is rendered:- In the Next.js Pages Dir template: Under
pages/index.tsx
. - In the Next.js App Dir template: Under
app/page.tsx
. - In the Remix template: Under
app/routes/_index.tsx
.
Choose the main composition that you want to render in the Player and include it's component
and other metadata in the <Player>
. You may import the component from the remotion
folder so it is imported in both the Studio and the app.
If you want to remove the duplication of metadata, you can define constants such as DURATION_IN_FRAMES
and FPS
in a separate file and import the constants in both the Studio and the app.
If you use calculateMetadata()
, see here how you can use it with the Player.
remotion.config.ts
, look up how to apply it to your framework as well.Next steps
Good luck with your new app!
- Chat with other builders on Discord.
- Post your app on
#showcase
and tag@remotion
on x.com if you build something! - If you build together with others, ensure you have the proper Remotion license.