remotion-dev/remotion · error · Error
Could not split video from audio
Error message
Could not split video from audio
What it means
Returned as `{success: false, reason}` by splitVideoFromAudio in @remotion/browser-studio. The split codemod produced new file contents, but `controller.applyMutation(...)` with the node-path remappings returned null — the controller could not apply the mutation to its tracked state. The overwhelmingly common cause is a stale `nodePath` for the <Video> node being split.
Source
Thrown at packages/browser-studio/src/browser-studio-operations.ts:1921
nodePath,
formatFile: formatCodemodFile,
});
const nodePathMutation = controller.applyMutation({
timelineSelection: null,
fileName: absolutePath,
mutate: () => ({
...project,
files: {...project.files, [absolutePath]: result.output},
}),
nodePathMutationFiles: [
{
absolutePath,
remappings: result.nodePathRemappings,
},
],
});
if (nodePathMutation === null) {
throw new Error('Could not split video from audio');
}
return {success: true, nodePathMutation};
} catch (error) {
return {
success: false,
reason: error instanceof Error ? error.message : String(error),
stack: error instanceof Error && error.stack ? error.stack : '',
};
}
};
const insertJsxElement: BrowserStudioOperations['insertJsxElement'] = async (
request,
) => {
try {
const requiredPackage = getRequiredPackageForInsertableElement(
request.element,View on GitHub (pinned to b2f4e34732)
Solutions
- Re-resolve the video node's path from the current project state and retry
- Confirm the target node is still a video element at that path
- Serialize mutations so paths cannot change between read and write
- Report a bug with file contents if it fails on freshly resolved paths
Example fix
// before
await operations.splitVideoFromAudio({fileName, nodePath: cachedPath});
// after
const nodePath = await resolveCurrentVideoNodePath(fileName);
const res = await operations.splitVideoFromAudio({fileName, nodePath});
if (!res.success) {
await refreshTimeline(); // paths went stale, let user retry
} Defensive patterns
Strategy: validation
Validate before calling
const nodePath = await resolveCurrentVideoNodePath(fileName);
if (nodePath === null) throw new Error('No video node found to split');
const res = await operations.splitVideoFromAudio({fileName, nodePath});
if (!res.success) await refreshTimeline(); Prevention
- Resolve the video node path at action time, not at selection time
- Disable split actions when the selection's node path is older than the last applied mutation
When it happens
Trigger: Calling `splitVideoFromAudio({fileName, nodePath})` where nodePath pointed at a video node that has since moved or been removed; splitting while another mutation is in flight; nodePath computed from an older version of the file.
Common situations: Context-menu 'split video/audio' in a custom editor using cached node paths; undo/redo between selection and the split action; concurrent edits from a second client.
Related errors
- Could not reorder sequence
- Could not insert JSX element
- Could not insert Element
- You have passed a volume of type ${typeof props.volume} to y
- You have passed a volume below 0 to your <${component} /> co
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-08-22).
Data as JSON: /api/errors/ba2e3529f4e59e2c.
Report an issue: GitHub.