From e679f4a5e807cf91998de2b2d9ca4bee916098d5 Mon Sep 17 00:00:00 2001 From: Eva Date: Wed, 3 May 2023 05:38:10 +0200 Subject: [PATCH] Fix rotated videos Closes #4 --- src/thumbnailer_shared.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/thumbnailer_shared.lua b/src/thumbnailer_shared.lua index 3828034..4ba96ca 100644 --- a/src/thumbnailer_shared.lua +++ b/src/thumbnailer_shared.lua @@ -236,6 +236,10 @@ function Thumbnailer:get_thumbnail_size() if not (video_width and video_height) then return nil end + local rotate = mp.get_property_number("video-params/rotate") + if rotate ~= nil and rotate % 180 == 90 then + video_width, video_height = video_height, video_width + end local w, h if video_width > video_height then