export on windows

This commit is contained in:
Siddharth
2025-11-20 16:58:55 -07:00
parent 632816057b
commit 27377c2194
3 changed files with 11 additions and 0 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

+11
View File
@@ -118,9 +118,20 @@ export class VideoExporter {
if (this.cancelled) break;
const canvas = this.renderer!.getCanvas();
// CRITICAL FIX for Windows: Explicitly specify colorSpace when creating VideoFrame from canvas
// Without this, VideoFrame.colorSpace can be null on Windows, causing "Cannot read properties of null" error
// Using BT.709 with sRGB transfer (IEC 61966-2-1) which is standard for HD video
// @ts-ignore - TypeScript definitions may not include all VideoFrameInit properties
const exportFrame = new VideoFrame(canvas, {
timestamp,
duration: frameDuration,
colorSpace: {
primaries: 'bt709',
transfer: 'iec61966-2-1',
matrix: 'rgb',
fullRange: true,
},
});
if (this.encoder && this.encoder.state === 'configured') {