fix GIF speed: remove capture-side fps filter, let encoder handle conversion
The capture pipeline was applying fps=N to drop frames from monitor refresh rate to user fps. Then the GIF encoder applied fps=M on the already-converted file. Double fps conversion = broken frame timestamps = wrong playback speed. Fix: remove fps filter from capture. Intermediate files keep monitor's native refresh rate (e.g. 120fps). The GIF/video encoder's fps filter handles the conversion correctly in one clean step. Also removed redundant -r flag from GIF encoder (already done), and restored the 16:9 preset and low FPS options that were removed earlier.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user