remotion-dev/remotion · error · Error
playbackRate must be one of
Error message
playbackRate must be one of: ${commonPlaybackRates.join(', ')}. What it means
The playback-rate MCP tool only accepts rates from the fixed list commonPlaybackRates (e.g. typical Remotion rates like 0.5, 1, 2, 4). Any other number or type throws.
Solutions
- Pass one of the documented common playback rates listed in the error message
Example fix
// before
{"playbackRate": 1.5}
// after
{"playbackRate": 2} Defensive patterns
Strategy: validation
Validate before calling
const rates = [0.25, 0.5, 1, 2, 4]; // match commonPlaybackRates
if (!rates.includes(playbackRate)) throw new Error('unsupported rate'); Type guard
const isCommonRate = (v: unknown): v is number => typeof v === 'number' && commonPlaybackRates.includes(v);
Prevention
- Read the allowed rates from the error message or tool schema
- Never assume arbitrary rates are accepted
When it happens
Trigger: Passing playbackRate such as 1.5, 3, or a string that is not in the allowed set.
Common situations: Clients assuming arbitrary rates are supported, or using rates offered by other video players.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- assetPath must be a non-empty public-folder path, or an…
- Composition not found.
- frame must be an integer.
- guideId must be a non-empty string.
- orientation must be either "horizontal" or "vertical".
AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-08-28).
Data as JSON: /api/errors/d511ab7c03e99e07.
Report an issue: GitHub.
Appendix: source
Thrown at packages/studio/src/components/WebMcp.tsx:1739
type: 'object',
properties: {
playbackRate: {
type: 'number',
enum: commonPlaybackRates,
description:
'The playback multiplier. Negative values play backwards.',
},
},
required: ['playbackRate'],
additionalProperties: false,
},
annotations: {readOnlyHint: false},
execute: ({playbackRate}) => {
if (
typeof playbackRate !== 'number' ||
!commonPlaybackRates.includes(playbackRate)
) {
throw new Error(
`playbackRate must be one of: ${commonPlaybackRates.join(', ')}.`,
);
}
const compositionId = currentCompositionRef.current;
if (compositionId === null) {
throw new Error('No composition is currently selected.');
}
setPlaybackRate(() => playbackRate);
persistPlaybackRate(playbackRate);
return Promise.resolve({
currentContent: currentContentRef.current,
playbackRate,
});
},
},
{signal: controller.signal},View on GitHub (pinned to 46a3a6bf13)