CHDK for longtime timelapse - page 5 - General Help and Assistance on using CHDK stable releases - CHDK Forum

CHDK for longtime timelapse

  • 133 Replies
  • 21503 Views
*

Offline c_joerg

  • *****
  • 1248
Re: CHDK for longtime timelapse
« Reply #40 on: 14 / July / 2021, 09:34:44 »
Advertisements
You have to keep in mind that the dolomiti timelapse bot works completely autonomously. I did a quick search, but Canon Digital Photo Professional does not provide any commands for an automated workflow(?) (why would they?).

You're right. An automatic workflow becomes difficult with any RAW converter.

Your link refers mainly to the discussion to remove flickering, not to develop raw files in an automated way.
I don't understand the flicker problem. Is this an older problem that no longer occurs with the newer CHDK firmware?

This case is more an oscillation than flicker. That depends very much on the lighting situation. In a few cases this still occurs.


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

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: CHDK for longtime timelapse
« Reply #41 on: 14 / July / 2021, 11:16:44 »
work in a thunderstorm situation
;) ... With 12sec frames You will catch most nightly bolts, in daylight You´ll need some motion detection controlled interval optimizing.
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14079
Re: CHDK for longtime timelapse
« Reply #42 on: 14 / July / 2021, 14:12:53 »
I moved the discussion here, as the topic is not related to rawopint anymore:
Thanks. I merged over a few of the preceding posts.
Don't forget what the H stands for.

Re: CHDK for longtime timelapse
« Reply #43 on: 16 / July / 2021, 04:38:26 »
I think the logs you posted previously were in single drive mode. Unfortunately, drive mode has to be set through the camera UI, but I believe the setting is remembered for cameras like G1X (very old ones always boot in single shot mode)

I believe the change to continuous mode causes a new problem.
After the timelapse is finished, there is still a script running and this script is preventing me to download the RAWOPINT.CSV for the automatic generation of the plots pdf.

The log on the powershell is like this:
Code: [Select]
connected: Canon PowerShot G1 X, max packet size 512
WARNING: timed out waiting for shot script   
ERROR: true uninit a script is already running
ERROR: error on line 16
It takes exactly 30 seconds after the last photo has been downloaded to the pc until the warning message appears. It seems like a timeout error.

Before. the command on the powershell finished with the last photo downloaded to the pc.

line 16 refers to this line of the chdkptp file:
Code: [Select]
16   rs "D:/sunset/input/" -script=D:/DolomitiTimelapse/sourcecode/rawopint_rs.lua -shots=900 -int=15
17   luar sleep(2000)
18   d A/RAWOPINT.CSV "D:/"

What I then tried is to run a separate script with only the download of the CSV file but this gives me a similar error:
Code: [Select]
connected: Canon PowerShot G1 X, max packet size 512
ERROR: a script is already running
ERROR: error on line 2

this separate script is as follow (I thought to killscript whatever is running but it doesn't seem to work):
Code: [Select]
#Canon G1X download CSV file
luar sleep(2000)
killscript
luar sleep(2000)
d A/RAWOPINT.CSV "D:/"
luar sleep(200)
luar set_lcd_display(0)

I'm still able to connect to the camera and download manually the CSV file.

On the other side the rawopint script starts 2 times a day without any problems.
Maybe I need to wait a little more after the rawopint script for the download of the CSV files?
« Last Edit: 16 / July / 2021, 05:03:50 by dolomiti_timelapse »
If you want to see a sunset or sunrise of Dolomiti Val Gardena shot with CHDK visit
Instagram: dolomiti_timelapse
YouTube: https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw


*

Offline reyalp

  • ******
  • 14079
Re: CHDK for longtime timelapse
« Reply #44 on: 16 / July / 2021, 21:17:12 »
I believe the change to continuous mode causes a new problem.
After the timelapse is finished, there is still a script running and this script is preventing me to download the RAWOPINT.CSV for the automatic generation of the plots pdf.
Yeah, that can be an issue with cont mode, especially when the camera shoots quickly, more common on higher end cams shooting jpeg.

You can try the following modification, below
Code: [Select]
hook_shoot.wait_ready()
logtime('shoot_ready')
if not cont then
release('shoot_full_only')
end
add
Code: [Select]
-- in cont release shoot full as soon as the final shot starts
-- to avoid extra shots and delays
if cont and i == ui_shots then
release('shoot_full')
end
(edited to correct loop counter name)
This will release the shoot_full key as soon as the final shot has started, rather than at the end of the final iteration of the loop.

If that doesn't work, you can also make your download script wait for any running script to finish, instead of doing
Code: [Select]
luar sleep(2000)
which attempts to do a camera side sleep (which itself will fail if a script is running), use wait_status, like
Code: [Select]
exec con:wait_status{run=false,timeout=30000}

Note that if you want to wait for a fixed period in PC side script, you can use exec sys.sleep(milliseconds) instead of luar sleep()
« Last Edit: 17 / July / 2021, 15:01:24 by reyalp »
Don't forget what the H stands for.

Re: CHDK for longtime timelapse
« Reply #45 on: 17 / July / 2021, 05:10:25 »
Thank you! problem solved  8)


