restore fps filter for gif (needed for pipe throughput), add setpts=N/FRAME_RATE/TB to fix playback speed
This commit is contained in:
@@ -442,10 +442,11 @@ fn encode_gif_pass(
|
||||
.map(|s| format!("{s},"))
|
||||
.unwrap_or_default();
|
||||
let palettegen_filter = format!(
|
||||
"{cprefix}{kprefix}{sprefix}scale={w}:-1:flags=lanczos,palettegen=stats_mode=diff:max_colors={colors}",
|
||||
"{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,palettegen=stats_mode=diff:max_colors={colors}",
|
||||
cprefix = crop_prefix,
|
||||
kprefix = click_prefix,
|
||||
sprefix = select_prefix,
|
||||
fps = effective_fps,
|
||||
w = scale_width,
|
||||
colors = req.gif_colors,
|
||||
);
|
||||
@@ -466,10 +467,11 @@ fn encode_gif_pass(
|
||||
GifDither::None => "none",
|
||||
};
|
||||
let use_filter = format!(
|
||||
"{cprefix}{kprefix}{sprefix}scale={w}:-1:flags=lanczos[x];[x][1:v]paletteuse=dither={d}",
|
||||
"{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,setpts=N/FRAME_RATE/TB[x];[x][1:v]paletteuse=dither={d}",
|
||||
cprefix = crop_prefix,
|
||||
kprefix = click_prefix,
|
||||
sprefix = select_prefix,
|
||||
fps = effective_fps,
|
||||
w = scale_width,
|
||||
d = dither,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user