Index of every page on this site: llms.txt
All skills
dtsola avatar

/remotion-best-practices

@e86893e
by dtsoladtsola/xiaoyaosearch1k stars
54
Run it yourself

Best practices for Remotion - Video creation in React

  • 34 files
  • 90.3 KB
  • Updated 10 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/dtsola/xiaoyaosearch/remotion-best-practices

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

rulesassets.md

≈398 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Importing assets in Remotion

The public folder

Place assets in the public/ folder at your project root.

Using staticFile()

You MUST use staticFile() to reference files from the public/ folder:

import {Img, staticFile} from 'remotion';

export const MyComposition = () => {
  return <Img src={staticFile('logo.png')} />;
};

The function returns an encoded URL that works correctly when deploying to subdirectories.

Using with components

Images:

import {Img, staticFile} from 'remotion';

<Img src={staticFile('photo.png')} />;

Videos:

import {Video} from '@remotion/media';
import {staticFile} from 'remotion';

<Video src={staticFile('clip.mp4')} />;

Audio:

import {Audio} from '@remotion/media';
import {staticFile} from 'remotion';

<Audio src={staticFile('music.mp3')} />;

Fonts:

import {staticFile} from 'remotion';

const fontFamily = new FontFace('MyFont', `url(${staticFile('font.woff2')})`);
await fontFamily.load();
document.fonts.add(fontFamily);

Remote URLs

Remote URLs can be used directly without staticFile():

<Img src="https://example.com/image.png" />
<Video src="https://remotion.media/video.mp4" />

Important notes

  • Remotion components (<Img>, <Video>, <Audio>) ensure assets are fully loaded before rendering
  • Special characters in filenames (#, ?, &) are automatically encoded

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at e86893e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 10 months ago
metadata
{
  "tags": "remotion, video, react, animation, composition"
}

README badge

README badge for dtsola/xiaoyaosearch/remotion-best-practices