From 78fc195dff5294d57c7eb1307cf322eda0ecff7a Mon Sep 17 00:00:00 2001 From: Harshith Padakanti Date: Mon, 1 Jun 2026 16:41:08 +0530 Subject: [PATCH 1/3] Add optional fields for fallback handling in types --- src/lib/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/types.ts b/src/lib/types.ts index deb816b8..248e02cc 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -66,6 +66,8 @@ export interface ExportResult { height: number; format: "mp4" | "webm" | "mkv" | "gif"; exportDurationMs?: number; + usedFallback?: boolean; + fallbackReason?: string; } export type ExportStatus = From e002b14ae6d38cf421ae88825319dc178187cef7 Mon Sep 17 00:00:00 2001 From: Harshith Padakanti Date: Mon, 1 Jun 2026 16:43:40 +0530 Subject: [PATCH 2/3] Add fallback handling for video export format Handle fallback for unsupported video formats during export. --- src/lib/ffmpeg.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/ffmpeg.ts b/src/lib/ffmpeg.ts index 625387d2..8d8b027d 100644 --- a/src/lib/ffmpeg.ts +++ b/src/lib/ffmpeg.ts @@ -290,7 +290,15 @@ export async function exportVideo( ); try { - return await exportPromise; + const exportResult = await exportPromise; + if (exportResult.format !== recipe.format) { + return { + ...exportResult, + usedFallback: true, + fallbackReason: `${recipe.format.toUpperCase()} encoding failed. Your video was exported as ${exportResult.format.toUpperCase()} instead.`, + }; + } + return exportResult; } finally { signal?.removeEventListener("abort", onAbort); } From 4354868da8aae3461e11c1908041b9ee130c4ce0 Mon Sep 17 00:00:00 2001 From: Harshith Padakanti Date: Mon, 1 Jun 2026 16:46:09 +0530 Subject: [PATCH 3/3] Update DownloadResult.tsx --- src/components/DownloadResult.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/DownloadResult.tsx b/src/components/DownloadResult.tsx index 9cb04286..c1edc4cc 100644 --- a/src/components/DownloadResult.tsx +++ b/src/components/DownloadResult.tsx @@ -82,7 +82,16 @@ export default function DownloadResult({ result, onReset, soundOnCompletion, onT {soundError && (

Completion sound could not be played on this device.

)} - + + {result.usedFallback && result.fallbackReason && ( +
+
+ )}

Resolution