I have a python program that runs omxplayer in one thread and pygame surfaces manipulation in another.
Currently the omxplayer video size and position has been restricted to one area of the screen and the pygame surfaces sit around it. So both are visible.
I am wanting to run the video full screen and have the surfaces transparent on top of it.
I can set the omxplayer to use layer zero, but is there a way of forcing the pygame output to a higher layer number ?
Re: how to change the screen layer (frame buffer) number for python
You could place the video below the frame buffer layer instead of trying to move the frame buffer itself.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted
Re: how to change the screen layer (frame buffer) number for python
Thanks for the suggestion.
I have tried that, but omxplayer will not accept a negative layer number
So, I have to try and move the pygame output into a positive layer number
I have tried that, but omxplayer will not accept a negative layer number
So, I have to try and move the pygame output into a positive layer number
Re: how to change the screen layer (frame buffer) number for python
It does, at least with the version I have here on my test Pi4:
Code: Select all
$ omxplayer --layer -128 demo1/optical.mp4
Code: Select all
root@raspberrypi:~# vcgencmd dispmanx_list
display:2 format:YUV_UV transform:0 layer:-128 640x368 src:0,0,640,360 dst:0,0,1920,1080 cost:1216 lbm:10240 (ignore lower layers)
display:2 format:XRGB8888 transform:0 layer:-127 1920x1080 src:0,0,1920,1080 dst:0,0,1920,1080 cost:1156 lbm:0
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted
Re: how to change the screen layer (frame buffer) number for python
For some reason I had it in my head that the 'layer parameter was '-l'. Using the full '--layer' now lets me go negative
However, on my my Pi 2 using -128 for omxplayer gives sound but no video. I have a Pi 3 which I will have to hook up to try.
I am still wondering if there is a way of wrestling the command line away from -127.
However, on my my Pi 2 using -128 for omxplayer gives sound but no video. I have a Pi 3 which I will have to hook up to try.
I am still wondering if there is a way of wrestling the command line away from -127.
Re: how to change the screen layer (frame buffer) number for python
That's expected and what I meant with my XRGB8888 note. If the layer above isn't transparent, a video behind it will not be visible.
Probably, but pointless: Just use layers relative to -127. Only the relative layer position is relevant.I am still wondering if there is a way of wrestling the command line away from -127.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted
Re: how to change the screen layer (frame buffer) number for python
Thanks, for the update.
I will now move forward as you suggest.
I will now move forward as you suggest.