Create polished demo videos without editing skills. Mac/Windows/Linux
fix(export): address CUDA dimension review notes
wiiiii123a18d8469ca60
diff --git a/electron/native/bin/win32-x64/helpers-manifest.json b/electron/native/bin/win32-x64/helpers-manifest.jsonindex 3a9f7dfa..c5080b66 100644--- a/electron/native/bin/win32-x64/helpers-manifest.json+++ b/electron/native/bin/win32-x64/helpers-manifest.json@@ -26,10 +26,10 @@},"recordly-nvidia-cuda-compositor": {"binaryName": "recordly-nvidia-cuda-compositor.exe",- "binarySha256": "e9e062d1177075ac36eecf97e5934722a7fb782809e29ab60da54b396feb95b9",+ "binarySha256": "250a3f8cac7c6ea38a873434d23d4b2be7d6555e42cc0b405aa26f774169159c","sourceDir": "electron/native/nvidia-cuda-compositor",- "sourceFingerprint": "021ea1abd83606b589f694ddedb3af8035e2e08e2e130cf4fff6d6a3f7d64833",- "updatedAt": "2026-05-27T10:56:40.171Z"+ "sourceFingerprint": "de1219228ce326e96d1f4815a3763b10d5f235cc1286bc6542c99707a85d5947",+ "updatedAt": "2026-05-27T11:29:32.957Z"}}}diff --git a/electron/native/bin/win32-x64/recordly-nvidia-cuda-compositor.exe b/electron/native/bin/win32-x64/recordly-nvidia-cuda-compositor.exeindex 3e6ebd57..c23c14f9 100644Binary files a/electron/native/bin/win32-x64/recordly-nvidia-cuda-compositor.exe and b/electron/native/bin/win32-x64/recordly-nvidia-cuda-compositor.exe differdiff --git a/electron/native/nvidia-cuda-compositor/run-mp4-pipeline.mjs b/electron/native/nvidia-cuda-compositor/run-mp4-pipeline.mjsindex 255c98aa..43324b05 100644--- a/electron/native/nvidia-cuda-compositor/run-mp4-pipeline.mjs+++ b/electron/native/nvidia-cuda-compositor/run-mp4-pipeline.mjs@@ -1052,6 +1052,15 @@ const sourcePtsPath = join(workDir, `${baseName}.source-pts.csv`);const videoInfo = getVideoInfo(inputPath);const webcamInfo = webcamInput ? getVideoInfo(webcamInput) : null;+if (requestedOutputWidth > 0 !== requestedOutputHeight > 0) {+ fail("--width and --height must be specified together");+}+if (+ requestedOutputWidth > 0 &&+ (requestedOutputWidth % 2 !== 0 || requestedOutputHeight % 2 !== 0)+) {+ fail("--width and --height must be even numbers for NV12 encoding");+}const outputWidth = requestedOutputWidth > 0 ? requestedOutputWidth : videoInfo.width;const outputHeight = requestedOutputHeight > 0 ? requestedOutputHeight : videoInfo.height;const timelineSegments = readTimelineSegments(timelineMap);@@ -1265,10 +1274,6 @@ const encodeArgs = [annexBPath,"--output",encodedPath,- "--width",- String(outputWidth),- "--height",- String(outputHeight),"--fps",String(fps),"--input-frames",@@ -1283,6 +1288,9 @@ const encodeArgs = ["--chunk-mb",String(chunkMb),];+if (requestedOutputWidth > 0 && requestedOutputHeight > 0) {+ encodeArgs.push("--width", String(outputWidth), "--height", String(outputHeight));+}if (sourcePts.path && sourcePts.frames >= sourceWindowFrames) {encodeArgs.push("--source-pts", sourcePts.path);}diff --git a/electron/native/nvidia-cuda-compositor/src/main.cu b/electron/native/nvidia-cuda-compositor/src/main.cuindex 8c5ea9dc..28c72123 100644--- a/electron/native/nvidia-cuda-compositor/src/main.cu+++ b/electron/native/nvidia-cuda-compositor/src/main.cu@@ -302,6 +302,12 @@ Options parseOptions(int argc, char** argv) {if (options.inputPath.empty()) {fail("--input is required");}+ if ((options.width > 0) != (options.height > 0)) {+ fail("--width and --height must be specified together");+ }+ if (options.width > 0 && (options.width % 2 != 0 || options.height % 2 != 0)) {+ fail("--width and --height must be even numbers for NV12 encoding");+ }return options;}diff --git a/src/lib/exporter/exportBitrate.test.ts b/src/lib/exporter/exportBitrate.test.tsindex 1d46dc09..c8ef1715 100644--- a/src/lib/exporter/exportBitrate.test.ts+++ b/src/lib/exporter/exportBitrate.test.ts@@ -60,6 +60,29 @@ describe("export bitrate policy", () => {).toBe(27_000_000);});+ it("scales modern native static-layout source exports at 60fps", () => {+ const sharedOptions = {+ width: 1920,+ height: 1080,+ quality: "source" as const,+ encodingMode: "quality" as const,+ useModernNativeStaticLayout: true,+ };++ const thirtyFpsBitrate = getMp4ExportBitrate({+ ...sharedOptions,+ frameRate: 30,+ });+ const sixtyFpsBitrate = getMp4ExportBitrate({+ ...sharedOptions,+ frameRate: 60,+ });++ expect(thirtyFpsBitrate).toBe(27_000_000);+ expect(sixtyFpsBitrate).toBeGreaterThan(thirtyFpsBitrate);+ expect(sixtyFpsBitrate).toBe(38_183_766);+ });+it("does not raise fast exports when the requested bitrate is already lower than the cap", () => {expect(getMp4ExportBitrate({diff --git a/src/lib/exporter/exportBitrate.ts b/src/lib/exporter/exportBitrate.tsindex 40110b6f..84d87133 100644--- a/src/lib/exporter/exportBitrate.ts+++ b/src/lib/exporter/exportBitrate.ts@@ -43,6 +43,10 @@ function getBaseMp4ExportBitrate(width: number, height: number, quality: ExportQ}function getFrameRateBitrateMultiplier(frameRate: ExportMp4FrameRate): number {+ // This only scales requestedBitrate above REFERENCE_FRAME_RATE, so 24fps+ // and 30fps share the same multiplier. useModernNativeStaticLayout can+ // still change the final bitrate because pixelRateScale uses frameRate+ // against REFERENCE_PIXEL_RATE for the native layout floor/cap.return Math.sqrt(Math.max(1, frameRate / REFERENCE_FRAME_RATE));}