@@ -11,7 +11,7 @@ capture-rate=10
capture-fmt=BGGR8
preview-width=1280
preview-height=720
-preview-rate=60
+preview-rate=30
preview-fmt=BGGR8
rotate=270
colormatrix=1.384,-0.3203,-0.0124,-0.2728,1.049,0.1556,-0.0506,0.2577,0.8050
mirrored=false
@@ -185,6 +185,12 @@ setup_camera(MPDeviceList **device_list, const struct mp_camera_config *config)
info->camera = mp_camera_new(dev_info->video_fd, info->fd);
+ // Start with the capture format, this works around a bug with
+ // the ov5640 driver where it won't allow setting the preview
+ // format initially.
+ MPCameraMode mode = config->capture_mode;
+ mp_camera_set_mode(info->camera, &mode);
+
// Trigger continuous auto focus if the sensor supports it
if (mp_camera_query_control(info->camera, V4L2_CID_FOCUS_AUTO,
NULL)) {