{"record":{"id":"4c71c1fb09a85058","repo":"remotion-dev/remotion","slug":"comma-separated-frames-cannot-be-combined-with","errorCode":null,"errorMessage":"Comma-separated `--frames` cannot be combined with `--every-nth-frame`.","messagePattern":"Comma-separated `--frames` cannot be combined with `--every-nth-frame`\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/render.tsx","lineNumber":139,"sourceCode":"\tconst height = overrideHeightOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst width = overrideWidthOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst fps = overrideFpsOption.getValue({commandLine: parsedCli}).value;\n\tconst durationInFrames = overrideDurationOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\n\tconst browserExecutable = browserExecutableOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst everyNthFrame = everyNthFrameOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tif (selectedFrames !== null && everyNthFrame !== 1) {\n\t\tthrow new Error(\n\t\t\t'Comma-separated `--frames` cannot be combined with `--every-nth-frame`.',\n\t\t);\n\t}\n\n\tconst userAgent = userAgentOption.getValue({commandLine: parsedCli}).value;\n\tconst disableWebSecurity = disableWebSecurityOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst x264Preset = x264Option.getValue({commandLine: parsedCli}).value;\n\tconst audioBitrate = audioBitrateOption.getValue({\n\t\tcommandLine: parsedCli,\n\t}).value;\n\tconst offthreadVideoCacheSizeInBytes =\n\t\toffthreadVideoCacheSizeInBytesOption.getValue({\n\t\t\tcommandLine: parsedCli,","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/render.tsx#L121-L157","documentation":"Thrown by the render CLI when both a comma-separated --frames value (e.g. --frames=0,10) and --every-nth-frame > 1 are supplied. The two features are mutually exclusive: --every-nth-frame subsamples the full timeline uniformly, while comma-separated --frames specifies an explicit frame set, so combining them is ambiguous.","triggerScenarios":"Passing `--frames=0,10,20 --every-nth-frame=2` together, or any combination where selectedFrames !== null and everyNthFrame !== 1.","commonSituations":"Composing render flags from a template that included both; wanting both sub-sampling and a custom list and not realising they conflict; copy-pasting flags from two different examples.","solutions":["If you want uniform sub-sampling, keep --every-nth-frame and remove the comma-separated --frames.","If you want an explicit frame list, keep --frames=a,b,c and remove --every-nth-frame (or set it to 1).","Re-run with only one of the two strategies."],"exampleFix":"// before\n$ npx remotion render MyComp out.mp4 --frames=0,10,20 --every-nth-frame=2\n// after - pick one\n$ npx remotion render MyComp out.mp4 --every-nth-frame=2","handlingStrategy":"validation","validationCode":"const validateFrameOptions = (frames: string | null, everyNth: number) => {\n  if (frames !== null && frames.includes(',') && everyNth !== 1) {\n    throw new Error('Cannot combine comma-separated --frames with --every-nth-frame');\n  }\n};\n\nvalidateFrameOptions(selectedFrames, everyNthFrame);","typeGuard":"const isCommaFrames = (frames: string | null): boolean =>\n  frames !== null && frames.includes(',');","tryCatchPattern":null,"preventionTips":["Decide on one frame-selection strategy per render invocation.","In script builders, treat --frames and --every-nth-frame as mutually exclusive options."],"tags":["cli","render","frames","conflicting-flags"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}