Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Export dialog sizes use the same even-size rounding as the saved work

Bowen Xue28b08b94e05f
diff --git a/web/editor_export_dialog.js b/web/editor_export_dialog.js
index 66c7ef6..4e31ebf 100644
--- a/web/editor_export_dialog.js
+++ b/web/editor_export_dialog.js
@@ -18,9 +18,14 @@ const el = (tag, cls, text) => {
};
export function exportSizes(record) {
- const short = Math.min(record.width, record.height);
+ const short = Math.min(record.width, record.height), long = Math.max(record.width, record.height);
+ // Same rounding as the engine's export (nearest even long side), so the dialog and the saved work agree.
+ const sized = n => {
+ const other = Math.max(2, 2 * Math.floor((long * n + short) / (2 * short)));
+ return record.width >= record.height ? {width: other, height: n} : {width: n, height: other};
+ };
return [{short: null, width: record.width, height: record.height}, ...[1080, 720, 480].filter(n => n < short).map(n => ({
- short: n, width: Math.floor(record.width * n / short / 2) * 2, height: Math.floor(record.height * n / short / 2) * 2,
+ short: n, ...sized(n),
}))];
}