Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply best practices for creating programmatic videos with Remotion and React.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/transparent-videos.md
1---2name: transparent-videos3description: Rendering transparent videos in Remotion4metadata:5tags: transparent, alpha, codec, vp9, prores, webm6---78# Rendering Transparent Videos910Remotion can render transparent videos in two ways: as a ProRes video or as a WebM video.1112## Transparent ProRes1314Ideal for when importing into video editing software.1516**CLI:**1718```bash19npx remotion render --image-format=png --pixel-format=yuva444p10le --codec=prores --prores-profile=4444 MyComp out.mov20```2122**Default in Studio** (restart Studio after changing):2324```ts25// remotion.config.ts26import { Config } from "@remotion/cli/config";2728Config.setVideoImageFormat("png");29Config.setPixelFormat("yuva444p10le");30Config.setCodec("prores");31Config.setProResProfile("4444");32```3334**Setting it as the default export settings for a composition** (using `calculateMetadata`):3536```tsx37import { CalculateMetadataFunction } from "remotion";3839const calculateMetadata: CalculateMetadataFunction<Props> = async ({40props,41}) => {42return {43defaultCodec: "prores",44defaultVideoImageFormat: "png",45defaultPixelFormat: "yuva444p10le",46defaultProResProfile: "4444",47};48};4950<Composition51id="my-video"52component={MyVideo}53durationInFrames={150}54fps={30}55width={1920}56height={1080}57calculateMetadata={calculateMetadata}58/>;59```6061## Transparent WebM (VP9)6263Ideal for when playing in a browser.6465**CLI:**6667```bash68npx remotion render --image-format=png --pixel-format=yuva420p --codec=vp9 MyComp out.webm69```7071**Default in Studio** (restart Studio after changing):7273```ts74// remotion.config.ts75import { Config } from "@remotion/cli/config";7677Config.setVideoImageFormat("png");78Config.setPixelFormat("yuva420p");79Config.setCodec("vp9");80```8182**Setting it as the default export settings for a composition** (using `calculateMetadata`):8384```tsx85import { CalculateMetadataFunction } from "remotion";8687const calculateMetadata: CalculateMetadataFunction<Props> = async ({88props,89}) => {90return {91defaultCodec: "vp8",92defaultVideoImageFormat: "png",93defaultPixelFormat: "yuva420p",94};95};9697<Composition98id="my-video"99component={MyVideo}100durationInFrames={150}101fps={30}102width={1920}103height={1080}104calculateMetadata={calculateMetadata}105/>;106```107