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

chdkptp - alternative ptp client

  • 1106 Replies
  • 517695 Views
*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #490 on: 18 / January / 2014, 22:45:32 »
Advertisements
Let me add that I'd happily beta test attempts at such a "synchronized continuous" mode if anyone takes a shot at it.
The "shooting hooks" feature recently added to the trunk should enable this. I'll see if I can put something together.
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.

This is very preliminary. It doesn't do much error checking, and has some hard coded timeouts.

To load the new code use
!require'extras/rsint'.init()
This adds a new cli command call rsint. This takes options similar to the 'rs' command, but instead of shooting right away, it makes the camera wait at the "shutter" hook and gives you a prompt.

entering s shoots, downloads and prompts again when it's done
entering l shoots and exits rshoot mode.

The is no way to quit without shooting the final shot, because at the point the hook is called, the camera is already committed to taking the shot. It would be nice to have a hook after the jpeg is done before the next shot is started, but I'm not sure this is possible given that the jpeg saving can overlap with the next shot in continuous mode.

It doesn't allow you to adjust exposure while between shots, but this could be added.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client (on S100)
« Reply #491 on: 19 / January / 2014, 20:48:17 »
This is what I see with my S100, the image is a bit distorted:
I had a closer look at this, and it appears you are using a quite old build (protocol 2.4 on the camera)

It looks like all the code should be there, so can you try the latest 1.2 build from http://mighty-hoernsche.de/ ?
Don't forget what the H stands for.

Re: alternative ptp client (on S100)
« Reply #492 on: 20 / January / 2014, 05:06:57 »
This is what I see with my S100, the image is a bit distorted:
I had a closer look at this, and it appears you are using a quite old build (protocol 2.4 on the camera)

It looks like all the code should be there, so can you try the latest 1.2 build from http://mighty-hoernsche.de/ ?
Installed s100-101a-1.2.0-3317, all display issues fixed. Thank you so much.

*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #493 on: 20 / January / 2014, 14:51:17 »
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.
Nice, will try it out when I find some more spare time.


*

Offline poussin

  • *
  • 36
  • A2200
Re: alternative ptp client
« Reply #494 on: 20 / January / 2014, 15:52:52 »
Hello
Using A2200 chdk build  1.3.0.3152 and chdkptp build r438, I wanted to store the video directly on the PC.
The way , I found is to dump frames with debug.
Although I am able to play the dump from files , I would like to be able to extract individual frames from the dump file.
Can you advise on this topic ?
Cordially

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #495 on: 20 / January / 2014, 16:47:09 »
Using A2200 chdk build  1.3.0.3152 and chdkptp build r438, I wanted to store the video directly on the PC.
The way , I found is to dump frames with debug.
This doesn't have the same quality as actual video files recorded by the camera. Currently there is no way to record actual camera video over USB.
Quote
Although I am able to play the dump from files , I would like to be able to extract individual frames from the dump file.
I guess you want to convert frames in the dump file to some kind of image format? There is currently not a command do to this, but it is something I would like to add. Most of the pieces are there.

If you explain exactly what you want to do, I may be able to come up with something.

The "screenshot" button saves a ppm image of the current live view display. In theory you could just call this every frame somewhere in redraw_canvas, but the function written in lua and isn't optimized at all so it would be quite slow.

You could also write your own code to read the dump file. The dump is essentially the live view data stream, plus a small header, and a per frame header giving the frame size. The live view stream is described in
https://tools.assembla.com/svn/chdk/trunk/core/live_view.h
In addition to the image data for the viewport and/or bitmap, it also includes information about the dimensions, aspect ratio, and position on the camera screen. These are necessary to display a correct image, and can change at runtime.

The dump header is described in chdku.lua live_dump_start https://tools.assembla.com/svn/chdkptp/trunk/lua/chdku.lua

The functions in liveimg.c https://tools.assembla.com/svn/chdkptp/trunk/liveimg.c are used to convert the camera YUV data to planer RGB. The scaling and positioning of the RGB data is done using CD code in gui_live.lua.
Don't forget what the H stands for.

Re: alternative ptp client
« Reply #496 on: 20 / January / 2014, 16:48:14 »
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 !
Ported :   A1200    SD940   G10    Powershot N    G16

Re: alternative ptp client
« Reply #497 on: 21 / January / 2014, 06:20:01 »
Hi Everyone! Dont know if I'm interrupting with some off the topic question, but I'm having some issues in my camera while using ptp commands.

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). then i'm using command ptpcam --chdk="reboot" to reboot camera. 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. After that, only way to get camera to normal state is remove and insert the battery again. Any guide for solution?

Regards.
Naveed E Sahar


*

Offline poussin

  • *
  • 36
  • A2200
Re: alternative ptp client
« Reply #498 on: 21 / January / 2014, 06:58:22 »
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 !
Ok , I will do it by this week end

*

Offline poussin

  • *
  • 36
  • A2200
Re: alternative ptp client
« Reply #499 on: 22 / January / 2014, 16:22:42 »
Using A2200 chdk build  1.3.0.3152 and chdkptp build r438, I wanted to store the video directly on the PC.
The way , I found is to dump frames with debug.
This doesn't have the same quality as actual video files recorded by the camera. Currently there is no way to record actual camera video over USB.
Quote
Although I am able to play the dump from files , I would like to be able to extract individual frames from the dump file.
I guess you want to convert frames in the dump file to some kind of image format? There is currently not a command do to this, but it is something I would like to add. Most of the pieces are there.

If you explain exactly what you want to do, I may be able to come up with something.

The "screenshot" button saves a ppm image of the current live view display. In theory you could just call this every frame somewhere in redraw_canvas, but the function written in lua and isn't optimized at all so it would be quite slow.

You could also write your own code to read the dump file. The dump is essentially the live view data stream, plus a small header, and a per frame header giving the frame size. The live view stream is described in
https://tools.assembla.com/svn/chdk/trunk/core/live_view.h
In addition to the image data for the viewport and/or bitmap, it also includes information about the dimensions, aspect ratio, and position on the camera screen. These are necessary to display a correct image, and can change at runtime.

The dump header is described in chdku.lua live_dump_start https://tools.assembla.com/svn/chdkptp/trunk/lua/chdku.lua

The functions in liveimg.c https://tools.assembla.com/svn/chdkptp/trunk/liveimg.c are used to convert the camera YUV data to planer RGB. The scaling and positioning of the RGB data is done using CD code in gui_live.lua.
Thanks for your answer and sorry for being late to answer you.

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 )
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.

Tia !

 

Related Topics