Timelapse with CHDKptp / ptpcam gui - page 2 - Script Writing - CHDK Forum supplierdeeply

Timelapse with CHDKptp / ptpcam gui

  • 28 Replies
  • 7221 Views
*

Online reyalp

  • ******
  • 12111
Re: Timelapse with CHDKptp / ptpcam gui
« Reply #10 on: 11 / October / 2016, 16:29:30 »
Advertisements
Thanks for the tips, they were very useful. It got me somewhere. In fact my script now works and I actually can do a time lapse with it.

There's only one trouble. It doesn't store the files on my pc, it stores the files on camera instead.
What camera are you using? Not all ports support remote shoot with jpeg.

Quote
I read usage.txt and it's almost a rocket science to me.
Feel free to suggest improvements to make it clearer.
Don't forget what the H stands for.

Re: Timelapse with CHDKptp / ptpcam gui
« Reply #11 on: 11 / October / 2016, 16:53:50 »
Thanks for the tips, they were very useful. It got me somewhere. In fact my script now works and I actually can do a time lapse with it.

There's only one trouble. It doesn't store the files on my pc, it stores the files on camera instead.
What camera are you using? Not all ports support remote shoot with jpeg.

I'm using Canon 127 HS. It all works well when i click JPG remote shoot in GUI.

*

Online reyalp

  • ******
  • 12111
Re: Timelapse with CHDKptp / ptpcam gui
« Reply #12 on: 11 / October / 2016, 21:59:41 »
I'm using Canon 127 HS. It all works well when i click JPG remote shoot in GUI.
If it's failing, there may be some error output. Have you tried executing the same command from a command prompt?

On d10,  chdkptp -c -e"rec" -e"rs" works correctly.

I would really expect it to behave the same as the GUI, since the GUI just executes the CLI command. It may be possible that the some delay is required between the initial rec and and rs commands. You could add a -e"exec sys.sleep(500)" between the other -e commands to test this.

Don't forget what the H stands for.

Re: Timelapse with CHDKptp / ptpcam gui
« Reply #13 on: 12 / October / 2016, 12:27:58 »
Hey, what is the command syntax in case my download folder has space in it's name? You know how Windows are, they allow spaces for file names and my download folder is something like:

chdkptp -c -e"rec" -e"rs c:\Users\KasiusKlej\Downloads\Canon PTP"

this space is problematic in this syntax isn't it?


*

Online reyalp

  • ******
  • 12111
Re: Timelapse with CHDKptp / ptpcam gui
« Reply #14 on: 12 / October / 2016, 12:50:11 »
chdkptp -c -e"rec" -e"rs c:\Users\KasiusKlej\Downloads\Canon PTP"
You can use single quotes for chdkptp, like

chdkptp -c -e"rec" -e"rs 'c:\Users\KasiusKlej\Downloads\Canon PTP'"

If you have a lot of commands, you can put them in a file and run them with -e"source path_to_file"

Note that spaces in the name would not cause your problem where the files are saved on the camera.
Don't forget what the H stands for.

Re: Timelapse with CHDKptp / ptpcam gui
« Reply #15 on: 12 / October / 2016, 13:37:24 »
If you have a lot of commands, you can put them in a file and run them with -e"source path_to_file"
I have 172.800 commands, that is for a 2 hour movie. Timelapse movies are usualy shorter, more like 5*60*24=7200 frames. That all fits well in Excel, too.

*

Online reyalp

  • ******
  • 12111
Re: Timelapse with CHDKptp / ptpcam gui
« Reply #16 on: 12 / October / 2016, 16:55:58 »
If you have a lot of commands, you can put them in a file and run them with -e"source path_to_file"
I have 172.800 commands, that is for a 2 hour movie. Timelapse movies are usualy shorter, more like 5*60*24=7200 frames. That all fits well in Excel, too.
What I meant was if you have a lot of commands in a single invocation (e.g. -c -e"rec" -e"rs ...") you can put them all in a file.

You could of course do your entire timelapse in chdkptp without involving excel, but in that case I'd strongly using a loop instead of putting them all in a file.

