How are you determining when cameras complete the operation?
Program blocks until chdkptp writes to stdout, then check if it is the rsint prompt.
That makes sense. If you use set cli_debug=1, you could check when data becomes available by looking for a line like
rc file IMG_4345.jpg 1
The time from when the s was sent and the "file" line will give you an approximation of how long the shooting part took, without needing to modify chdkptp.
Does the camera autocompensate for exposure if I set them manually? mm that could be a problem.
Here is the command I use to enter rsint mode:
rsint /home/pi/images/${serial}/${name} -tv=0.200 -sv=80 -av=11.0 -sd=5m
It shouldn't, though bugs in overrides are possible. If override failed, the exposure wold still be constant for a given rsint invocation, it would just (potentially) vary between separate rsint commands. From your description of the scene, it should be easy to check visually if the exposure is varying between shots or sessions.
For SD override, if the camera is in AF mode, it will autofocus, and the apply the override. This can take variable time, but again only for the initial shot. You can have the camera use MF mode using the -sdmode=MF option.
Just generally for SD override, you should make sure continuous AF and Servo AF are disabled in the Canon options.
One thing that you can try is using continuous mode. To do this, you need to set the drive mode to continuous in the Canon firmware menu, and then use rsint -cont ...
Finally, to end the rsint session, you need to send 'l' for the last shot, because the point where it waits for commands is too late to not shoot.
Continuous mode may be faster overall, and if the slowdown you are seeing is a quirk of the canon firmware, continuous may behave differently.
What canon shooting mode are you using? (M, P, Tv ...)
I also ran the test on a virtual machine (debian bullseye, amd64, kernel v 5.10) using a single camera and saw the same degradation.
Initial shots took between 1.1s and 1.6s, then around the 20th shot it started to take ~2.6s per shot. Surprisingly it wasn't much faster than running the same on 6 cameras, so I'm guessing that bus speed is not a limiting factor here?
That's quite odd. Is the change within a single rsint session? That is, you enter rsint, shoot ~20 shots then it slows down for the following shots? Or if you invoke rsint 5 times and shoot 5 shots each, does it still slow down around the 20th shot?
The camera makes a sound when capturing a shot as similar to the one produced when switching between rec and play mode, and it's roughly proportional to the time it takes for the image capture to complete.
Hm, I'm not sure what this means. I would expect only the shutter sound when shooting with rsint. But I usually keep my cams muted.
For fast shooting, you should make sure the "review" setting is turned off in the canon firmware, though again, this shouldn't vary between rsint invocations.
FWIW, the current stable CHDK is 1.5.1 and most recent chdkptp release is r964. I'm not aware of any changes that would be directly relevant to your problem, although there were some fixes in the PTP and remoteshoot.
I tried compiling it from sources on the vm I mentioned above but couldn't set up the toolchain properly, kept getting arm-gcc-eabi not found errors.
FWIW, if you aren't using a customized build, you can get builds of 1.5 from the autobuild
http://mighty-hoernsche.de/ The 1.6 dev builds are also available
http://mighty-hoernsche.de/trunk/That said, I think it's pretty unlikely that your problem is going to be fixed by switching CHDK builds, so it might be better to stick with what you have for now. Of course, you can always try updating one SD just to see.
If you are using a custom build, it would be good to know how it's been modified.