From 84d67c73b045b42419199d799d672bdfa70ec2f2 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Thu, 16 Mar 2023 04:29:12 +0100 Subject: [PATCH] make_keyframes: Set default format to GRAY8 This will allow clips with non-standard resolutions to be downscaled without any concerns. --- automation/vapoursynth/aegisub_vs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/vapoursynth/aegisub_vs.py b/automation/vapoursynth/aegisub_vs.py index 16b314c7f..1eca5f5d3 100644 --- a/automation/vapoursynth/aegisub_vs.py +++ b/automation/vapoursynth/aegisub_vs.py @@ -167,7 +167,7 @@ def wrap_lwlibavsource(filename: str, cachedir: str | None = None, **kwargs: Any def make_keyframes(clip: vs.VideoNode, use_scxvid: bool = False, - resize_h: int = 360, resize_format: int = vs.YUV420P8, + resize_h: int = 360, resize_format: int = vs.GRAY8, **kwargs: Any) -> List[int]: """ Generates a list of keyframes from a clip, using either WWXD or Scxvid. @@ -181,7 +181,7 @@ def make_keyframes(clip: vs.VideoNode, use_scxvid: bool = False, The remaining keyword arguments are passed on to the respective filter. """ - clip = core.resize.Bilinear(clip, width=resize_h * clip.width // clip.height, height=resize_h, format=resize_format); + clip = core.resize.Bilinear(clip, width=resize_h * clip.width // clip.height, height=resize_h, format=resize_format) if use_scxvid: ensure_plugin("scxvid", "libscxvid", "To use the keyframe generation, the scxvid plugin for VapourSynth must be installed")