remotion-dev/remotion · error

`separateAudioTo` was set to ${JSON.stringify(separateAudioT

Error message

`separateAudioTo` was set to ${JSON.stringify(separateAudioTo)}, but this render included no audio. Audio output is disabled by the muted option or selected codec.

What it means

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.

Source

Thrown at packages/renderer/src/stitch-frames-to-video.ts:376

			if (tempFile) {
				promises
					.readFile(tempFile)
					.then((f) => {
						return resolve(f);
					})
					.catch((e) => reject(e));
			} else {
				resolve(null);
			}
		});
		deleteDirectory(assetsInfo.downloadMap.stitchFrames);
		assetsInfo.downloadMap.allowCleanup();

		return Promise.resolve(file);
	}

	if (separateAudioTo && !audio) {
		throw new Error(
			`\`separateAudioTo\` was set to ${JSON.stringify(
				separateAudioTo,
			)}, but this render included no audio. Audio output is disabled by the muted option or selected codec.`,
		);
	}

	// Parallel encoding already resolved the encoder in the pre-stitcher.
	const resolvedHardwareAcceleration = preEncodedFileLocation
		? 'disable'
		: resolveHardwareAcceleration({
				codec,
				hardwareAcceleration,
				binariesDirectory,
				indent: indent ?? false,
				logLevel,
				crf,
				encodingMaxRate: maxRate,
				encodingBufferSize: bufferSize,

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Remove the separateAudioTo option since there is no audio to extract
  2. Remove muted: true (or unmute audio sources) so the composition actually produces audio
  3. Use a codec that supports audio (e.g. h264 with audio codec configured)
  4. Check the composition contains <Audio>/<OffthreadAudio> elements before requesting separate audio output

Example fix

// before
await stitchFramesToVideo({
  ...options,
  muted: true,
  separateAudioTo: 'out/audio.wav',
});
// after
await stitchFramesToVideo({
  ...options,
  muted: false,
  separateAudioTo: 'out/audio.wav',
});
Defensive patterns

Strategy: validation

Validate before calling

const hasAudio = !muted && codecSupportsAudio(codec) && compositionIncludesAudioElements(comp);
if (separateAudioTo && !hasAudio) {
  throw new Error('separateAudioTo requires an unmuted composition with an audio-capable codec.');
}

Try / catch

try {
  await renderMedia(options);
} catch (err) {
  if (String(err).includes('separateAudioTo') && String(err).includes('no audio')) {
    await renderMedia({...options, separateAudioTo: undefined});
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09). Data as JSON: /api/errors/c76b663e5cd03c58. Report an issue: GitHub.