{"record":{"id":"f30f1d8e40504da7","repo":"remotion-dev/remotion","slug":"the-png-flag-has-been-removed-use-sequence","errorCode":null,"errorMessage":"The --png flag has been removed. Use --sequence --image-format=png from now on.","messagePattern":"The --png flag has been removed\\. Use --sequence --image-format=png from now on\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/parse-command-line.ts","lineNumber":15,"sourceCode":"import {BrowserSafeApis} from '@remotion/renderer/client';\nimport {Config} from './config';\nimport {parsedCli} from './parsed-cli';\n\nconst {licenseKeyOption} = BrowserSafeApis.options;\n\nexport const parseCommandLine = () => {\n\tif (parsedCli['experimental-rspack'] !== undefined) {\n\t\tthrow new Error(\n\t\t\t'The --experimental-rspack flag has been removed. Use --rspack from now on.',\n\t\t);\n\t}\n\n\tif (parsedCli.png) {\n\t\tthrow new Error(\n\t\t\t'The --png flag has been removed. Use --sequence --image-format=png from now on.',\n\t\t);\n\t}\n\n\tconst {value: licenseKey, source} = licenseKeyOption.getValue({\n\t\tcommandLine: parsedCli,\n\t});\n\tif (source === 'cli' && licenseKey?.startsWith('rm_pub_')) {\n\t\tConfig.setPublicLicenseKey(licenseKey);\n\t}\n};\n","sourceCodeStart":1,"sourceCodeEnd":27,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/parse-command-line.ts#L1-L27","documentation":"Thrown by parseCommandLine if the legacy --png flag is present. PNG image sequences are now expressed via --sequence combined with --image-format=png, so the standalone --png shortcut was removed and is hard-rejected.","triggerScenarios":"Invoking render with `--png` to produce a PNG image sequence using the old shortcut.","commonSituations":"Old tutorials, scripts, or CI commands that used `remotion render --png`; copy-pasted commands from pre-migration docs.","solutions":["Replace `--png` with `--sequence --image-format=png`.","Update npm scripts and CI YAMLs that still pass --png.","Remember the output location for --sequence must be a directory (no extension)."],"exampleFix":"// before\n$ npx remotion render MyComp out --png\n// after\n$ npx remotion render MyComp out --sequence --image-format=png","handlingStrategy":"validation","validationCode":"const ensureNoLegacyPng = (argv: string[]) => {\n  if (argv.includes('--png')) {\n    throw new Error('Use --sequence --image-format=png instead of the removed --png');\n  }\n};\n\nensureNoLegacyPng(process.argv);","typeGuard":"const usesSequenceFlags = (argv: string[]): boolean =>\n  argv.includes('--sequence');","tryCatchPattern":null,"preventionTips":["Search the repo for --png and migrate scripts.","Standardise image-sequence invocations on `--sequence --image-format=png`."],"tags":["cli","image-sequence","deprecated-flag","migration"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}