Skip to content

fix(export): block browser fast export when video layers overlap on Windows - #227

Open
changqingdata wants to merge 1 commit into
0xsline:mainfrom
changqingdata:fix/windows-overlap-browser-export
Open

changqingdata wants to merge 1 commit into
0xsline:mainfrom
changqingdata:fix/windows-overlap-browser-export

Conversation

@changqingdata

@changqingdata changqingdata commented Oct 24, 2026 •

Copy link
Copy Markdown

Problem

On Windows, a timeline whose video layers overlap in time hangs the browser fast export (WebCodecs): the progress stops at some percentage and never reports an error, so the only way out is to cancel it manually.

Reproduction

  1. Windows 10/11 with Chrome or Edge
  2. Put two video clips that overlap in time on the timeline (V1 + V2, or a nested sequence)
  3. Export with the browser fast export
  4. Progress freezes and never finishes

Cause

browserTimelineBlocker() is a stub that always returns null, so nothing rejects the browser path for a timeline with several video sources. Multiple OffthreadVideo layers then request frames from the WebCodecs decoder at the same time, and on Windows that decoder stalls.

Change

  • Add hasOverlappingVideoSources(): sweeps the clip intervals of the timeline, nested sequences included, and reports whether two or more video sources are live on the same frame.
  • browserTimelineBlocker() now returns an explicit reason when the browser is Windows and such an overlap exists, so the export falls back to the local renderer. The server render path is untouched.
  • The platform is a parameter with a browser-derived default, so the verify script can cover Windows, other platforms and the empty timeline without a DOM.

Verification

  • src/export/browserExport.verify.ts: single track is not blocked, overlapping tracks are blocked, nested sequence overlap is blocked, non-Windows is not blocked
  • npx tsc -b and npm run lint pass locally

This only rejects the fast path on the configurations that hang; the render itself is unchanged.

…indows

Several video layers that overlap in time share Remotion's OffthreadVideo
compositor and frame cache. On Windows the WebCodecs decoder stalls when more
than one of them requests frames: the fast export neither advances nor reports
an error, so the user can only cancel it.

browserTimelineBlocker() was a stub that always returned null, so nothing
stopped the browser path for those timelines. It now sweeps the clip intervals
of the timeline (nested sequences included) and, when a Windows browser would
run two or more video sources on the same frame, returns an explicit reason so
the export falls back to the local renderer instead of hanging.

The platform is a parameter with a browser-derived default, so the verify
script drives the Windows, other-platform and empty-timeline cases without a
DOM.

Verification: npx tsc -b, npm run lint, src/export/browserExport.verify.ts
@changqingdata changqingdata changed the title fix(export): block browser fast export when video layers overlap on W… fix(export): block browser fast export when video layers overlap on Windows Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant