Fudgey: VERY odd behaviour!
1) starting over/under exposed
Actually, that's expected: the script does not calculate an ablosute exposure, but rather adjusts from last shot.
It starts with an exposure of 1 second, then adjusts to correct exposure. This should usually happen within 7-8 frames.
I guess an easy change would be to measure the first shot to an absolute exposure (at least in the day I get a reliable reading), so the initial "fade from white/black" could be eliminated.
2) Zoom
I have never tried zoomed timelapses.
I thought the zooming position of the lens wasn't precise enough to achieve a constant factor of zoom.
3) Focus
In the test I did yesterday, with a power adaptor and display on, focus is fine all the time (from 23:20 to 07:29, 740 shots).
see it here:
night time test 16So I don't know whay yours shouldn't be properly focused: at first, I doubted if inserting the AV cable would disable MF but a quick check says it doesn't. Could it be the zoom?
4) sporadic dark frames
Did you have the same problem with the previous (uBasic) version of the script?
Other people had, and the problem was solved by placing some short delays before and after set_sv and set_tv96_direct. There is some bug in CHDK that sometimes make those commands fail, but a pause helps...
You could check the EXIF of the underexposed frames, to see what is wrong, (ISO or shutter)...
Usually the underexposed frames have all the same exposure (or ISO), namely the exposure (or ISO) that was manually set in the camera when you started the script
I would suggest increasing the sleep() values before and after set_sv96 and set_tv_96_direct...
4) Crash
As with the same 491 build your camera crashed and mine didn't, I think there must be some problem in the memory management in your camera (a slight problem in porting the firmware that causes a memory leak???).
These kind of problem are a real hassle, because it could mean you can't have ANY script running for very long time (I mean hours and maybe days)
I will be away for a few days, then I will try to compile in Lua a memory monitor to see where we are losing memory.