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