Docs: wrong trim units in videos.md + fps not destructured in trimming.md
Two small documentation bugs in the Remotion skill rules, both around frame-based timing. Each includes a suggested fix.
1. skills/remotion/rules/videos.md — trimBefore/trimAfter labeled "seconds" but are frames
Line 41 states:
Use
trimBeforeandtrimAfterto remove portions of the video. Values are in seconds.
But the example just below (lines 49–50) multiplies by fps:
trimBefore={2 * fps} // Skip the first 2 seconds
trimAfter={10 * fps} // End at the 10 second mark
The * fps (and the comments) show the values are frame numbers, not seconds. The "Values are in seconds" prose contradicts the example and would mislead readers into dropping the * fps.
Suggested fix: change "Values are in seconds." → "Values are in frames." on line 41.
2. skills/remotion/rules/trimming.md — useVideoConfig() result not destructured → NaN
Lines 15–19:
import { Sequence, useVideoConfig } from "remotion";
const fps = useVideoConfig();
<Sequence from={-0.5 * fps}>
useVideoConfig() returns a config object, not the fps number. As written, fps is that object, so -0.5 * fps (line 19) and 1.5 * fps (line 32) evaluate to NaN, yielding from={NaN} / durationInFrames={NaN}.
Suggested fix: destructure — const { fps } = useVideoConfig();.
Thanks for maintaining this — both are quick one-liners.
Source: remotion-dev/skills