Ultimate Intervalometer - a script for shooting over a long duration - v4.9 - page 42 - Completed and Working Scripts - CHDK Forum

Ultimate Intervalometer - a script for shooting over a long duration - v4.9

  • 651 Replies
  • 244213 Views
*

Offline c_joerg

  • *****
  • 1251
Advertisements
I don't plan on setting up any timelapses longer than 3 hours right now,

For a short time lapse I would recommend this script :
http://chdk.wikia.com/wiki/Lua/Scripts:_Raw_Meter_Intervalometer
It makes the post processing much easier.

I have the dive housing for my S90 but I think it can be prone to fogging up, honestly might work better underwater for timelapses.

One should put the camera in a dry environment in the case. In addition, I lay still silica gel into the case . Otherwise such recordings would not be possible :

http://www.flickr.com/photos/136329431@N06/27964969200/in/album-72157670839719446/
« Last Edit: 24 / August / 2016, 03:33:01 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

From reading the latest posts, and the last update to the Ultimate Intervalometer 4.4 (thank you!), it sounds like it's probably not safe to do.
Where does it say it's not safe?  Or did you mean to say that it is safe to do so?

Sorry, this was regarding deleting files, not installing the latest version of the Ultimate Intervalometer script.  I thought maybe you guys had run into a similar issue, where removing a file off of the camera can cause the camera to be confused and be unpredictable.  Is that the case?  Or is that something that is just related to the Flashair perhaps.  The documentation for the API specifically states that you can really jack stuff up:

  • From https://flashair-developers.com/en/documents/tutorials/advanced/2/

    Quote
    IMPORTANT
    If this operation is used incorrectly, the FlashAir file system will be destroyed and its data may disappear. Host devices, like a PC, can cache the contents of the SD card (FAT), but cannot recognize changes made by this CGI. Therefore, a FAT conflict may occur if changes are made by this CGI and a host device at the same time.
    Remove and re-insert the SD card after using upload.cgi so that host devices can detect any changes.

It seems to be a common issue, where the canon just assumes it has complete control over the card and makes that assumption throughout its operation.  Is issuing lua commands a safer way to remove files?  Do you know if the lua commands are simply performing FAT filesystem operations?  Or do they actually tell the Canon OS to remove a file for them?

I did reformat the card yesterday and have modified my python script to delete files at the end of the day (after the "end" time in the intervalometer script).  I *think* that mitigates the issue, because I can be sure the camera is in playback mode at that point.  I'm not entirely sure of the camera's behavior with regards to file caching, but it appears to be safe-ish to delete older files while the camera is in playback mode.  My script keeps the latest 20 files,  deletes the rest, then waits for the camera to shutdown.  Again I'm not sure how much the camera caches, so I don't want to delete them all.

