remotion-dev/remotion · error · Error
The --png flag has been removed. Use --sequence --image-form
Error message
The --png flag has been removed. Use --sequence --image-format=png from now on.
What it means
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.
Source
Thrown at packages/cli/src/parse-command-line.ts:15
import {BrowserSafeApis} from '@remotion/renderer/client';
import {Config} from './config';
import {parsedCli} from './parsed-cli';
const {licenseKeyOption} = BrowserSafeApis.options;
export const parseCommandLine = () => {
if (parsedCli['experimental-rspack'] !== undefined) {
throw new Error(
'The --experimental-rspack flag has been removed. Use --rspack from now on.',
);
}
if (parsedCli.png) {
throw new Error(
'The --png flag has been removed. Use --sequence --image-format=png from now on.',
);
}
const {value: licenseKey, source} = licenseKeyOption.getValue({
commandLine: parsedCli,
});
if (source === 'cli' && licenseKey?.startsWith('rm_pub_')) {
Config.setPublicLicenseKey(licenseKey);
}
};
View on GitHub (pinned to 78fe4bb3fd)
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).
Example fix
// before $ npx remotion render MyComp out --png // after $ npx remotion render MyComp out --sequence --image-format=png
Defensive patterns
Strategy: validation
Validate before calling
const ensureNoLegacyPng = (argv: string[]) => {
if (argv.includes('--png')) {
throw new Error('Use --sequence --image-format=png instead of the removed --png');
}
};
ensureNoLegacyPng(process.argv); Type guard
const usesSequenceFlags = (argv: string[]): boolean =>
argv.includes('--sequence'); Prevention
- Search the repo for --png and migrate scripts.
- Standardise image-sequence invocations on `--sequence --image-format=png`.
When it happens
Trigger: Invoking render with `--png` to produce a PNG image sequence using the old shortcut.
Common situations: Old tutorials, scripts, or CI commands that used `remotion render --png`; copy-pasted commands from pre-migration docs.
Related errors
- The --experimental-rspack flag has been removed. Use --rspac
- The output directory of the image sequence cannot have an ex
- Cannot render an image sequence with a codec that renders no
- bundle() no longer supports the legacy positional arguments.
- The following packages are not Remotion packages: ${invalidP
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f30f1d8e40504da7.
Report an issue: GitHub.