fix: respect preview.max_width for video thumbnails

This commit is contained in:
ze0987 2025-03-31 19:21:37 +02:00 committed by sxyazi
parent ca4fe2ced7
commit 40c415109f
No known key found for this signature in database

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=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()