rexsj
Posts: 16
Joined: Tue Dec 11, 2012 8:43 am

OpenGLES with OpenMAX

Fri May 31, 2013 5:55 am

Hello there..
I m trying to display an image and a video simultaneously on th screen for signage purpose. So the left part of the screen will display image and the other part will play video. Can anybody give me a hint on how to proceed with this?? I am displaying images with OpenGLES but now for video,should I use OpenMaX or any other way out? Its many days I am researching n googling on this.... but in vain :( plsss help.

User avatar
DaveDriesen
Posts: 113
Joined: Sun Mar 31, 2013 8:28 pm
Location: Top of the food chain
Contact: Website

Re: OpenGLES with OpenMAX

Fri May 31, 2013 6:39 am

My team did a lot of research on this in the past and Theora came out as prime choice, mainly because of its BSD-style license.

Dom previously posted that the pi has software (but still vector accelerated) decoding support for theora.

From the theora.org website:
Theora (and all associated technologies released by the Xiph.org Foundation) is released to the public via a BSD-style license. It is completely free for commercial or noncommercial use. That means that commercial developers may independently write Theora software which is compatible with the specification for no charge and without restrictions of any kind.
Decoding video using Theora is fairly straightforward, we spent/lost more time on writing decent YUV to RGB conversion code to display the video in OpenGL. There might be a shortcut you can find in that area.

Displaying video in your app is a lot more involved then displaying an image because you have to deal with timing, but in practice you just decode frames to a texture, which you can then render on-screen.

Dave Driesen
Linux dev and oldskool elite

hjimbens
Posts: 78
Joined: Fri May 24, 2013 9:05 am

Re: OpenGLES with OpenMAX

Fri May 31, 2013 3:30 pm

rexsj wrote:but now for video,should I use OpenMaX or any other way out?
Yes, for video you should use OpenMax. In /opt/vc/src/hello_pi, (assuming that you are using Raspbian), you will find the hello_video and hello_videocube samples. These show how to play videos on dispmanx layers and opengl es textures. The samples use raw h264 videos. If you have mp4 files you will have to use ffmpeg to demux.

rexsj
Posts: 16
Joined: Tue Dec 11, 2012 8:43 am

Re: OpenGLES with OpenMAX

Thu Jun 06, 2013 11:22 am

So, u say its possible to render an image and a video simultaneously to the screen ? or play a video then image, possible with openGLES? I am trying to do ur recommmended solution.... looking into the said program files, but combining opengles and openmax ...... I hope I can achieve it. :roll:

KenT
Posts: 758
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
Contact: Website

Re: OpenGLES with OpenMAX

Thu Jun 06, 2013 12:16 pm

My Pi Presents does it using Tkinter for text and omxplayer for the video. I haven't tried images using Tkinter/PIL but I don't see why this should not work with omxplayer.

The video is always in front of the text but in later versions of omxplayer you can define a screen window for the video to stop them overlapping. Will build this into Pi Presents one day.

The downside of using PIL is that it takes a second or so to render a full screen image, is opengles any faster?
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com

Return to “OpenGLES”