Speeding up JPEG capture using the Raspberry Pi’s camera module and raspistill


The Raspberry Pi with camera module is nice way of generating image and video data. However, I don’t know if this is a problem for everyone but I was only getting 2fps max out of raspistill in timelapse mode, even with a much smaller interval set. After some investigation, it seemed to be related to shutter delay. There is a way of speeding this up using the code below:

        MMAL_PARAMETER_ZEROSHUTTERLAG_T shutter_config =
            { MMAL_PARAMETER_ZERO_SHUTTER_LAG, sizeof(shutter_config) },
            .zero_shutter_lag_mode = 1,
            .concurrent_capture = 1
        mmal_port_parameter_set(camera->control, &shutter_config.hdr);

Add this code segment into the create_camera_component() function. The result is more like 8fps with my moderately overclocked Pi. Better than 2fps at least!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.