After i change the value in viewfinder, the camera foucs also changes

Hi, i have pi4 + a lot of 64mp cam
I want to use these two observe insects.
When i use the offical document suggestion
viewfinder-width 2312 --viewfinder-height 1736
It doesnt foucs ( the auto foucs is on)
After i change to width 2700 viewfinder height 1736
Its clear and foucsed (still not the best foucsed)
I cant go higher it will tell me the buffer full, memeory error.

What i shoud do? I used munual foucse py file, but everytime when i take shot, the setting go back to original again.

Help me plz. …


Please try this

If the focus doesn’t work, you can try manual focus first.

i installed these step by step by following the offical document. And it happends like what i said.
Is it ok we meet on online to remote figure out this issue?
I haven spent weeks to figure out these. And i have bought 20 ardu cams.
Non of them foucs but everything i followed the offical documentation.
Please help me.
weixin: tfk12321


As a rule I cannot add a user’s private account. I will do my best to help you within my ability.

Let’s solve the problem that large resolution cannot be used first.

Have you already used this and it still doesn’t work?

Before that, you can refer me to summarize some threads first. There are users who have solved the problem in different ways.

If it still doesn’t work, you can try to use the headless version of the image. According to our test, using the headless version of the image will make the work more stable at the maximum resolution.

Ok, thanks. I love you for helping me.
I set that in the config.txt under pi4 already.
It can shot 64mb image. But i neednto sepecify the height and width otherwise it thots 16mp image. I will try to use autofoucs-mode manual.

I just want better foucs actually since last year a student did very good shot, but he left. And thisnyear my image is always a little bit blurred.

Besides, could you explain what i should do for headless version of image. You mean close the pre-view?

Besides, my code is libcamera-still -viewfinder-width 2312 --viewfinder-height 1736 --width 9152 --height -6944 -o “my file name” --autofoucs-on
If i do not specify viewfinder it shows image buffer memoery allocation error. My pi is 4 and the system is newly installed yesterday.

@Edward i really appreciate it if you can given me some hints thanks a lot.

I saw that , running on the lite version pi
I installed the desktop GUI on the 64 lite version pi. I dont know it counts lite version or nor

@Edward do you know the reason why i change the viewfinder value the image foucs also changes? I really dont get it.
Therotically, viewfinder is just a preview, it doesnt control any parameters of the camera.


The camera and the motor are separated, you can turn off the auto focus, then the focal length value will not change.Have you turned on autofocus.

You can also refer to the troubleshooting we wrote

lite version

Currently, installed 64mp has a issuebsince the newest version doesnt have 64mp.json, but i used your solution to figure out. However, your solution is 64.arm, is there 32?

Don you think 32 is stable than 64???
Can i install desktop GUI on lite version ?


There is no direct evidence which is more stable.

The GUI may take up cma space, making it impossible to save the maximum resolution. You can try it, but if it affects the preservation of the maximum resolution, you should delete the relevant part.

We have uploaded these installation packages, both 32-bit and 64-bit are supported. You can use the script to update the relevant files and try again.

./ -l
./ -p libcamera
./ -p libcamera_apps

@Edward i do appreciate it your help.
Here i have two questions i still donest understand

  1. I tend to use cam-512 for both 16mp and 64mp cameras on pi3 and pi4. (Usually i use pi3+16mp and pi4+64mp), they both sometimes show allocation error (depends on the size of viewfinder).
    The image size are fine 16mp get 16mp img and 64mp get 64mp images.
    Since i set them take images every 1 hour without video output, is there any difference between desktop GUI and lite version??? I mean if i do not plug in HDMI cabel, there should be no difference between desktop and lite version i guess.

  2. viewfinder-width 2312 --viewfinder-height 1736.
    This code Makes both 16mp and 64mp cant focus well, after i lower them, they can focus on my target thing (its a insect trap i want to observe insect). Do you know why? Ita just previous, i really dont get it.

In theory yes. If the current state does not affect your use, you can keep the current state.

It doesn’t make sense. Could you record a video? Record different resolution states in the video.