diff --git a/sam-tool-tauri/src-tauri/src/settings.rs b/sam-tool-tauri/src-tauri/src/settings.rs
index f04eb75..bd32e27 100644
--- a/sam-tool-tauri/src-tauri/src/settings.rs
+++ b/sam-tool-tauri/src-tauri/src/settings.rs
@@ -24,6 +24,11 @@ pub struct Settings {
/// bulk extract (take every Nth frame in range). 1 = no decimation.
#[serde(default = "default_frame_skip")]
pub frame_skip: u64,
+ /// Maximum height (in pixels) of the canvas backing store during preview.
+ /// 0 = no cap beyond native resolution. Common presets: 2160 (4K),
+ /// 1440 (2K), 1080, 720, 480. Smaller → less draw cost.
+ #[serde(default)]
+ pub preview_max_height: u32,
}
fn default_sam_url() -> String {
@@ -58,6 +63,7 @@ impl Default for Settings {
cache_capacity: default_cache_capacity(),
hwaccel: String::new(),
frame_skip: default_frame_skip(),
+ preview_max_height: 0,
}
}
}
diff --git a/sam-tool-tauri/src/components/shell/SettingsModal.tsx b/sam-tool-tauri/src/components/shell/SettingsModal.tsx
index 0188133..e34fcf8 100644
--- a/sam-tool-tauri/src/components/shell/SettingsModal.tsx
+++ b/sam-tool-tauri/src/components/shell/SettingsModal.tsx
@@ -301,6 +301,31 @@ export function SettingsModal({ open, onClose, onSaved }: Props) {
/>
+
+
+
+
{error &&
{error}
}
diff --git a/sam-tool-tauri/src/index.css b/sam-tool-tauri/src/index.css
index 760920a..775d365 100644
--- a/sam-tool-tauri/src/index.css
+++ b/sam-tool-tauri/src/index.css
@@ -1606,6 +1606,15 @@ main {
0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
+/* ExtractMode: canvas-frame must fill the stage at the video's aspect-ratio.
+ We can't rely on the