shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

OpenMax

Tue Jun 19, 2018 10:37 am

**How can I change the OpenMax resolution in run time .
Please help I am stuck.** :roll: :roll:

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenMax

Tue Jun 19, 2018 1:26 pm

Your question as written makes little sense. Resolution of input or output, and from what component?
OpenMax is an API for many multimedia functions (camera, video encode, video decode, image encode, image decode, rendering, and some audio functions).
Have a look at some of the sample applications for how to use IL - https://github.com/raspberrypi/userland ... s/hello_pi
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

Re: OpenMax

Wed Jun 20, 2018 3:26 am

can i output 2 different resolution from enocder ? (one input)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenMax

Wed Jun 20, 2018 5:58 am

No. It only has one output port.
You can use video splitter to split the stream and feed into two independent video encode components, via resize if you want a different resolution. Resize is quite a processor intensive operation so you may not manage real-time, and the encode hardware is only rated for 1080p30, so your overall encoding parameters shouldn't exceed 62MPix/s.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

Re: OpenMax

Wed Jun 20, 2018 6:41 am

Is there any way to change resolution on the fly ?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenMax

Wed Jun 20, 2018 9:04 am

shafayatnabi wrote:
Wed Jun 20, 2018 6:41 am
Is there any way to change resolution on the fly ?
Not really.
You aren't allowed to change the port definition when the port is executing, therefore any tunnels will have to be torn down, reconfigured, and re-established. Part of the reason is that you've allocated pixel buffers of a particular size, so unless you only allowed reducing the resolution then you can't fit the images into the buffer.
You can potentially keep the output port of the video_encode component enabled when reconfiguring the input, and you'll just get a new set of header bytes produced with the new configuration (I haven't checked whether the component itself allows you to do that, but IL as an API doesn't prohibit it).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

Re: OpenMax

Wed Jun 20, 2018 9:55 am

I need to change resolution on the fly, I openmax can't do it, is there other Api can do it in raspbeery pi?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenMax

Wed Jun 20, 2018 10:12 am

What's your actual use case? What is your source video stream that you want to resize?
Very few APIs allow for truly dynamic resolution changes, most will require some level of stopping and reconfiguring.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

Re: OpenMax

Wed Jun 20, 2018 10:29 am

6by9 wrote:What's your actual use case? What is your source video stream that you want to resize?
Very few APIs allow for truly dynamic resolution changes, most will require some level of stopping and reconfiguring.
Want to stream video , my source is raspberry pi camera module . Want capture , then encode and send data, but changing resolution on the basis of bandwidth .

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: OpenMax

Wed Jun 20, 2018 1:39 pm

shafayatnabi wrote:
Wed Jun 20, 2018 10:29 am
Want to stream video , my source is raspberry pi camera module . Want capture , then encode and send data, but changing resolution on the basis of bandwidth .
I know of no API that directly allows you to do that. WebRTC will manage it all for you, but I've never looked at how efficient it is on the Pi.
Tearing down the connection, reconfiguring, and reenabling should normally take <100ms, so I'd suggest you investigate that route.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

shafayatnabi
Posts: 9
Joined: Tue Jun 19, 2018 10:35 am

Re: OpenMax

Thu Jun 21, 2018 4:01 am

Thank you :D , I will be in touch

Return to “OpenMAX”

Who is online

Users browsing this forum: No registered users and 5 guests