occivink / mpv-gallery-view

Gallery-view scripts for mpv
The Unlicense
189 stars 20 forks source link

Possible to handle video rotation/orientation tag? #23

Open automatata opened 4 years ago

automatata commented 4 years ago

Hi. I filmed some videos on my phone in portrait orientation. Entering show-text ${video-params} in the mpv console shows

...
w=1920
h=1080
...
rotate=90

indicating the videos themselves are formatted in landscape, with a rotation/orientation field set in the metadata, or so I think.

mpv plays the video correctly, but this script doesn't seem to read that field. The result is broken thumbnails where the pixels are misplaced in a pattern of

row1 row1 row1 row2
row2 row2 row3 row3
row3 row4 row4 row4

where it should be

row1 row1 row1
row2 row2 row2
row3 row3 row3
row4 row4 row4

Would it be easy to fix this issue?

By the way this also happens with another similar script: mpv_thumbnail_script. If the solution would be simple, I'd like to mimic a fix there too.

Thanks for the consideration.