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

chdkptp - alternative ptp client

  • 1106 Replies
  • 555726 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ptp client
« Reply #830 on: 17 / July / 2015, 17:20:37 »
Advertisements
Is there a way to start the camera and the script
and to copy & delete files from the SD-card without touching the camera,
by using CHDK-PTP?
Starting the camera is not possible.

Use the following procedure you can start and finish a script via chdkptp (This requires a permanent USB connection):

Copy the lremote script from here in the chdkptp dir. Start chdkptp in GUI mode and connect the camera.

Start a script with the following console command:
Code: [Select]
lua require("lremote").exec("A/CHDK/SCRIPTS/test.lua", false)Stop the script with:
Code: [Select]
killscriptAfter the command 'killscript' you can use the chdkptp file browser for your actions.

msl
CHDK-DE:  CHDK-DE links

*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ptp client
« Reply #831 on: 24 / July / 2015, 19:21:28 »
I stumbled into an issue while testing fwt support on the a3400.
Both rs -cont and rs -quick tend to fail shooting the requested number of photos. The first shot always succeeds, the rest mostly does not. Shooting stops, the LCD begins showing regular live view. One can press the shutter manually to shoot the rest of the photos or just wait until the chdkptp side times out. There's no problem with the transferred pictures. It also seems that specifying a long enough interval (such as 5 seconds) lets the rs command finish correctly. All experiments were carried out with jpg only shots.

I have a feeling that the camera side script exits prematurely for some reason. I'm using up-to-date chdkptp.

Question: can somebody reproduce this on a relatively new camera (note: my a3200 is also affected)?

This issue is keeping me currently from committing the a3400 support code.

*

Offline nafraf

  • *****
  • 1308
Re: alternative ptp client
« Reply #832 on: 24 / July / 2015, 20:59:35 »
Question: can somebody reproduce this on a relatively new camera (note: my a3200 is also affected)?
Tested with sx170 and elph160(ixus160) sequences of 10 photos, test run without problems.

*

Offline reyalp

  • ******
  • 14121
Re: alternative ptp client
« Reply #833 on: 24 / July / 2015, 21:01:57 »
Both rs -cont and rs -quick tend to fail shooting the requested number of photos. The first shot always succeeds, the rest mostly does not. Shooting stops, the LCD begins showing regular live view.
FWIW, I was able to do rs cont=5 -jpeg successfully on D10, A540, IXUS140 and SX160.

I'm not completely sure, but it's possible something like what you describe might happen if the USB remote hook wasn't implemented correctly (edit: i.e. wasn't ever called in the shot). The script would be waiting for the hook to be ready, while the camera would just think it was done.
Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ptp client
« Reply #834 on: 25 / July / 2015, 11:19:07 »
Thanks for the test results.
I'm not completely sure, but it's possible something like what you describe might happen if the USB remote hook wasn't implemented correctly (edit: i.e. wasn't ever called in the shot).
Thanks for the hint. The a3400 capt_seq code does mention that the nr and remote hooks are untested, and these hooks are also at a questionable (= conditionally executed) location in the a3200 code.

I think the script shooting hooks could be useful in a script for testing hooking success under various shooting conditions...

*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ptp client
« Reply #835 on: 27 / July / 2015, 13:56:02 »
Re-tested the cameras with reyalp's new script. No failures...
... and then I realised that I had to use a card with plenty free space to run the script, because the cards I normally use in these cams are rather small.
Conclusion: rs -cont and rs -quick can stop prematurely when the JPEG size exceeds the available card space.

*

Offline reyalp

  • ******
  • 14121
Re: alternative ptp client
« Reply #836 on: 27 / July / 2015, 21:52:38 »
Re-tested the cameras with reyalp's new script. No failures...
... and then I realised that I had to use a card with plenty free space to run the script, because the cards I normally use in these cams are rather small.
Conclusion: rs -cont and rs -quick can stop prematurely when the JPEG size exceeds the available card space.
You mean when 1 jpeg exceeds card space, or the camera thinks card space decreases by the jpeg size even though the image isn't actually saved?

On sx160, neither get_free_disk_space() nore the canon display of images remaining changes after shooting many shots with rs.

I'm not surprised if the shooting fails when the free space is close to the size of a single jpeg.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: alternative ptp client
« Reply #837 on: 28 / July / 2015, 20:21:14 »
You mean when 1 jpeg exceeds card space, or the camera thinks card space decreases by the jpeg size even though the image isn't actually saved?
The former, fortunately.


*

Offline cdg

  • **
  • 53
Re: alternative ptp client
« Reply #838 on: 30 / July / 2015, 00:14:45 »
Hi!
Is it possible to add in chdkptp something like "onion skin" for making stop motin movies?
I want to overlay the current live view on a previous frame.
Here's a photo :)
Here's a quick hack that might help. Just replace the existing  lua/gui_live.lua from chdkptp with the attached.

It adds a new sub-tab where the frame rate and debug tabs are called "onion"

The "grab" button makes a copy of whatever is currently displayed.  The grabbed image is blended with the live display, with the amount controlled by the slider. All the way to the left shows only the live image, all the way to the right shows only the grabbed image.

Clear discards the grabbed image completely.
Hi reyalp:
    can we add a new button to run an appointed script ,like a button for
Code: [Select]
!for i,lcon in ipairs(mc.cams) do con=lcon cli:print_status(cli:execute('mdl A/DCIM /some/path -fmatch=%.JPG$')) end
so we just need click the button to get what we want
is that possible??

Re: alternative ptp client
« Reply #839 on: 31 / August / 2015, 09:30:37 »
I used a A2500 for testing. Right now it takes up to 20 seconds to take 6 pictures. I know it depends on the settings, but this camera is just too slow. Processing seems to take ages. I look for a camera which can do faster continuous shots and / or "remoteshoot -quick". Which camera would you suggest?
« Last Edit: 31 / August / 2015, 09:33:05 by ladiko »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal