π₯ Make videos programmatically with React
Skills: Fix agent plugin CI validation
Jonny Burger75d702dad004
diff --git a/packages/agent-plugin/build.mts b/packages/agent-plugin/build.mtsindex 855825f3db..7263e8af3b 100644--- a/packages/agent-plugin/build.mts+++ b/packages/agent-plugin/build.mts@@ -102,7 +102,7 @@ const makeOpenPreviewClientSpecific = () => {? 'Open the exact URL in the Codex in-app browser. If the in-app browser is not available, keep the preview server running and provide the URL to the user.': "Open the exact URL in the agent client's available browser, such as the integrated browser in GitHub Copilot (VS Code) or Cursor. If no browser tool is available, keep the preview server running and provide the URL to the user.";- const browserSection = `Always pass \`--no-open\` so the system browser is not opened:+ const browserSection = `To start the preview server by default without opening the system browser, pass \`--no-open\`:\`\`\`bashnpx remotion studio --no-opendiff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.mdindex dba701cc37..28694f0103 100644--- a/packages/skills/skills/remotion-interactivity/SKILL.md+++ b/packages/skills/skills/remotion-interactivity/SKILL.md@@ -481,46 +481,7 @@ Use only `calculateMetadata()` for the part of the metadata that is dynamic.## Effects should be inline too-The effects array should not be computed.-The same rules for setting keyframes as `interpolate()` apply too here: All values should also be hardcoded: Input range, output range, easing, extrapolation, `output` property.--```tsx title="Effects"-// π Parameters are inline and the array shape is stable-<CanvasImage- src={src}- width={1280}- height={720}- effects={[- radialProgressiveBlur({- center: [0.5, 0.5],- width: 1.2,- height: 0.8,- start: 0.2,- disabled: true,- rotation: interpolate(frame, [0, 120], [0, 180]),- }),- ]}-/>--const center = [0.5, 0.5] as const;-const rotation = frame * 1.5;--<CanvasImage- src={src}- width={1280}- height={720}- // β Conditional effect is not animateable- effects={enabled ? [- radialProgressiveBlur({- // β Not inline- center,- rotation,- }),- ] : []}-/>-```--Render separate elements if one version should have effects and another should not.+Keep effect arrays and parameters inline so their shape and keyframes remain editable. See [Inline effects](./inline-effects.md) for examples.## Making your own component interactivediff --git a/packages/skills/skills/remotion-interactivity/inline-effects.md b/packages/skills/skills/remotion-interactivity/inline-effects.mdnew file mode 100644index 0000000000..910a95d51e--- /dev/null+++ b/packages/skills/skills/remotion-interactivity/inline-effects.md@@ -0,0 +1,42 @@+## Effects should be inline too++The effects array should not be computed.+The same rules for setting keyframes as `interpolate()` apply too here: All values should also be hardcoded: Input range, output range, easing, extrapolation, `output` property.++```tsx title="Effects"+// π Parameters are inline and the array shape is stable+<CanvasImage+ src={src}+ width={1280}+ height={720}+ effects={[+ radialProgressiveBlur({+ center: [0.5, 0.5],+ width: 1.2,+ height: 0.8,+ start: 0.2,+ disabled: true,+ rotation: interpolate(frame, [0, 120], [0, 180]),+ }),+ ]}+/>++const center = [0.5, 0.5] as const;+const rotation = frame * 1.5;++<CanvasImage+ src={src}+ width={1280}+ height={720}+ // β Conditional effect is not animateable+ effects={enabled ? [+ radialProgressiveBlur({+ // β Not inline+ center,+ rotation,+ }),+ ] : []}+/>+```++Render separate elements if one version should have effects and another should not.diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.mdindex b53305c52c..9259d6ba14 100644--- a/packages/skills/skills/remotion-markup/SKILL.md+++ b/packages/skills/skills/remotion-markup/SKILL.md@@ -283,94 +283,7 @@ export const RemotionRoot: React.FC = () => {## Delaying, trimming-The following timing props are supported by built-in components (`<AbsoluteFill>`, `<Interactive.*>`, `<Img>`, `<AnimatedImage>`, `<CanvasImage>`, `<HtmlInCanvas>`, `<Solid>`, `<Sequence>` from `remotion`, `<Video>` and `<Audio>` from `@remotion/media`, `<Gif>`, and more).-Custom components made with `Interactive.withSchema({wrapInSequence: true})` accept them too, see [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).-Set `premountFor={fps}` on these timed items when they support it, including-items starting at frame 0. At frame 0, the composition has no earlier frames-to premount into; the prop still keeps the same one-second default if the item-is moved later.--### `from`--When the item starts appearing in the timeline.-Its children start at frame `0` when it appears.--```tsx-<Img from={1 * fps} {/* ... */}/>-<Video from={1 * fps} {/* ... */}/>-<Interactive.Div from={1 * fps} {/* ... */}/>-<LowerThird from={1 * fps} {/* ... */}/>-```--### `trimBefore`--Sets the first frame of the item's own timeline:--```tsx-// Trim away first 2 seconds of footage-<Video trimBefore={2 * fps} {/* ... */} />--// `useCurrentFrame()` of the children starts at `10 * fps`-<Interactive.Div trimBefore={10 * fps} {/* ... */} />-```--### `durationInFrames`--How many frames of the item's own timeline are shown, starting at `trimBefore`.-Use it to end media early instead of cutting the file:--```tsx-// Play the footage from second 2 to second 5-<Video trimBefore={2 * fps} durationInFrames={3 * fps} {/* ... */} />-<Img durationInFrames={20 * fps} {/* ... */}/>-<LowerThird durationInFrames={5 * fps} {/* ... */}/>-```--### `playbackRate`--Changes the speed of the item.-Children calling `useCurrentFrame()` advance `playbackRate` frames per frame of the parent.-The item occupies `durationInFrames / playbackRate` frames in its parent timeline.--```tsx-// 2x speed-<Video playbackRate={2} {/* ... */} />-<LowerThird playbackRate={0.5} durationInFrames={2 * fps} {/* ... */} />-```--### `loop`--Repeats the range selected by `trimBefore` and `durationInFrames` until the parent ends.-`<Video>`, `<Audio>`, `<Gif>` and `<AnimatedImage>` may omit `durationInFrames`; the media's own duration after `trimBefore` then defines the loop range.-Other items need `durationInFrames` to define the loop range:--```tsx-<Video loop {/* ... */} />-<Interactive.Div durationInFrames={2 * fps} loop {/* ... */} />-```--Put timing and volume directly on `<Audio>`.--`<Img>`, `<CanvasImage>`, `<Solid>` and shapes do not support `loop` because their output does not change over time.--### Order of operations--1. `from` positions the item in its parent timeline.-2. `trimBefore` sets the first frame of the item's own timeline.-3. `durationInFrames` selects the range of the item's own timeline.-4. `playbackRate` stretches or compresses the selected range.-5. `loop` repeats the selected range until the parent ends.--Children calling `useCurrentFrame()` get `trimBefore + (frame - from) * playbackRate`.--See [Timing and trimming](https://www.remotion.dev/docs/timing) for more details.--### Fallback--If a component does not support these props, wrap it in `<Sequence>` from `remotion`, which has them.--- `layout="absolute-fill"` makes the Sequence behave like AbsoluteFill-- `layout="none"` is "headless" mode, no wrapper element is used.+Put timing directly on components that support it. See [Timing props](./timing-props.md) for the supported props, examples, and order of operations.## Mapsdiff --git a/packages/skills/skills/remotion-markup/timing-props.md b/packages/skills/skills/remotion-markup/timing-props.mdnew file mode 100644index 0000000000..9cf9e456f8--- /dev/null+++ b/packages/skills/skills/remotion-markup/timing-props.md@@ -0,0 +1,90 @@+## Delaying, trimming++The following timing props are supported by built-in components (`<AbsoluteFill>`, `<Interactive.*>`, `<Img>`, `<AnimatedImage>`, `<CanvasImage>`, `<HtmlInCanvas>`, `<Solid>`, `<Sequence>` from `remotion`, `<Video>` and `<Audio>` from `@remotion/media`, `<Gif>`, and more).+Custom components made with `Interactive.withSchema({wrapInSequence: true})` accept them too, see [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).+Set `premountFor={fps}` on these timed items when they support it, including+items starting at frame 0. At frame 0, the composition has no earlier frames+to premount into; the prop still keeps the same one-second default if the item+is moved later.++### `from`++When the item starts appearing in the timeline.+Its children start at frame `0` when it appears.++```tsx+<Img from={1 * fps} {/* ... */}/>+<Video from={1 * fps} {/* ... */}/>+<Interactive.Div from={1 * fps} {/* ... */}/>+<LowerThird from={1 * fps} {/* ... */}/>+```++### `trimBefore`++Sets the first frame of the item's own timeline:++```tsx+// Trim away first 2 seconds of footage+<Video trimBefore={2 * fps} {/* ... */} />++// `useCurrentFrame()` of the children starts at `10 * fps`+<Interactive.Div trimBefore={10 * fps} {/* ... */} />+```++### `durationInFrames`++How many frames of the item's own timeline are shown, starting at `trimBefore`.+Use it to end media early instead of cutting the file:++```tsx+// Play the footage from second 2 to second 5+<Video trimBefore={2 * fps} durationInFrames={3 * fps} {/* ... */} />+<Img durationInFrames={20 * fps} {/* ... */}/>+<LowerThird durationInFrames={5 * fps} {/* ... */}/>+```++### `playbackRate`++Changes the speed of the item.+Children calling `useCurrentFrame()` advance `playbackRate` frames per frame of the parent.+The item occupies `durationInFrames / playbackRate` frames in its parent timeline.++```tsx+// 2x speed+<Video playbackRate={2} {/* ... */} />+<LowerThird playbackRate={0.5} durationInFrames={2 * fps} {/* ... */} />+```++### `loop`++Repeats the range selected by `trimBefore` and `durationInFrames` until the parent ends.+`<Video>`, `<Audio>`, `<Gif>` and `<AnimatedImage>` may omit `durationInFrames`; the media's own duration after `trimBefore` then defines the loop range.+Other items need `durationInFrames` to define the loop range:++```tsx+<Video loop {/* ... */} />+<Interactive.Div durationInFrames={2 * fps} loop {/* ... */} />+```++Put timing and volume directly on `<Audio>`.++`<Img>`, `<CanvasImage>`, `<Solid>` and shapes do not support `loop` because their output does not change over time.++### Order of operations++1. `from` positions the item in its parent timeline.+2. `trimBefore` sets the first frame of the item's own timeline.+3. `durationInFrames` selects the range of the item's own timeline.+4. `playbackRate` stretches or compresses the selected range.+5. `loop` repeats the selected range until the parent ends.++Children calling `useCurrentFrame()` get `trimBefore + (frame - from) * playbackRate`.++See [Timing and trimming](https://www.remotion.dev/docs/timing) for more details.++### Fallback++If a component does not support these props, wrap it in `<Sequence>` from `remotion`, which has them.++- `layout="absolute-fill"` makes the Sequence behave like AbsoluteFill+- `layout="none"` is "headless" mode, no wrapper element is used.