From 40c415109f7119dab862a7016cf1b9f2d8c88705 Mon Sep 17 00:00:00 2001 From: ze0987 Date: Mon, 31 Mar 2025 19:21:37 +0200 Subject: [PATCH] fix: respect `preview.max_width` for video thumbnails --- yazi-plugin/preset/plugins/video.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-plugin/preset/plugins/video.lua b/yazi-plugin/preset/plugins/video.lua index 1bc118a4..b17a4069 100644 --- a/yazi-plugin/preset/plugins/video.lua +++ b/yazi-plugin/preset/plugins/video.lua @@ -60,7 +60,7 @@ function M:preload(job) "-i", tostring(job.file.url), "-vframes", 1, "-q:v", qv, - "-vf", string.format("scale=-1:'min(%d,ih)':flags=fast_bilinear", rt.preview.max_height), + "-vf", string.format("scale=w=%d:h=%d:force_original_aspect_ratio=decrease:flags=fast_bilinear", rt.preview.max_width , rt.preview.max_height), "-f", "image2", "-y", tostring(cache), }):status()