Two small documentation bugs in the remotion skill rules, both on current main, each with a one-line fix.
1. skills/remotion/rules/videos.md — trimBefore/trimAfter are frames, not seconds
The prose states:
Use trimBefore and trimAfter to remove portions of the video. Values are in seconds.
But the example just below uses frames, converting seconds via * fps:
trimBefore={2 * fps} // Skip the first 2 seconds
trimAfter={10 * fps} // End at the 10 second mark
trimBefore/trimAfter take frames — the * fps conversion is only necessary because the props are frame-based. As written, a reader who trusts "Values are in seconds" and passes trimBefore={2} gets 2 frames (~0.07 s at 30 fps), not 2 seconds.
Fix: "Values are in seconds." → "Values are in frames."
2. skills/remotion/rules/trimming.md — useVideoConfig() not destructured → NaN
const fps = useVideoConfig();
useVideoConfig() returns an object ({ fps, width, height, durationInFrames, … }), so fps here is the whole object. The subsequent arithmetic evaluates to NaN:
<Sequence from={-0.5 * fps}> // -0.5 * {object} === NaN → from={NaN}
<Sequence durationInFrames={1.5 * fps}> // also NaN
Fix: destructure — const { fps } = useVideoConfig();
Two small documentation bugs in the
remotionskill rules, both on currentmain, each with a one-line fix.1.
skills/remotion/rules/videos.md—trimBefore/trimAfterare frames, not secondsThe prose states:
But the example just below uses frames, converting seconds via
* fps:trimBefore/trimAftertake frames — the* fpsconversion is only necessary because the props are frame-based. As written, a reader who trusts "Values are in seconds" and passestrimBefore={2}gets 2 frames (~0.07 s at 30 fps), not 2 seconds.Fix: "Values are in seconds." → "Values are in frames."
2.
skills/remotion/rules/trimming.md—useVideoConfig()not destructured →NaNuseVideoConfig()returns an object ({ fps, width, height, durationInFrames, … }), sofpshere is the whole object. The subsequent arithmetic evaluates toNaN:Fix: destructure —
const { fps } = useVideoConfig();