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

chdkptp - alternative ptp client

  • 1097 Replies
  • 388499 Views
*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #500 on: 23 / January / 2014, 01:00:23 »
Advertisements
I want to delete all files in my camera using ptpcam.exe. What i'm doing is first executing the command ptpcam -D (which is used to delete all files in camera).
I will try to answer your question, but this thread is about chdkptp https://www.assembla.com/spaces/chdkptp/wiki not ptpcam.

ptpcam -D uses standard PTP commands, not CHDK extension commands. I haven't tested this or looked at how it works, but sometimes using standard commands change the state of the camera.

You can delete files using the CHDK extension by sending calling os.remove() in lua.

In chdkptp, the rm command does this for you. You could use  rm -skip_topdirs DCIM to delete all image.

Quote
But in case I have more then 1 files (yes only 1) to be deleted, camera hangs and doesn't recognize any command succeeding ptpcam -D.
Does this only happen when you try to reboot, or if you use ptpcam -D by itself?

Reboot can sometimes have problems to. I would suggest making sure the camera is in playback mode and has retracted the lens before you call it. Also, if you delete all images and reboot, the file counter may not be saved, meaning when you take more images they will have the same numbers as ones you took before.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #501 on: 23 / January / 2014, 01:15:04 »
When I move the camera , I need to be able to monitor the video and record it ( on the PC  to overcome the size limitations of the SD card )
Be aware the live dump format is uncompressed, so it will take up a lot of space very quickly. On my d10, the viewport alone is about 250kb per frame, so at 10 fps is over 2 mb/sec.
Quote
When the picture is suitable , I want to record in high resolution preferably using remoteshoot ( to be sure that the image is recorded on the PC disk )
During the replay , I want to be able to pause it and examine a particular frame.
Note: a series of remote shoots takes too long.
I don't see an easy solution with chdkptp as it is now.

If you are a programmer, it wouldn't be too hard to make something that let you play back live dumps with the ability to pause or advance frame by frame.

It would also be possible to make the live view code spit out images in some simple format that another process could turn into video.

There are also screen recording programs like fraps that could let you capture the live view window I suppose.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #502 on: 23 / January / 2014, 16:53:18 »
Based on this previous link:
 
http://chdk.setepontos.com/index.php?topic=6231.msg107903#msg107903

and for those who [like me] don't quite understand the multicam api yet, attached is some proof of concept CLI chdkptp multi-instance code enacted by autoit.

It's a sequential list of very rough code [no functions] and it's far from fast but I hope some may sometime find it useful.

I hope to try a similar single instance "swap con" http://chdk.setepontos.com/index.php?topic=8769.msg91611#msg91611  version, if I ever get a few hours

PS: it works for me with 1 and 2 cams - not with zero. I don't have any hubs yet but suspect it will work  ::) with that complexity. It has zero error handling and you need to edit the code to accomodate your current multi-instance chdkptp install [but why would you have one  :blink:].
« Last Edit: 23 / January / 2014, 17:57:57 by andrew.stephens.754365 »

Re: alternative ptp client
« Reply #503 on: 23 / January / 2014, 18:13:59 »
If you are a programmer, it wouldn't be too hard to make something that let you play back live dumps with the ability to pause or advance frame by frame.
If you don't want to hack into program codes AviSynth may work for you which allows you to create a slideshow with a simple script, provided the live dump filename has a sequence number. If you use it in conjunction with AvsP you have a preview function in the editor which launches a media player and so you can play the image sequence like any other video. Whether it plays in real time, it depends on your CPU and image size.

Just found a link of a small introduction for the above topic. I'm sure it explains better than I did  :-)
http://www.afterdawn.com/guides/archive/avsp-avisynth_made_easy.cfm


*

Offline reyalp

  • ******
  • 13391
Re: alternative ptp client
« Reply #504 on: 23 / January / 2014, 23:30:55 »
If you don't want to hack into program codes AviSynth may work for you which allows you to create a slideshow with a simple script, provided the live dump filename has a sequence number.
I may be misunderstanding, but there is zero chance avisynth will understand the dump format. You might be able to write an avisynth plugin that does.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #505 on: 23 / January / 2014, 23:50:43 »
but there is zero chance avisynth will understand the dump format.
You are right  :-)

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #506 on: 25 / January / 2014, 06:32:25 »
I added some code to do this in chdkptp r479. There are no changes in the C code since the last release, so you can just update the lua files if you want.
I don't find r479 here https://www.assembla.com/spaces/chdkptp/documents , is it available elsewhere?

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: alternative ptp client
« Reply #507 on: 25 / January / 2014, 06:44:08 »
https://www.assembla.com/code/chdkptp/subversion/nodes/481/trunk/lua

There is a link 'Download' on the right side.

msl
CHDK-DE:  CHDK-DE links


*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #508 on: 25 / January / 2014, 10:19:28 »
Ok, got it. Thanks msl.

I replaced the lua subfolder in my  chdkptp-r468-win32 folder with the new one from trunk.
The command
Code: [Select]
!require'extras/rsint'.init()appears to go through (no error message when running it at least). But the command rsint errors like this
Code: [Select]
ERROR: build does not support shoot hook

*

Offline poussin

  • *
  • 36
  • A2200
Re: alternative ptp client
« Reply #509 on: 25 / January / 2014, 13:52:41 »
Hello
Using A2200 chdk build  1.3.0.3152 and chdkptp build r438,
@poussin : if you have some time,  we still need test results for the A2200 manual focus test. 

Instructions and download links are here :  Setting focus from scripts or menus : please run this script and report back

TIA !
After I ran the test ,
I was wondering if it was possible to run the test from chkptp and how to do it.
( including the settings of the camera )

TIA !

 

Related Topics