{"record":{"id":"c2bd3b3b79f9262a","repo":"remotion-dev/remotion","slug":"cannot-decode-src-it-is-encoded-with-apple-p","errorCode":null,"errorMessage":"Cannot decode \"${src}\": it is encoded with Apple ProRes, which WebCodecs does not support natively. ProRes decoding is not enabled by default. Register the ProRes decoder by calling registerProresDecoder() from \"@mediabunny/prores\" in your entry point, before registerRoot(). See https://www.remotion.dev/docs/videos/prores.","messagePattern":"Cannot decode \"(.+?)\": it is encoded with Apple ProRes, which WebCodecs does not support natively\\. ProRes decoding is not enabled by default\\. Register the ProRes decoder by calling registerProresDecoder\\(\\) from \"@mediabunny/prores\" in your entry point, before registerRoot\\(\\)\\. See https://www\\.remotion\\.dev/docs/videos/prores\\.","errorType":"exception","errorClass":"ProResDecoderNotEnabledError","httpStatus":null,"severity":"error","filePath":"packages/media/src/video/video-for-preview.tsx","lineNumber":358,"sourceCode":"\t\t\t\t\t\t\tnew Error(`Network error fetching ${preloadedSrc}.`),\n\t\t\t\t\t\t\t`Network error fetching ${preloadedSrc}, falling back to <OffthreadVideo>`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result.type === 'cannot-decode') {\n\t\t\t\t\t\thandleError(\n\t\t\t\t\t\t\tnew Error(`Cannot decode ${preloadedSrc}.`),\n\t\t\t\t\t\t\t`Cannot decode ${preloadedSrc}, falling back to <OffthreadVideo>`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result.type === 'cannot-decode-prores') {\n\t\t\t\t\t\t// Unrecoverable: a native <video> can't decode ProRes either, so\n\t\t\t\t\t\t// we must not fall back. The .catch below notifies onError and\n\t\t\t\t\t\t// rethrows without falling back.\n\t\t\t\t\t\tthrow new ProResDecoderNotEnabledError(preloadedSrc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result.type === 'no-tracks') {\n\t\t\t\t\t\thandleError(\n\t\t\t\t\t\t\tnew Error(`No video or audio tracks found for ${preloadedSrc}.`),\n\t\t\t\t\t\t\t`No video or audio tracks found for ${preloadedSrc}, falling back to <OffthreadVideo>`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result.type === 'success') {\n\t\t\t\t\t\tsetMediaPlayerReady(true);\n\t\t\t\t\t\tsetMediaDurationInSeconds(result.durationInSeconds);\n\n\t\t\t\t\t\thasDrawnRealFrameRef.current = true;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((error) => {","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/media/src/video/video-for-preview.tsx#L340-L376","documentation":"Thrown as ProResDecoderNotEnabledError in @remotion/media when a source is encoded with Apple ProRes but the optional ProRes decoder has not been registered. WebCodecs cannot decode ProRes natively, and unlike generic decode failures this error is unrecoverable: the preview code deliberately does NOT fall back to a native <video> element because that cannot decode ProRes either. The fix is to register the decoder from @mediabunny/prores in your entry point before registerRoot().","triggerScenarios":"Using a .mov ProRes source with <Video> in Studio preview when registerProresDecoder() has not been called. The media-player decode path returns type 'cannot-decode-prores', and video-for-preview throws this error at line 358 instead of falling back.","commonSituations":"Upgrading to a Remotion version that gated ProRes behind explicit registration, using ProRes footage from Final Cut Pro / DaVinci Resolve exports, or forgetting the registration call after adding @mediabunny/prores as a dependency.","solutions":["Install @mediabunny/prores and call registerProresDecoder() in your entry point (src/index.ts) before registerRoot().","Re-encode the source to H.264/H.265 if you cannot add the ProRes decoder dependency.","Confirm the registration call runs before any composition mounts (top of the entry file)."],"exampleFix":"// before (src/index.ts)\nimport {registerRoot} from 'remotion';\nregisterRoot(RemotionRoot);\n\n// after\nimport {registerRoot} from 'remotion';\nimport {registerProresDecoder} from '@mediabunny/prores';\nregisterProresDecoder();\nregisterRoot(RemotionRoot);","handlingStrategy":"try-catch","validationCode":"// Register the decoder once at startup (src/index.ts):\nimport {registerProresDecoder} from '@mediabunny/prores';\nregisterProresDecoder();","typeGuard":"import {ProResDecoderNotEnabledError} from '@remotion/media';\n\nconst isProResError = (e: unknown): e is ProResDecoderNotEnabledError =>\n  e instanceof ProResDecoderNotEnabledError;","tryCatchPattern":"try {\n  return <Video src={src} />;\n} catch (e) {\n  if (e instanceof ProResDecoderNotEnabledError) {\n    // Register the decoder and re-render, or re-encode the source.\n    console.error('ProRes decoder not registered. Call registerProresDecoder() in your entry point.');\n  }\n  throw e;\n}","preventionTips":["Add registerProresDecoder() to your entry point any time you accept user-uploaded video.","Document the ProRes requirement for contributors who add footage.","Run a smoke render against a ProRes sample in CI to catch registration regressions."],"tags":["video","prores","webcodecs","decoder","media"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}