{"record":{"id":"c76b663e5cd03c58","repo":"remotion-dev/remotion","slug":"separateaudioto-was-set-to-json-stringify-sepa","errorCode":null,"errorMessage":"`separateAudioTo` was set to ${JSON.stringify(separateAudioTo)}, but this render included no audio. Audio output is disabled by the muted option or selected codec.","messagePattern":"`separateAudioTo` was set to (.+?), but this render included no audio\\. Audio output is disabled by the muted option or selected codec\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/renderer/src/stitch-frames-to-video.ts","lineNumber":376,"sourceCode":"\t\t\tif (tempFile) {\n\t\t\t\tpromises\n\t\t\t\t\t.readFile(tempFile)\n\t\t\t\t\t.then((f) => {\n\t\t\t\t\t\treturn resolve(f);\n\t\t\t\t\t})\n\t\t\t\t\t.catch((e) => reject(e));\n\t\t\t} else {\n\t\t\t\tresolve(null);\n\t\t\t}\n\t\t});\n\t\tdeleteDirectory(assetsInfo.downloadMap.stitchFrames);\n\t\tassetsInfo.downloadMap.allowCleanup();\n\n\t\treturn Promise.resolve(file);\n\t}\n\n\tif (separateAudioTo && !audio) {\n\t\tthrow new Error(\n\t\t\t`\\`separateAudioTo\\` was set to ${JSON.stringify(\n\t\t\t\tseparateAudioTo,\n\t\t\t)}, but this render included no audio. Audio output is disabled by the muted option or selected codec.`,\n\t\t);\n\t}\n\n\t// Parallel encoding already resolved the encoder in the pre-stitcher.\n\tconst resolvedHardwareAcceleration = preEncodedFileLocation\n\t\t? 'disable'\n\t\t: resolveHardwareAcceleration({\n\t\t\t\tcodec,\n\t\t\t\thardwareAcceleration,\n\t\t\t\tbinariesDirectory,\n\t\t\t\tindent: indent ?? false,\n\t\t\t\tlogLevel,\n\t\t\t\tcrf,\n\t\t\t\tencodingMaxRate: maxRate,\n\t\t\t\tencodingBufferSize: bufferSize,","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/renderer/src/stitch-frames-to-video.ts#L358-L394","documentation":"innerStitchFramesToVideo throws when separateAudioTo (a path to write an isolated audio track) was requested but the stitched composition contains no audio stream at all. Audio can be absent because the composition is muted or the chosen codec has no audio track. There is nothing to write, so Remotion fails instead of producing an empty audio file.","triggerScenarios":"Calling stitchFramesToVideo() (or renderMedia / renderMediaOnLambda internally) with separateAudioTo set while audio is falsy — i.e. muted: true, a video-only codec, or no <Audio> elements in the composition.","commonSituations":"Rendering a muted composition but still requesting a separate audio file; switching to a codec that drops audio (video-only) while separateAudioTo remains set; leftover separateAudioTo option copied from a previous render config.","solutions":["Remove the separateAudioTo option since there is no audio to extract","Remove muted: true (or unmute audio sources) so the composition actually produces audio","Use a codec that supports audio (e.g. h264 with audio codec configured)","Check the composition contains <Audio>/<OffthreadAudio> elements before requesting separate audio output"],"exampleFix":"// before\nawait stitchFramesToVideo({\n  ...options,\n  muted: true,\n  separateAudioTo: 'out/audio.wav',\n});\n// after\nawait stitchFramesToVideo({\n  ...options,\n  muted: false,\n  separateAudioTo: 'out/audio.wav',\n});","handlingStrategy":"validation","validationCode":"const hasAudio = !muted && codecSupportsAudio(codec) && compositionIncludesAudioElements(comp);\nif (separateAudioTo && !hasAudio) {\n  throw new Error('separateAudioTo requires an unmuted composition with an audio-capable codec.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await renderMedia(options);\n} catch (err) {\n  if (String(err).includes('separateAudioTo') && String(err).includes('no audio')) {\n    await renderMedia({...options, separateAudioTo: undefined});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Never set separateAudioTo together with muted: true","Verify the chosen codec supports an audio track before requesting audio output","Only request separate audio when the composition actually contains <Audio> elements","Drop stale render options when copying config between renders"],"tags":["audio","rendering","conflicting-options","stitcher"],"backgroundTag":"conflicting-config-options","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}