Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lewicki-pk opened this issue May 20, 2016 · 8 comments

Comments

@lewicki-pk
Copy link

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
@popcornmix
Copy link
Owner

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

@lewicki-pk
Copy link
Author

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?

@popcornmix
Copy link
Owner

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).

@lewicki-pk
Copy link
Author

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

@popcornmix
Copy link
Owner

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?

@lewicki-pk
Copy link
Author

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)

@popcornmix
Copy link
Owner

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.

@lewicki-pk
Copy link
Author

Yes. You we're right.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants