diff --git a/src-tauri/src/capture.rs b/src-tauri/src/capture.rs index 1006e1b..4f4abb5 100644 --- a/src-tauri/src/capture.rs +++ b/src-tauri/src/capture.rs @@ -58,7 +58,10 @@ impl GraphicsCaptureApiHandler for CaptureHandler { }; // Reduce frame rate before scaling to avoid processing unnecessary frames - filter_parts.push(format!("fps={}", setup.fps)); + // NOTE: Do NOT add fps filter here - it mangles timestamps and causes + // double fps conversion when the GIF/video encoder also applies fps filtering. + // The intermediate file keeps the monitor's native refresh rate. + // The export pipeline's fps filter handles the conversion correctly. if working_width > MAX_ENCODE_WIDTH { filter_parts.push(format!("scale={}:-2", MAX_ENCODE_WIDTH)); diff --git a/src-tauri/src/encode.rs b/src-tauri/src/encode.rs index 953e831..1617f5c 100644 --- a/src-tauri/src/encode.rs +++ b/src-tauri/src/encode.rs @@ -465,7 +465,7 @@ fn encode_gif_pass( }; // Single-pass approach: split the stream, generate palette from one copy, - // apply palette to the other. Uses -r for output framerate. + // apply palette to the other. The fps filter handles frame rate conversion. let filter_complex = format!( "{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,split[s0][s1];[s0]palettegen=stats_mode=diff:max_colors={colors}[p];[s1][p]paletteuse=dither={d}", cprefix = crop_prefix,