If you can program vbscript in excel, picking up enough Lua to do this probably wouldn't be that hard, but using the tools you already know is also a perfectly reasonable way to go about it.

Note that if you don't need to do anything else fancy, you can just specify an interval in the rs command, like
rs -shots=7200 -int=2

If you don't want the camera to recalculate exposure and refocus between shots, use -cont= or -quick= instead of -shots.

Don't forget what the H stands for.

Re: Timelapse with CHDKptp / ptpcam gui
« Reply #17 on: 13 / October / 2016, 12:24:48 »
You could of course do your entire timelapse in chdkptp without involving excel, but in that case I'd strongly using a loop instead of putting them all in a file.
One good thing with Excel script is you can change batteries without interrupting the script. Imagine a photographer shooting 4 days and nights outdoors. He'd have to have camera outside tent in a glass jar, and a laptop in this scenario. And a viewfinder. If only he could have this set up with an iPhone instead of laptop.
Quote
If you can program vbscript in excel, picking up enough Lua to do this probably wouldn't be that hard, but using the tools you already know is also a perfectly reasonable way to go about it.
That would be a challenge, learning Lua language. Does that mean that with Lua one could redesign chkptp-732 GUI? Is it open source?

Quote
Note that if you don't need to do anything else fancy, you can just specify an interval in the rs command, like
rs -shots=7200 -int=2
If you don't want the camera to recalculate exposure and refocus between shots, use -cont= or -quick= instead of -shots.

For most time lapse movies, you don't need anything fancy. Except for the first command. Some camera models require that init stage that wakes up camera. The rest of commands are all taking photos. Most time lapse movies are about traveling clouds, night sky, plant growth, they take hours with different exposures.

But if you film indoors, and when it is macro photography, or when you film a fast process under constant light, the scenario might be better if you use like you said, a fancy command
Quote
-c -e"rs -quick=7200 -int=2 'C:\download path'"


*

Online reyalp

  • ******
  • 12111
Re: Timelapse with CHDKptp / ptpcam gui
« Reply #18 on: 13 / October / 2016, 13:41:22 »
One good thing with Excel script is you can change batteries without interrupting the script. Imagine a photographer shooting 4 days and nights outdoors.
I don't quite see how using an excel script enables this compared to other methods.

Unless you need access to the photos as they are shot, I would probably recommend just using a timelapse script on the camera like waterwingz ultimate https://chdk.setepontos.com/index.php?topic=9969.0 or my rawopint https://chdk.setepontos.com/index.php?topic=12697.0 for example. AFAIK ultimate has provisions for occasionally connecting a PC to download photos.

Quote
That would be a challenge, learning Lua language. Does that mean that with Lua one could redesign chkptp-732 GUI? Is it open source?
chdkptp is indeed open source: https://app.assembla.com/spaces/chdkptp/wiki and the GUI is written completely in Lua, using IUP for the GUI framework.

This means that you can modify the GUI just by modifying or adding Lua files, without rebuilding executable. You can also run chdkptp Lua code interactively using the ! command. This lets you modify it on the fly to test or prototype changes. See https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide for some general information.

The GUI code is relatively complicated (as GUIs tend to be...) but it's not clear that your application requires GUI.

Again, if you are happy with Excel + VBScript, that's totally fine. The best tool is often the one you know. I'm only trying to point out additional options in case you or other readers find them useful.
Don't forget what the H stands for.

Re: Timelapse with CHDKptp / ptpcam gui
« Reply #19 on: 14 / October / 2016, 13:09:17 »
The GUI code is relatively complicated (as GUIs tend to be...) but it's not clear that your application requires GUI.
I'd like to make a timelapse movie first, to see how all this options work out, then I was thinking trying stop motion technique and there I was thinking if it could be possible to make myself sort of full screen live preview, but all this Lua framework just looks too difficult for me.

In time lapse, there is one more option I would need in case my interval is to be long. For example when I make 2 photos a day, then my camera is set to save power and it turns off after 3 minutes, but I would want to turn it on again on schedule. Is there any script or command that can turn on the camera?

 

Related Topics