Video Orientation

  • I decided it was time to update my Pi 2 running 9.2.8 to a Pi4 running 11.0.3. which was easy to do but now I have some changed behaviour with video orientation:

    On some of my home videos which were shot inverted I could change the orientation using either the metadata or by 180 degree rotation, no problem and it seemed to work seamlessly on the earlier version.

    With the newer version on the same videos from my server I can change the orientation by 90 degrees but selecting metadata or 180 degrees still leaves me with inverted video.

    So, am I missing something basic (I can't find it referenced anywhere on the forum) or should I be reporting it as a bug?

  • I have a hunch it's this https://github.com/xbmc/xbmc/issues/23622 albeit with a slightly different use-case/presentation. If I'm right, it's not technically a bug since current Kodi GBM code is working correctly. The issue is that current Kodi GBM code doesn't handle enough rotation scenarios. The reason it stopped working is due to RPi images swithing to the GBM display pipeline (moving away from proprietary code to standards in the now-upstream kernel).

  • If you disable "Allow using DRM PRIME decoder" in settings/player/video then the orientation flag is supported.

    But performance will be lower.

    I think on the nightly builds, you can leave that setting enabled but change "PRIME Render method" to EGL,

    which will have better performance (but still not as good as using DRM for rendering).

  • Thank you gents.

    That proved to be spot on and having disabled "Allow using DRM PRIME decoder" normal service is resumed.

    This is not an area in which I have any knowledge and I would not have guessed the reason or resolution so I appreciate the help and expertise.

  • I am aware that the recomend procedure would be to create a new thread, but I do think it's pertinent to resume with a follow up question in regards to video orientation:


    I'm using a Raspberry pi5, reproducing horizontal (1920x1080p) video/images on a 40inch TV rotated clockwise (vertical)

    I've tried many things, including editing the config.txt but to no avail achieving the video orientation that I was looking for (vertical)

    The only way that I can 'put' my horizontal videos to play in vertical/portrait mode is when I change the video settings individually - through editing the orientation flag from "from metadata" to "90°". It stays that way (vertical) until I reboot the system and it definitely doesn't stay that way on future new videos - meaning that for new videos I would have to manually change video orientation flag for each one.


    Thing is: I want to enforce the vertical mode to all videos, including future new ones, since my TV is already rotated.

    So far I've been using a script I created using ffmpeg to automatically rotate my videos before uploading them into my Raspberry, but obviously I would really prefer to rely on Kodi mediaplayer settings to default orientation to vertical.


    Has anyone found a way to do? To preset Kodi Mediaplayer orientation to "90°" instead of the default "from metadata"?

    Perhaps changing the default output resolution of my RPi to 1080x1920?


    Thank you in advance.


    Tldr: I'm looking for a way to change default Kodi mediaplayer orientation flag from "from metadata" to, for example, "90°" without having to change those settings manually and individually for each video.