remotion-dev/remotion · error · Error

Fast Start finalization did not produce an output file

Error message

Fast Start finalization did not produce an output file

What it means

When rendering with onArtifact on serverless, each artifact filename must be unique. If the render emits two artifacts with the same filename, the conflict registration causes this error, because artifacts would overwrite each other.

Source

Thrown at packages/renderer/src/finalize-fast-start.ts:82

			break;
		} catch (error) {
			await promises.rm(candidate, {force: true}).catch(() => undefined);
			const isReopenFailure =
				stderr.includes('Unable to re-open') &&
				stderr.includes('output file for shifting data');
			if (!isReopenFailure || attempt === 2) {
				throw error;
			}

			Log.verbose(
				{indent, logLevel, tag: 'stitchFramesToVideo()'},
				`Retrying Fast Start finalization (attempt ${attempt + 2} of 3)`,
			);
		}
	}

	if (fastStartFile === null) {
		throw new Error('Fast Start finalization did not produce an output file');
	}

	if (force) {
		await promises.rename(fastStartFile, output);
		return;
	}

	try {
		await promises.link(fastStartFile, output);
	} finally {
		await promises.rm(fastStartFile, {force: true});
	}
};

View on GitHub (pinned to 8f97758157)

Solutions

  1. Make artifact filenames unique per emission (include frame, chunk, or a counter)
  2. Move emitArtifact to a place that runs once per render instead of per frame
  3. Include deterministic context in the filename such as frame or inputProps hash

Example fix

// before
emitArtifact({filename: 'report.txt', data});

// after
emitArtifact({filename: `report-${frame}.txt`, data});
Defensive patterns

Strategy: validation

Validate before calling

const seen = new Set<string>();
const safeFilename = (f: string) => seen.has(f) ? `${seen.size}-${f}` : (seen.add(f), f);

Try / catch

try { await renderWithSingleFunction({...}); } catch (e) { if (e.message.includes('emitted more than once')) { /* make artifact filenames unique, re-render */ } }

Prevention

When it happens

Trigger: Calling onArtifact twice with the same filename from a single render — e.g. emitArtifact({filename: 'out.txt'}) executed in multiple chunks or multiple times in the same composition.

Common situations: An emitArtifact() call in a component that renders per-frame or is duplicated across compositions, so the same filename is emitted repeatedly.

Related errors


AI-assisted analysis of remotion-dev/remotion@8f97758157 (2026-08-28). Data as JSON: /api/errors/2adc82ae1545fdf3. Report an issue: GitHub.