fix: respect the user's max_width setting for the built-in video previewer (#2560)

Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
ze0987 2025-04-11 07:23:01 +02:00 committed by GitHub
parent ca4fe2ced7
commit bef481057a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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='min(%d,iw)':'min(%d,ih)':force_original_aspect_ratio=decrease:flags=fast_bilinear", rt.preview.max_width, rt.preview.max_height),
"-f", "image2",
"-y", tostring(cache),
}):status()