mpv_thumbnail_script icon indicating copy to clipboard operation
mpv_thumbnail_script copied to clipboard

Fix rotated videos

Open po5 opened this issue 2 years ago • 5 comments

Closes #4

po5 avatar May 03 '23 03:05 po5

This does not solve the issue for me, the thumbnail has the correct aspect ratio, but the image is still glitched.

Here is the result with the video in https://github.com/marzzzello/mpv_thumbnail_script/issues/4#issuecomment-992027155.

Screenshot_20230713_121649

NicolaSmaniotto avatar Jul 13 '23 10:07 NicolaSmaniotto

Weird, can you try it in thumbfast with a compatible UI? We do the same thing there and it seems to work.
Let me know if the PR is badly implemented or if thumbfast's fix itself is not sufficient.

po5 avatar Jul 13 '23 17:07 po5

It works with thumbfast (vanilla osc).

Screenshot_20230715_114412

I'm confused, also because the PR does fix the issue in some cases.

Here is a test I made

https://github.com/marzzzello/mpv_thumbnail_script/assets/22083075/4f1d577c-de84-4617-b0dc-977c8e68944d

Here are the results:

Thumbnail from the landscape file, opening the landscape file: Screenshot_20230715_121322

Thumbnail from the landscape file, opening the portrait file: Screenshot_20230715_121523

Thumbnail from the portrait file, opening the portrait file: Screenshot_20230715_21704

Thumbnail from the portrait file, opening the landscape file: Screenshot_20230715_121755

The "glitched" effect looks like the thumbnails are generated for the landscape video, but then to represent them the rows are wrapped around to match the portrait video width. This is indeed what happens with my test file if the thumbnails are generated before the video is rotated, then they are shown as alternating white/grey rows.

NicolaSmaniotto avatar Jul 15 '23 10:07 NicolaSmaniotto

In any case, even if I'd like to investigate this further, it solves the issue sometimes and it's still a good enough reason to merge.

NicolaSmaniotto avatar Jul 15 '23 10:07 NicolaSmaniotto

I was wrong, the test video I made created thumbnails that were too regular and hid the glitches. Here is another, the problem is still present:

New test file

https://github.com/marzzzello/mpv_thumbnail_script/assets/22083075/d2f517cb-702b-4474-a6db-b200d7e35e66

Generated thumbnail: image

NicolaSmaniotto avatar Jul 16 '23 08:07 NicolaSmaniotto