Munchable's marketing video started life as finished reels: a script, a phone mock-up, narration-free scenes, rendered start to finish in Remotion. The version that works instead is the opposite. I film myself, and the package renders everything that goes on top of the footage as a transparent layer.

The repository now has a reels package that outputs three kinds of thing: transparent overlays, one call-to-action end card, and transparent icons. This post is about the mechanics, because getting alpha out of Remotion into a normal editor has three places where it quietly goes wrong.

Transparency is a chain, not a flag

Alpha survives only if every link in the chain keeps it. The config file says so in a comment, and each line is one link:

Config.setVideoImageFormat('png'); // JPEG frames have no alpha Config.setCodec('prores'); Config.setProResProfile('4444'); // the profile that carries alpha Config.setPixelFormat('yuva444p10le'); // the "a" is the point Config.setOverwriteOutput(true); 

Intermediate frames must be PNG because JPEG cannot hold transparency. The codec is ProRes, and specifically the 4444 profile, since the cheaper profiles drop alpha. And the pixel format has to be one with an alpha plane. Miss any one and you get a clip with a solid black background that looks correct in the preview and wrong in an editor.

The reason for the format is practical. ProRes 4444 imports as a transparent layer into CapCut on desktop, Premiere, Final Cut and DaVinci, so the clip goes on the track above the footage and only the phone, the caption or the sticker is visible. The price is size: about 5 MB a second for a caption and about 15 MB for a phone.

Crop the canvas to the content

A full 1080 by 1920 frame bakes placement into the clip and makes every file huge. So most clips are cropped to their content. A phone overlay is the phone plus just enough margin for its drop shadow, which reaches further below than above, so the padding is asymmetric:

export const PHONE_PAD = { side: 100, top: 80, bottom: 150 } as const; 

The editor then does the placement, scaling and timing. Two clips stay full frame, because where they sit matters: the caption, because of the platforms' safe zone at the edges, and the scan guide, which has to line up with the pack I am holding up.

The animation follows from that. Overlays lift in and fade away instead of entering from a frame edge, so they read correctly wherever you drop them.

One script, one bundle, and an icon rule that is a number

render-all.mjs bundles the project once and then renders each composition. Two small decisions in it:

  • An icon is a composition one frame long. The script does not keep a separate list. If durationInFrames === 1 it calls renderStill to a PNG, otherwise it calls renderMedia to a .mov. Add a new icon composition and it is rendered correctly with no change to the script.
  • A typo in a composition name is an error. The arguments are checked against the registered compositions and the script prints the known ids and exits, instead of rendering nothing and looking successful.

cast-sheet, which lays every illustrated pack front and back on one frame for proofreading label copy, is registered but filtered out of rendering. It exists to be looked at, not posted.

The one test: the cast must be the app's cast

Every phone overlay shows an answer for an illustrated pack, and those answers come from the same engine package the app uses, at render time, so the video cannot say something the app would not.

The packs are defined by hand, with ingredient ids typed beside the ingredient text. Nothing in the type system ties those ids to the engine's vocabulary, so the test does:

test('every reel product is built from ids the engine knows', () => { const unknown: string[] = []; for (const [key, product] of Object.entries(PRODUCTS)) { for (const tag of product.ingredientsTags ?? []) { if (!isKnownTag(tag)) unknown.push(`${key}: ${tag}`); } } assert.deepEqual(unknown, []); }); 

The failure it prevents is subtle. An unknown id would score with a confidence penalty the app would never apply, so the published clip would show an answer the product does not give. Worse, a rule added later to the real id would change the app while an already rendered clip kept showing the old answer. The test makes the first half impossible, and the git history keeps the finished reels if one is ever needed again.

What I left out on purpose

There are no sound effects. The music bed goes on in the editor, and everything the package renders is silent. It is a rule I enforce at the source, because a sound effect baked into an overlay is a decision that cannot be undone in the edit.

If you want to see what the footage is about, the clips all lead to the same place: the homepage for the product, and the recipes for the one overlay that shows a list. The Studio exposes each overlay's props as dropdowns and number fields, since the prop schema is zod, so changing a product, a profile or how long the answer stays up is a form rather than a code edit.