fix gif playback speed - reset PTS after fps filter so gif muxer uses correct frame delays
This commit is contained in:
@@ -466,13 +466,15 @@ 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[x];[x][1:v]paletteuse=dither={d}",
|
"{cprefix}{kprefix}fps={fps},{sprefix}scale={w}:-1:flags=lanczos,{setpts}[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,
|
fps = effective_fps,
|
||||||
w = scale_width,
|
w = scale_width,
|
||||||
|
setpts = setpts,
|
||||||
d = dither,
|
d = dither,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user