remotion-dev/remotion · error · Error
Could not determine animated image duration
Error message
Could not determine animated image duration
What it means
Thrown by getAnimatedImageDurationInSeconds when the last decoded frame reports duration === null. Without a duration the total animated image duration cannot be computed, so Remotion cannot schedule playback.
Source
Thrown at packages/core/src/animated-image/get-duration-in-seconds.ts:29
requestInit?: RequestInit;
contentType: string | null;
}) => {
const {decoder, selectedTrack} = await createImageDecoder({
resolvedSrc,
signal,
requestInit,
contentType,
});
try {
const {image} = await decoder.decode({
frameIndex: selectedTrack.frameCount - 1,
completeFramesOnly: true,
});
try {
if (image.duration === null) {
throw new Error('Could not determine animated image duration');
}
return (image.timestamp + image.duration) / 1_000_000;
} finally {
image.close();
}
} finally {
decoder.close();
}
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Convert the image to a widely supported animated format (GIF or animated WebP).
- Try a Chromium-based browser/renderer.
- If you control the asset, re-export with explicit frame durations.
Defensive patterns
Strategy: fallback
Validate before calling
// Pre-check the asset's frame durations with a tool like ffprobe // to ensure they are populated.
Try / catch
try {
await getAnimatedImageDurationInSeconds({...});
} catch (e) {
if (e.message === 'Could not determine animated image duration') {
// fall back to a format the decoder handles, or a static image
}
} Prevention
- Use GIF or animated WebP for broad browser support.
- Re-export AVIF sequences with explicit durations.
When it happens
Trigger: Decoded the final frame of an animated image but the decoder did not supply a duration (some AVIF/GIF variants in certain browsers return null durations).
Common situations: Firefox decoding certain AVIF sequences; non-standard animated images; browser decoder implementation gaps.
Related errors
- Your browser does not support the WebCodecs ImageDecoder API
- Got no body
- No selected track
- No frame found
- The required HTML-in-canvas APIs are unavailable. Open chrom
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/ab09eea31cf24233.
Report an issue: GitHub.