nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Implementing an OpenMAX Component

Sun Jan 03, 2016 1:54 pm

Is it possible to implement a custom OpenMAX Component? For example, a Component that sends compressed video out through TCP/IP using a proprietary protocol? Are there any available OpenMAX component implementation ( and not usage ) samples/links ?

is RASPBIAN JESSIE LITE Open Source? can I get access to the OpenMAX component implementation Source Code ?

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Implementing an OpenMAX Component

Sun Jan 03, 2016 2:53 pm

The OpenMAX components are part of the GPU firmware which is completely closed-source. Raspbian Jessie is in general open-source , but beware : the official images contain
some closed-source extras.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: Implementing an OpenMAX Component

Sun Jan 03, 2016 3:12 pm

So, in essence, would it be right to say that OpenMAX IL @ RPi2 is not designed to be extended ( adding additional SW components ), rather, OpenMAX should only be used using the APIs ( thus, not equivalent of windows DirectShow/MediaFoundation ).

ghans
Posts: 7867
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Implementing an OpenMAX Component

Sun Jan 03, 2016 3:15 pm

I guess so. You might want to look into gstreamer , which has been described as "DirectX for Linux" and also supports the Pis OpenMAX implementation.
It is also modular , extensible and open-source.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: Implementing an OpenMAX Component

Mon Jan 04, 2016 10:12 am

gstreamer looks like what I need, TnX

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23052
Joined: Sat Jul 30, 2011 7:41 pm

Re: Implementing an OpenMAX Component

Mon Jan 04, 2016 2:30 pm

I'd be inclined to go gstreamer, but it shoudl be possible to write your own OMX components, running entirely on the ARM. ISTR that you should be able to use your own in a pipeline that also includes GPU based components, the framework handling moving buffers to and from the GPU. Check the ARM open source code base for the file save components, I think they do that. All on github.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: Implementing an OpenMAX Component

Mon Jan 04, 2016 3:24 pm

Can I ask why would you "be inclined to go gstreamer" ? 'gstreamer' seem quite robust to me ( as far as for the diversity of components/extensions/elements it has implemented ) .

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23052
Joined: Sat Jul 30, 2011 7:41 pm

Re: Implementing an OpenMAX Component

Mon Jan 04, 2016 4:54 pm

nadavrub wrote:Can I ask why would you "be inclined to go gstreamer" ? 'gstreamer' seem quite robust to me ( as far as for the diversity of components/extensions/elements it has implemented ) .
Exactly - a good set of components, and works on the Pi (camera, H264 encoder etc), so I would definitely use gstreamer.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

nadavrub
Posts: 16
Joined: Mon Dec 07, 2015 4:27 am

Re: Implementing an OpenMAX Component

Tue Jan 05, 2016 6:47 am

My Application involves trans-coding 1080p video to ~480p@25fps/h264, this mandate re-sizing & cropping, "re-sizing & cropping" is supported by HW using "OMX.broadcom.resize", Reviewing the gstreamer OMX plugins I couldn't find a re-sizing Element such as "OMX.broadcom.resize", are you aware of any HW accelerated way for re-sizing using gstreamer on RPi2, OR, should I implement my own gstreamer wrapper Element around "OMX.broadcom.resize" ?

gstreamer available OMX components:
omx: omxh264enc: OpenMAX H.264 Video Encoder
omx: omxvc1dec: OpenMAX WMV Video Decoder
omx: omxmjpegdec: OpenMAX MJPEG Video Decoder
omx: omxvp8dec: OpenMAX VP8 Video Decoder
omx: omxtheoradec: OpenMAX Theora Video Decoder
omx: omxh264dec: OpenMAX H.264 Video Decoder
omx: omxh263dec: OpenMAX H.263 Video Decoder
omx: omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx: omxmpeg2videodec: OpenMAX MPEG2 Video Decoder

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23052
Joined: Sat Jul 30, 2011 7:41 pm

Re: Implementing an OpenMAX Component

Tue Jan 05, 2016 10:09 am

Ahhh, that will be a problem, as far as I know, there is no HW resize in gstreamer, unless you write one.

So you may well need OpenMAX (or MMAL, which is an easier to use interface layer which uses OMX, but is only used on the Pi).

However, you are going to need to check whether the Pi can actually do the job you want. You are decoding 1080p25, resizing, and re-encoding to 480p25, which might be a little bit more than the HW can cope with.

There are people who have done transcoding on the Pi, try Google - a lot of the work may already have been done.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “OpenMAX”