Can we set the fps to any desired value

Continuing the discussion from How to render the EGL image (from fd) to a frame buffer?:

Hi, I found this post when I was searching for a way to a very simple problem i.e to render frames using opengl, use egl as a consumer and display in gtk window. I found solution for all these requirements in the samples provided in argus_multimedia_api, but I was not able to render them in 60 fps. I tried to find any set_fps block in glcontext, composer and streamconsumer, but couldnt get any. Is there any any to set fps to any fixed values or to 60 frames? Please assist


It depends on the display output and the source. You may check if your TV runs in 60fps mode by running the commands:

00_video_decode$ export DISPLAY=:0
00_video_decode$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis
) 530mm x 300mm
   1920x1080     60.00*+  59.95
   1280x1024     75.03    60.00
   1152x864      75.00
   1024x768      75.03    60.01
   800x600       75.00    60.32
   720x400       70.04
   640x480       75.00    59.94
DP-0 disconnected (normal left inverted right x axis y axis)

And then you can specify framerate in command:

00_video_decode$ ./video_decode H264 -fps 60 ../../data/Video/sample_outdoor_car_1080p_10fps.h264

If your source is a camera, please make sure it runs in 60fps mode.

Hi @DaneLLL

Does this mean, if my camera runs in 60 fps mode it will be shown in 60 fps?

And I have another question. In some of the argus samples like histogram, bayeraveragemap etc, I see them running only for a short duration or few number of frames and show a consumer message saying ‘no more frames’. I looked for to see where it takes the time or number of frame to display or where the producer stops sending frames, but I dont know how. Can you explain how this happens?


If the TV is in 60 fps mode, frambuffers are rendered out in 60 fps. If the source is in 30 fps, frambuffers are updated in 30 fps. So frambuffers are updated, rendered, rendered, updated, rendered, rendered, updated, … The same content in the framebuffer is rendered out twice (repeated).

The samples have default value for duration. Please run with –help to get the options. If you would like to run for a longer duration, please set duration to different value.

Hi @DaneLLL

What if I wanted to run it infinity untill I stop

It is not supported by default samples. Would need to check the sample code and do customization.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.