remotion-dev/remotion · warning · Error
Invalid ICC profile signature
Error message
Invalid ICC profile signature
What it means
Thrown in parseIccProfile() after reading the ICC profile signature at byte offset 36. Every valid ICC profile must carry the 4-byte signature 'acsp'; anything else means the blob is not a valid ICC profile and the parser aborts.
Source
Thrown at packages/media-parser/src/containers/iso-base-media/parse-icc-profile.ts:59
const iterator = getArrayBufferIterator({
initialData: data,
maxBytes: data.length,
logLevel: 'error',
});
const size = iterator.getUint32();
if (size !== data.length) {
throw new Error('Invalid ICC profile size');
}
const preferredCMMType = iterator.getByteString(4, false);
const profileVersion = iterator.getByteString(4, false);
const profileDeviceClass = iterator.getByteString(4, false);
const colorSpace = iterator.getByteString(4, false);
const pcs = iterator.getByteString(4, false);
const dateTime = iterator.getSlice(12);
const signature = iterator.getByteString(4, false);
if (signature !== 'acsp') {
throw new Error('Invalid ICC profile signature');
}
const primaryPlatform = iterator.getByteString(4, false);
const profileFlags = iterator.getUint32();
const deviceManufacturer = iterator.getByteString(4, false);
const deviceModel = iterator.getByteString(4, false);
const deviceAttributes = iterator.getUint64();
const renderingIntent = iterator.getUint32();
const pcsIlluminant1 = iterator.getUint32();
const pcsIlluminant2 = iterator.getUint32();
const pcsIlluminant3 = iterator.getUint32();
const profileCreator = iterator.getByteString(4, false);
const profileId = iterator.getByteString(16, false);
// reserved
iterator.discard(28);
const tagCount = iterator.getUint32();View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Re-mux to rebuild colour boxes: ffmpeg -i in.mp4 -c copy out.mp4; if it persists, strip colour metadata: ffmpeg -i in.mp4 -c copy -map_metadata -1 out.mp4.
- Re-fetch the source if you suspect corruption.
- If colour accuracy is not needed, removing the colr box avoids the check.
- Migrate to @remotion/mediabunny (parseMedia is deprecated).
Example fix
// before
const {isHdr} = await parseMedia({src, reader: nodeReader});
// after
try {
const r = await parseMedia({src, reader: nodeReader});
} catch (err) {
if (err instanceof Error && /Invalid ICC profile signature/.test(err.message)) {
// colr payload is not a valid ICC profile; strip colour metadata
} else throw err;
} Defensive patterns
Strategy: try-catch
Validate before calling
// Strip colour metadata if unused, then validate ffprobe reads it:
// ffmpeg -i in.mp4 -c copy -map_metadata -1 out.mp4
import {execFileSync} from 'node:child_process';
function colorMetadataParses(file: string): boolean {
try {
execFileSync('ffprobe', ['-v','error','-select_streams','v:0','-show_entries','stream=color_space,color_transfer,color_primaries','-of','json', file], {encoding:'utf8', stdio:'pipe'});
return true;
} catch { return false; }
} Type guard
// The ICC 'acsp' signature is a deep binary field; not caller-type-guardable. // => typeGuard: null
Try / catch
try {
await parseMedia({src, reader: nodeReader});
} catch (err) {
if (err instanceof Error && /Invalid ICC profile signature/.test(err.message)) {
// colr payload is not a valid ICC profile; strip colour metadata
} else {
throw err;
}
} Prevention
- Strip colour metadata with ffmpeg -map_metadata -1 when not needed.
- Re-mux to rebuild a compliant colr box.
- Remove mislabelled colr boxes for files that don't need colour management.
- Migrate to @remotion/mediabunny (parseMedia is deprecated).
When it happens
Trigger: parseMedia({src}) on a video whose colr box advertises an ICC profile type but whose payload's signature bytes are not 'acsp' — i.e. the colr box points at a non-ICC blob, a corrupt profile, or a different colour-profile format mislabelled as ICC.
Common situations: Mislabelled colr boxes (nclx/proprietary colour data stored under an ICC type); corrupted ICC profiles; files from tools that wrote colour data without the ICC signature.
Related errors
- Invalid ICC profile size
- Weird size for number ${size}
- Expected type indicator to be 0
- Could not find number of channels
- Could not find sample rate
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f6ad0dfac018bf1e.
Report an issue: GitHub.