remove fps filter entirely from gif pipeline, rely on -r flag for frame rate control

This commit is contained in:
2026-05-28 01:29:17 +03:00
parent f7bbf37fea
commit d1a85ab189
+2 -6
View File
@@ -442,11 +442,10 @@ fn encode_gif_pass(
.map(|s| format!("{s},")) .map(|s| format!("{s},"))
.unwrap_or_default(); .unwrap_or_default();
let palettegen_filter = format!( let palettegen_filter = format!(
"{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,palettegen=stats_mode=diff:max_colors={colors}", "{cprefix}{kprefix}{sprefix}scale={w}:-1:flags=lanczos,palettegen=stats_mode=diff:max_colors={colors}",
cprefix = crop_prefix, cprefix = crop_prefix,
kprefix = click_prefix, kprefix = click_prefix,
sprefix = select_prefix, sprefix = select_prefix,
fps = effective_fps,
w = scale_width, w = scale_width,
colors = req.gif_colors, colors = req.gif_colors,
); );
@@ -466,15 +465,12 @@ fn encode_gif_pass(
GifDither::Bayer => "bayer:bayer_scale=3", GifDither::Bayer => "bayer:bayer_scale=3",
GifDither::None => "none", GifDither::None => "none",
}; };
let setpts = format!("setpts=N/{fps}/TB", fps = effective_fps);
let use_filter = format!( let use_filter = format!(
"{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,{setpts}[x];[x][1:v]paletteuse=dither={d}", "{cprefix}{kprefix}{sprefix}scale={w}:-1:flags=lanczos[x];[x][1:v]paletteuse=dither={d}",
cprefix = crop_prefix, cprefix = crop_prefix,
kprefix = click_prefix, kprefix = click_prefix,
sprefix = select_prefix, sprefix = select_prefix,
fps = effective_fps,
w = scale_width, w = scale_width,
setpts = setpts,
d = dither, d = dither,
); );