You can try the following modification, below
add
Code: [Select]
-- in cont release shoot full as soon as the final shot starts
-- to avoid extra shots and delays
if cont and shot == ui_shots then
release('shoot_full')
end
This didn't work but this did:
Code: [Select]
-- in cont release shoot full as soon as the final shot starts
-- to avoid extra shots and delays
if cont and i == ui_shots then
release('shoot_full')
end
Since the for loop iterates over i (shot would be perhaps a better naming):
Code: [Select]
for i = 1, ui_shots do
Quote
use wait_status, like
Code: [Select]
exec con:wait_status{run=false,timeout=30000}
Note that if you want to wait for a fixed period in PC side script, you can use exec sys.sleep(milliseconds) instead of luar sleep()
Thanks yes this was my intention to wait on pc side, just in case.
Actually I'm not the guy that always ask other guys to help me out with some code issues, but I find it quite difficult to find any documentation regarding chdk related luar code. E.g. I wasn't able to find any documentation on the errors I got, or what exec is and where it comes from: is it luar or chdkptp related :(
Also, without your help, reyalp, I would have never used chdk for this timelapse bot.
« Last Edit: 17 / July / 2021, 05:15:37 by dolomiti_timelapse »
If you want to see a sunset or sunrise of Dolomiti Val Gardena shot with CHDK visit
Instagram: dolomiti_timelapse
YouTube: https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw

*

Offline reyalp

  • ******
  • 14079
Re: CHDK for longtime timelapse
« Reply #46 on: 17 / July / 2021, 15:00:10 »
Since the for loop iterates over i (shot would be perhaps a better naming):
Indeed, I forgot I renamed that in the next version :-[

Quote
Actually I'm not the guy that always ask other guys to help me out with some code issues, but I find it quite difficult to find any documentation regarding chdk related luar code. E.g. I wasn't able to find any documentation on the errors I got, or what exec is and where it comes from: is it luar or chdkptp related :(
luar executes camera side Lua, so https://chdk.fandom.com/wiki/CHDK_Scripting_Cross_Reference_Page is the best place to start for documentation.

exec executes chdkptp side Lua (it's a synonym for "!" which you might see more in examples on the forum). You can find some documentation at https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide and https://app.assembla.com/spaces/chdkptp/wiki/CLI_Quickstart

For the error messages, they could originate from the camera or chdkptp. Errors that originate from the camera side will usually have a line like "user code: <line number>" or "rlib <name>:<line number"

For chdkptp errors, grepping the chdkptp Lua sources is probably the best starting point. Some errors originate from the C code too.

Setting
Code: [Select]
set err_trace=always
will print a stack trace for all errors, which can give you clues where to look.

All that is just in case you want to go digging, chdkptp is not well documented and asking here is absolutely fine :)
Don't forget what the H stands for.

Re: CHDK for longtime timelapse
« Reply #47 on: 27 / August / 2021, 09:51:34 »
I'm happy to announce that my project now has a working YouTube channel.
Finally 4k streaming is available. :lol

(it took quite a long time until YouTube gave me a positiv feedback from their API audit...)
So now my ToDo list is even longer.

https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw
If you want to see a sunset or sunrise of Dolomiti Val Gardena shot with CHDK visit
Instagram: dolomiti_timelapse
YouTube: https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw


*

Offline c_joerg

  • *****
  • 1248
Re: CHDK for longtime timelapse
« Reply #48 on: 28 / August / 2021, 07:19:08 »
Well done ...
What I don't like so much is the dark foreground. You already notice the limitation in the dynamic range. There isn't so much that can be done with JPG. There is also no setting in the G1x for JPG that could be used there.
Maybe I would take more of the sky and less of the foreground. Do you save the data in 4:3 or 16:9? I actually always take 4: 3 because you have the option to change the crop later.
I will definitely stick with it  :)
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

Re: CHDK for longtime timelapse
« Reply #49 on: 28 / August / 2021, 09:24:04 »
Well done ...
What I don't like so much is the dark foreground. You already notice the limitation in the dynamic range. There isn't so much that can be done with JPG. There is also no setting in the G1x for JPG that could be used there.
Maybe I would take more of the sky and less of the foreground. Do you save the data in 4:3 or 16:9? I actually always take 4: 3 because you have the option to change the crop later.
I will definitely stick with it  :)

First of all, I think you are right!  ;)
There are some problems though:
If I point the camera more to the sky, the roof of the house becomes visible :/ That's why next time I will be at home I will definitely do some modifications like finding a better place for the recording...
I would like to shoot more the sky, since the light pollution of the village is quite annoying for my taste. Also pointing the camera more to the sky would give me the possibility to take some night time lapse.
I think I will try the raw workflow one more time, maybe I have more success than last time. The foreground is quite dark, but it is also in reality quite dark as it is in the shadow but pointing the camera more to the sky, I think, would improve the experience.

If you look at this time lapse I found on the web: I think it is not so interesting, because in the time lapse I do the clouds/sky is the most interesting part and in that video it is overexposed.
If you want to see a sunset or sunrise of Dolomiti Val Gardena shot with CHDK visit
Instagram: dolomiti_timelapse
YouTube: https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw

 

Related Topics