chdkptp - alternative ptp client - page 24 - General Discussion and Assistance - CHDK Forum

chdkptp - alternative ptp client

  • 1106 Replies
  • 448518 Views
*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #230 on: 20 / August / 2012, 10:04:34 »
Advertisements
Thank you. But I can't find 278 here: https://www.assembla.com/spaces/chdkptp/documents

I see it here https://www.assembla.com/code/chdkptp/subversion/nodes but I don't have the skills to compile.

*

Offline reyalp

  • ******
  • 13844
Re: alternative ptp client
« Reply #231 on: 20 / August / 2012, 16:21:08 »
Thank you. But I can't find 278 here: https://www.assembla.com/spaces/chdkptp/documents

I see it here https://www.assembla.com/code/chdkptp/subversion/nodes but I don't have the skills to compile.
Sorry about that, I had confused you with one of the users who was building their own. The r278 binary is now uploaded to the files area.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13844
Re: alternative ptp client
« Reply #232 on: 27 / August / 2012, 00:07:41 »
Uploaded snapshot r291 to the files area. Main change is addition of a "shoot" command to the cli. You can specify the tv, av and sv on the command line, e.g.
shoot -tv=1/100 -av=8 -sv=80

You can also use APEX or APEX*96 values, use help shoot for details.

The windows build is built with "context plus" support. This makes aspect correct live view images look better, at the expense of slower rendering. To use this, you must put set gui_context_plus=true in a startup file.

Thanks Stick for motivating me to work on some of this.
Don't forget what the H stands for.

*

Offline openuas

  • **
  • 58
  • OpenUAS
    • OpenUAS
Re: alternative ptp client
« Reply #233 on: 27 / August / 2012, 08:08:39 »
Nice, and to motivate you even more , all your hard work is really appreciated.

Is this r291 also in trunk 1.2x pre BTW?


*

Offline reyalp

  • ******
  • 13844
Re: alternative ptp client
« Reply #234 on: 27 / August / 2012, 12:32:59 »
Is this r291 also in trunk 1.2x pre BTW?
I'm not sure what you are asking. chdkptp is compatible with any version of CHDK from 1.0 onward. The "live view" functionality is compatible with 1.1 onward.

It does not yet include the remote capture work that srsa_4c is doing.
Don't forget what the H stands for.

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #235 on: 04 / September / 2012, 16:50:55 »
Yes, a490-100f-1.2.0-2086-full_BETA.zip
Thanks for confirming. In chdkptp svn r278, I've improved the memory usage for multiple downloads. Please try it and let me know if it still gets the error.

I've also added some options to the mdownload command
I just tried chdkptp-r291-win32 with my A490 camera. I ran a test download of 490 images and mdl worked all right (the pretend command is useful btw!)

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #236 on: 15 / September / 2012, 18:20:31 »
I run a script that loops these actions (where ____  and _ _ _  are pid strings for two attached powershot cameras):

C:\chdkptp-r291-win32\chdkptp -n -c"-p=____" -e"luar shoot()"
C:\chdkptp-r291-win32-copy\chdkptp -n -c"-p= _ _ _" -e"luar shoot()"
Wait until all chdkptp processes have closed
Wait 500 ms more

That give roughly simultaneous shots on the two cameras. However I want to if possible decrease the wait time. But if I lower the 500 ms time wait the cameras become unreliable i.e. one of them sometimes skips a shot. Is there something in chdk and/or chdkptp I can do to speed things up or is it simply a hardware limitation with the cameras?

*

Offline reyalp

  • ******
  • 13844
Re: alternative ptp client
« Reply #237 on: 15 / September / 2012, 18:33:29 »
I run a script that loops these actions (where ____  and _ _ _  are pid strings for two attached powershot cameras):

C:\chdkptp-r291-win32\chdkptp -n -c"-p=____" -e"luar shoot()"
C:\chdkptp-r291-win32-copy\chdkptp -n -c"-p= _ _ _" -e"luar shoot()"
Wait until all chdkptp processes have closed
Wait 500 ms more

That give roughly simultaneous shots on the two cameras. However I want to if possible decrease the wait time. But if I lower the 500 ms time wait the cameras become unreliable i.e. one of them sometimes skips a shot. Is there something in chdk and/or chdkptp I can do to speed things up or is it simply a hardware limitation with the cameras?
Starting a new chdkptp process, opening and closing the connection is pretty slow. Just running two copies of chdkptp and feeding them the "shoot" commands with a pipe should be better.

If you are willing to write some lua code, you can also control both cameras from a single chdkptp instance, see multicam.lua for an example.

There are some issues if you try to download too soon after the shoot command, see this post http://chdk.setepontos.com/index.php?topic=8613.msg90669#msg90669 and following for some very long winded discussion ;)

Note that we are working on support for downloading directly over PTP without saving on the camera at all:
http://chdk.setepontos.com/index.php?topic=4338.msg88931#msg88931
This isn't ready for general use yet, and will require additional code for each camera to do jpeg, but should eventually give the best performance.
Don't forget what the H stands for.


*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #238 on: 15 / September / 2012, 18:36:58 »
Just running two copies of chdkptp and feeding them the "shoot" commands with a pipe should be better.
Could you give a sample of what such a command would look like?

edit: To be clear I'm not trying to download images between each shoot. I still need the wait when using the commands in my post above.
« Last Edit: 15 / September / 2012, 18:39:16 by tpont »

*

Offline reyalp

  • ******
  • 13844
Re: alternative ptp client
« Reply #239 on: 15 / September / 2012, 19:48:46 »
Just running two copies of chdkptp and feeding them the "shoot" commands with a pipe should be better.
Could you give a sample of what such a command would look like?
If I understand correctly, you are starting chdkptp from some other process ? Assuming this is correct, you just need to be able to write to stdin on the chdkptp process so you can send lines like "luar shoot()"

How you do this would depend on what the parent process was developed with (C program, .net etc). I can't possibly give you an example without knowing more about it.
Don't forget what the H stands for.

 

Related Topics