A few thoughts/questions:
  • Is there a deterministic way for me to see that the camera is actually in playback mode?
  • Is there any sort of lua command that can flush all the caches (similar to Linux's "sync" command)?  Seems like that might help guard against corrupt FS
  • Lastly, do you have any plans to add files other than JPEGs?  Like, could the script attempt to keep a minimum amount of disk space free, and then just delete the oldest "picture" files, regardless of their filename and extension?

Thanks!

Is there a deterministic way for me to see that the camera is actually in playback mode?
get_mode() ?

Quote
Is there any sort of lua command that can flush all the caches (similar to Linux's "sync" command)?  Seems like that might help guard against corrupt FS
AFAIK,  @reyalp is the grandfather of the CHDK  implementation of all the  Lua standard library stuff.  I'll leave this for him to comment on.

Quote
Lastly, do you have any plans to add files other than JPEGs?  Like, could the script attempt to keep a minimum amount of disk space free, and then just delete the oldest "picture" files, regardless of their filename and extension?
It's a script.  It can be recoded to do anything.

Having said that,  I'll look at adding a bit of code to delete the RAW/DNG image that corresponds to any old JPG that is being deleted to save space. It's a bit tricky as "someone" submitted an accepted patch a couple of years ago that allows people to store those images in a few different places. 

Don't forget that the ultimate.lua philosophy is to delete the oldest images from the current run of the script.  Not just random old files on the SD card.  So it tracks image numbers starting with the first image taken in the current script run and deletes the oldest.   If your SD card is full of other stuff .. well then.. too bad?
« Last Edit: 25 / August / 2016, 07:54:49 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Is there a deterministic way for me to see that the camera is actually in playback mode?
get_mode() ?


Awesome, thanks, I'll give that a shot.

Having said that,  I'll look at adding a bit of code to delete the RAW/DNG image that corresponds to any old JPG that is being deleted to save space. It's a bit tricky as "someone" submitted an accepted patch a couple of years ago that allows people to store those images in a few different places. 

Don't forget that the ultimate.lua philosophy is to delete the oldest images from the current run of the script.  Not just random old files on the SD card.  So it tracks image numbers starting with the first image taken in the current script run and deletes the oldest.   If your SD card is full of other stuff .. well then.. too bad?


Lol.

I think I've got a temporary solution in place, to just delete files at the end of the day, while the camera is in playback mode.

Last question -- since this is a remote setup, I'd like to be able to change the settings in the script, without having physical access to the camera.  Can I safely upload a new file CHDK/DATA/ULTIMATE.0 with different settings to the camera?  Or is it only possible to change the settings from the CHDK camera menu?

Thanks again

Last question -- since this is a remote setup, I'd like to be able to change the settings in the script, without having physical access to the camera.  Can I safely upload a new file CHDK/DATA/ULTIMATE.0 with different settings to the camera?  Or is it only possible to change the settings from the CHDK camera menu?
I believe that should work.  Easy enough to test it and see?
Ported :   A1200    SD940   G10    Powershot N    G16

I'm completely new to CHDK. In your notes you say this script uses features of the 1.2.0 version of the CHDK. I assume that if I'm running 1.3 it should contain all of the features of 1.2?
Correct.

Quote
The CHDK I've downloaded is 'ixus870_sd880-101a-1.3.0-4152-full' The "1.3.0" part of the nomenclature I assume is the CHDK version?
Correct.

Quote
If it does not run on 1.3, where can I download 1.2 for my sd880? (I've googled this to no avail).
There are archived builds of the 1.0, 1.1, and 1.2 trees available but you don't need them.

Quote
The reason I want this specific script is that it seems to be ideal for a HAB launch. I've already launched a couple of balloons with GoPros, now I want pictures. The power saving features of this script are key.
Let us know how it goes ?

It's been two years but I'm back for an upgrade to CHDK on the M3.....anyway I noticed this old reply and noticed I never answered with "how it goes" here's one of the pictures....and by the way thanks for help! https://imgur.com/a/FxoIM

I am playing around with this script, just for testing purposes now, it looks very interesting! I left the camera with this script running for about 16 hours yesterday, shooting every 2 minutes. So I was expecting ~500 images on the sd card this morning, however to my surprise there were only 333 on there. Looking at the log, I see the script often does not increment the image counter and just overwrites the previous image... Here is a summary of my log file:
Code: [Select]
Day -- MAY 14 17:18:04:2017 === Ultimate v4.4 : 17:18 ===
Day -- MAY 14 17:18:04:2017 CHDK 1.4.1 ixus50_sd400 101b Apr 26 2017
Day 1 MAY 14 17:18:04:2017  int:120 zoom:nil inf:false minTV:9999 mode:false
Day 1 MAY 14 17:18:04:2017  startHr:9 startMin:0 dawn:true
Day 1 MAY 14 17:18:04:2017  endHr:17 endMin0 dusk:true dow:0
Day 1 MAY 14 17:18:04:2017  lat:532 lon:65 utc:2 toffset-10
Day 1 MAY 14 17:18:04:2017  HDR:0 offset:192 shots:1 delay:0 max:0
Day 1 MAY 14 17:18:04:2017  reboot:3 rebootHr:2 LCD day:1 LCD nit:4 Batt:0
Day 1 MAY 14 17:18:04:2017  DLed:2 NLed:2 ptp:false theme:0 log:3
Day 1 MAY 14 17:18:04:2017  del:0 debug:false
Day 1 MAY 14 17:18:10:2017 start time : 05:03 stop time : 21:56
Day 1 MAY 14 17:19:09:2017 set LCD off
Day 1 MAY 14 17:20:01:2017 Oldest image set to : 100CANON/IMG_0000.JPG
Day 1 MAY 14 17:20:01:2017 V: 4.470 T: 30 IMG_0000.JPG tv: 1/20 f: 2.8 ISO: 71 bv: 348
Day 1 MAY 14 17:22:01:2017 V: 4.464 T: 31 IMG_0000.JPG tv: 1/20 f: 2.8 ISO: 71 bv: 356
Day 1 MAY 14 17:24:01:2017 V: 4.486 T: 32 IMG_0000.JPG tv: 1/30 f: 2.8 ISO: 71 bv: 429
Day 1 MAY 14 17:26:01:2017 V: 4.470 T: 33 IMG_0000.JPG tv: 1/40 f: 2.8 ISO: 71 bv: 465
Day 1 MAY 14 17:28:01:2017 V: 4.480 T: 33 IMG_0000.JPG tv: 1/50 f: 2.8 ISO: 71 bv: 475
  [ ... many more repetitions of IMG_0000.JPG, cut for brevity ... ]
Day 1 MAY 14 21:04:01:2017 V: 4.470 T: 37 IMG_0000.JPG tv: 1/8 f: 2.8 ISO: 109 bv: 142
Day 1 MAY 14 21:06:01:2017 V: 4.480 T: 37 IMG_0000.JPG tv: 1/8 f: 2.8 ISO: 133 bv: 101
Day 1 MAY 14 21:08:01:2017 V: 4.470 T: 37 IMG_0000.JPG tv: 1/8 f: 2.8 ISO: 140 bv: 88
Day 1 MAY 14 21:10:01:2017 V: 4.470 T: 37 IMG_0000.JPG tv: 1/8 f: 2.8 ISO: 141 bv: 86
Day 1 MAY 14 21:12:02:2017 V: 4.464 T: 37 IMG_0001.JPG tv: 1/8 f: 2.8 ISO: 136 bv: 94
Day 1 MAY 14 21:14:01:2017 V: 4.480 T: 37 IMG_0001.JPG tv: 1/8 f: 2.8 ISO: 142 bv: 85
Day 1 MAY 14 21:16:01:2017 V: 4.486 T: 37 IMG_0001.JPG tv: 1/8 f: 2.8 ISO: 166 bv: 53
Day 1 MAY 14 21:18:01:2017 V: 4.486 T: 37 IMG_0001.JPG tv: 1/8 f: 2.8 ISO: 200 bv: 9
Day 1 MAY 14 21:20:01:2017 V: 4.458 T: 37 IMG_0002.JPG tv: 1/8 f: 2.8 ISO: 200 bv: -24
Day 1 MAY 14 21:22:02:2017 V: 4.464 T: 37 IMG_0003.JPG tv: 1/8 f: 2.8 ISO: 200 bv: -62
Day 1 MAY 14 21:24:01:2017 V: 4.458 T: 37 IMG_0004.JPG tv: 1/8 f: 2.8 ISO: 200 bv: -108
  [ ... from here it increments correctly from 4 to 332 for a couple of hours ... ]
Day 2 MAY 15 08:20:01:2017 V: 4.458 T: 36 IMG_0332.JPG tv: 1/8 f: 2.8 ISO: 200 bv: -520
Day 2 MAY 15 08:22:01:2017 V: 4.452 T: 36 IMG_0333.JPG tv: 1/8 f: 2.8 ISO: 200 bv: -545
Day 2 MAY 15 08:24:01:2017 V: 4.476 T: 36 IMG_0333.JPG tv: 1/20 f: 2.8 ISO: 71 bv: 354
  [ ... again repetitions of IMG_0333.JPG cut ... ]
Day 2 MAY 15 09:38:01:2017 V: 4.476 T: 35 IMG_0333.JPG tv: 1/25 f: 2.8 ISO: 71 bv: 398
Day 2 MAY 15 09:40:01:2017 V: 4.492 T: 35 IMG_0333.JPG tv: 1/25 f: 2.8 ISO: 71 bv: 399
Day 2 MAY 15 09:42:01:2017 V: 4.486 T: 35 IMG_0333.JPG tv: 1/25 f: 2.8 ISO: 71 bv: 399
Day 2 MAY 15 09:44:01:2017 V: 4.470 T: 35 IMG_0333.JPG tv: 1/25 f: 2.8 ISO: 71 bv: 399
Day 2 MAY 15 09:45:25:2017 key pressed
Day 2 MAY 15 09:45:25:2017 set LCD on
Day 2 MAY 15 09:45:45:2017 menu key exit

So, for some reason IMG_0000.JPG is repeated a lot, IMG_0001.JPG is repeated 4 times and the last number, IMG_0333.JPG (though the script had no way of knowing it would be the last), is also repeated many times. Is this a bug or have I misinterpreted some option that makes this happen?

thanks!

*

Offline reyalp

  • ******
  • 14126
So I was expecting ~500 images on the sd card this morning, however to my surprise there were only 333 on there. Looking at the log, I see the script often does not increment the image counter and just overwrites the previous image...
This is quite odd, CHDK doesn't intentionally control the image counter at all. It's possible the value reported in the script is wrong due to a bug in the port, but that shouldn't affect the saving of jpeg images. Bugs like this can cause an effect like you suggested with raw images.

An alternative possibility is that the camera failed to shoot for some reason. Some cameras will refuse to shoot in auto modes if auto focus failed, and may fail in other cases. You might be able to distinguish these just by watching the camera with the display turned on while the script runs.
Don't forget what the H stands for.

So I was expecting ~500 images on the sd card this morning, however to my surprise there were only 333 on there. Looking at the log, I see the script often does not increment the image counter and just overwrites the previous image...
This is quite odd, CHDK doesn't intentionally control the image counter at all. It's possible the value reported in the script is wrong due to a bug in the port, but that shouldn't affect the saving of jpeg images. Bugs like this can cause an effect like you suggested with raw images.
What is equally odd is the actual image filenames reported in your log file.  They should match the filenames stored on the SD card but I somehow doubt you have images called IMG_0000.JPG or IMG_0001.JPG or IMG_0332.JPG on the card? (The script gets the numeric part of the filename from the get_exp_count() function).

Code: [Select]
shotstring = string.format('IMG_%04d.JPG',get_exp_count())
Unless you did some kind of hardware reset on your camera just prior to running the script, it seems unlikely the first image number would be set to 0000.

Did the camera store images with files named IMG_0000.JPG to IMG_0332.JPG on your SD card?  Or did they have some other numerical sequence in the file name?

Quote
An alternative possibility is that the camera failed to shoot for some reason. Some cameras will refuse to shoot in auto modes if auto focus failed, and may fail in other cases. You might be able to distinguish these just by watching the camera with the display turned on while the script runs.
The ultimate.lua script, when setup as indicated in your log file, simply uses the shoot() function.  A simple test would be to use the simple interval.lua script included by default with CHDK.  Set the interval to 10 seconds and let it run while watching the screen and counting shots.  When you get to 20 or more shots, halt the script and check how many images are recorded on your SD card.

FWIW, your camera is quite old, even by CHDK standards. It was released in Feb 2005 and the CHDK port was completed back in 2008. I suspect is has not been used much recently.  So it's possible bugs have crept into the port as a result of changes to the core CHDK files over the intervening ten (or so) years.

« Last Edit: 15 / May / 2017, 19:14:56 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Hello,I'm using the ultimate intervalometer script. After a week of time lapse I found that the camera did not vary the exposure Tv, instead all images were at the same exposure (9 images captured at 1/60 for example). I'm planning on looking at the log file to see what I did wrong but in the meantime I was wondering if you have any speculation on what I missed in the settings?


Thank you,
Belal

 

Related Topics


SimplePortal © 2008-2014, SimplePortal