Posts: 5
Joined: Sat Jan 31, 2015 1:13 pm

Change encoder fps

Sun Mar 29, 2015 4:56 pm

Is it possible to have different framerates for camera and encoder components in ports-tunneling mode?

I need to devide an input framereate by a number. Ex. 30 -> 15 / 10 / 6 / 5. So I just want encoder to omit every second or every third frame. If I set encoder outport framerate parameter to such a value, it fails to record after a while.

P.S. I can't change camera's framerate for my task, because of recording another stream with unchanged fps same time (as described here: http://www.raspberrypi.org/forums/viewt ... 70&t=98197).

Posts: 1
Joined: Fri Apr 26, 2019 2:43 pm

Re: Change encoder fps

Fri Apr 26, 2019 2:49 pm

I'm also curious if that's possible. I've tried changing OMX_IndexConfigVideoFramerate encoder param but it seems it only affects SPS timing info. 4ertus2 have you had any luck with framerate conversion?

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

Re: Change encoder fps

Sat Apr 27, 2019 7:51 pm

No, there is no way to get the encoder to only encode every Nth frame. It will always encode every frame that it is presented with.

If you use MMAL then you can achieve the same thing by using MMAL_ENCODING_OPAQUE, bringing the buffers back to your app, and only pass every Nth frame on to the encoder (returning all others to the camera). There is no performance penalty with that, unlike with IL which has no way to expose proprietary communication outside of the GPU.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “OpenMAX”