popcornmix/omxplayer

BUG: --orientation (rotation) option behaves differently on different displays

lewicki-pk opened this issue · 8 comments

Hello,
I'm using omxplayer (version below, currently 4 commits behind master) and I would like to use --orientation argument to rotate the displayed video, but I've noticed that on 2 displays I have tested this argument behaves differently.

On one display which is 1024x768 it rotates properly (--orientation 90 rotates 90 degrees, 0, 180 and 270 are also rotated correctly).

On another display which is DELL display with 1920x1080 resolution the result is following:

  • --orientation 0 displays normal video (OK)
  • --orientation 90 rotates video 180 degrees and mirrors the output (WRONG)
  • --orientation 180 displays video rotated 180 degrees (OK)
  • --orientation 270 displays mirrored video (WRONG)

Has anybody else noticed such a behaviour?

Is this a bug?

Is this issue/request related?

How can I rotate video on second display properly?

omxplayer --version:

omxplayer - Commandline multimedia player for the Raspberry Pi
    Build date: Fri, 06 May 2016 14:07:54 +0000
    Version   : 6c90c75 [master]
    Repository: https://github.com/popcornmix/omxplayer.git

Are both displays connected through HDMI?
Any custom display options in config.txt? (e.g. display_rotate?)

Yes, both are connected through HDMI.
Nothing in config.txt (only uncommented line is dtparam=audio=on).
I'm not sure if it's important, but it's raspberry pi 2. I didn't test it on 3. Should I or it doesn't make any difference?

Pi3 won't make a difference.
What you are reporting is very surprising.

Can you confirm that with the same Pi2 and the same sdcard, running the same omxplayer command that the two displays behave differently with the rotate option?
(e.g. unplug one display, plug in the other display, reboot and run the omxplayer command again).

Yes. That was the same Pi.
Only displays were changed and I did that just as you wrote here.

Can you add to config.txt:

hdmi_group=2
hdmi_mode=16

and check it boots on both displays. That should force both displays to 1024x768.
Assuming they are both happy with that resolution, then does the rotate option behave the same or differently?

Sorry for late response.
I just checked that on both displays with those options set as you wrote and rotation worked properly on both displays.

I also checked on another FullHD display (other than my DELL) and there there is still a problem with rotation (90 and 270 add mirror as described in my first post here)

What do you have gpu_mem set to?
transposing a video frames requires an off screen buffer, whereas horizontal and vertical flips can be done in-place.
I suspect you are running out of gpu memory when the destintation buffer is 1920x1080 but are just getting away with it with 1024x768.
If gpu_mem is currently 64 then try setting it to 128.

Yes. You we're right.
Thank you.