We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

3 posts • Page 1 of 1
eddsor
Posts: 15
Joined: Fri Jun 04, 2021 5:53 pm

Overlaying an image using OMXPlayer and numpy array

Fri Jun 04, 2021 6:05 pm

An image can be overlayed a video played with OMXPlayer if omxiv renders the image in a higher level than OMXPlayer.
If OMXPlayer renders the video in level -128 and I write the image as a numpy array direct to the framebuffer (level -127), I had expexted an overlayed image, but no image is visible, only the video.

Code: Select all

fb = numpy.memmap('/dev/fb0', dtype='uint8',mode='w+', shape=(1080,1920,4))
fb[:] = numpy.array(img)
What is wrong here?

dividuum
Posts: 414
Joined: Sun Jun 16, 2013 1:18 pm

Re: Overlaying an image using OMXPlayer and numpy array

Sat Jun 05, 2021 9:57 am

Two immediate hints I can give:
  • While both programs are running, run „vcgencmd dispmanx_list" in a third terminal. It will show active layers and you should see both layers if you configured everything correctly.
  • If you only see one layer, maybe omxplayer is configured to exclusively use the output. I’m on mobile at the moment, but there are multiple options to adjust the output layer and related settings.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

eddsor
Posts: 15
Joined: Fri Jun 04, 2021 5:53 pm

Re: Overlaying an image using OMXPlayer and numpy array

Sat Jun 05, 2021 3:06 pm

The output of `vcgencmd dispmanx_list` shows that my image is not written to the framebuffer::

Code: Select all

display:2 format:YUV_UV transform:0 layer:-128 1280x720 src:0,0,1280,720 dst:0,0,1920,1080 cost:1216 lbm:20480 (ignore lower layers)
display:2 format:UNKNOWN transform:100000 layer:-127 0x0 src:0,0,1920,253 dst:0,780,1920,253 cost:0 lbm:0

3 posts • Page 1 of 1

Return to "OpenMAX"

AltStyle によって変換されたページ (->オリジナル) /