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

chdkptp - alternative ptp client

  • 1106 Replies
  • 517709 Views
*

Offline Pier

  • ***
  • 128
Re: alternative ptp client
« Reply #70 on: 27 / February / 2012, 06:10:46 »
Advertisements
Several Pic's (SX130IS 101c) with reyalp's Live_view soft.
Cam was in 2 video modes 1280/720 and 640/480 - both native using 30 Fps.All test was made with Target Fps 30.On low values going fine.Yelow/orange overlay colors are  black on the Cam's LCD...seems colors are little bit reversed ..??
In Rec mode, record process continued exactly 30 seconds (both Viewfinder + UI Overlaye checked, or only Viewfinder). This is strange why....

Then record stoped, and needs restart with Rec Tab..and so on every 30 seconds.
Screen shots was made during live view recording and some values in statistic changed quickly especialy Frame last ms: 10 to 30
--------------------------------------------------
BTW - 2 Ghz old Processor / 1 GB RAM ... SX130IS  doing well...
« Last Edit: 27 / February / 2012, 06:42:18 by Pier »

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #71 on: 27 / February / 2012, 12:13:36 »
Edge overlay don't work. The dimensions are ok (tested with 4:3 & 16:9), but is it more a solid color area. I can not detect some  contours, evt. some vertical stripes.
Thanks for checking. The aspect ratio settings will affect live view in chdkptp, so maybe one of them works.

Cam was in 2 video modes 1280/720 and 640/480 - both native using 30 Fps.All test was made with Target Fps 30.
You should not expect this to work at 30fps. Note 421kb per frame * 30 fps = 12.6 megabytes per second.

In your second screen shot frame ms + xfer ms = 60. 60ms between frames = 16fps.

(in theory, we should do the rendering and USB transfer in parallel, but that will require some significant reworking...)
Quote
On low values going fine.Yelow/orange overlay colors are  black on the Cam's LCD...seems colors are little bit reversed ..??
As I said before, the palette isn't implemented on most cameras yet (including yours, I can see in the console palette_buffer_size 0), and chdkptp only supports one of the variants. Until this is implemented, the overlay will be wrong.

Quote
Then record stoped, and needs restart with Rec Tab..and so on every 30 seconds.
I'm not sure what you mean. Do you mean you were trying to record a video on the camera ? If so, it's not at all surprising that trying to transfer 30 fps over USB would break things, it puts a lot of load on the camera CPU.

Don't forget what the H stands for.

*

Offline Pier

  • ***
  • 128
Re: alternative ptp client
« Reply #72 on: 27 / February / 2012, 14:15:55 »
@reyalp,
Many Thanks for Answers.
Quote
Do you mean you were trying to record a video on the camera ?
To clarify - when I'v checked Viewfinder and (or not) UI Overlay and then Push Record Tab,
the time before Live view "freeze"..(stop to recording) ..is only 30 seconds.Every time exactly 30 sec.Debug and dump to file not checked.
Same thing and with 5 or 10 Fps.May be the problem is in my Cam ...?
Cam stay connected and another push on Rec tab, Live view continue another 30 seconds.Thats all.
Cam responds to other commands...
Maybe this will help.
chdkptp-r201 and your live_view trunk_1700 - My build .Maybe here I'v made something wrong too.
« Last Edit: 27 / February / 2012, 14:20:47 by Pier »

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #73 on: 27 / February / 2012, 15:28:46 »
To clarify - when I'v checked Viewfinder and (or not) UI Overlay and then Push Record Tab,
I don't understand what you mean by "record tab". There is no tab named "record" in the app, and there are no tabs in the camera UI. The "tabs" are the things labeled "Console" "Files" "Live" in the main window, and "Statistics" "Debug" in the Live tab. There are no other tabs anywhere.

Do you mean the record button on the camera ? Are you  or are you not trying to record a video on the camera ? I wouldn't be at all surprised if transferring live view disrupts the video recording process.
Don't forget what the H stands for.


Re: alternative ptp client
« Reply #74 on: 27 / February / 2012, 15:36:26 »
Think he means the lag between pressing the Record button on the interface and the actual live view stopping to start recording... Someone else mentioned that earlier during testing.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #75 on: 27 / February / 2012, 15:50:34 »
Think he means the lag between pressing the Record button on the interface and the actual live view stopping to start recording... Someone else mentioned that earlier during testing.
The rec button switches the camera to record (shooting) mode. It does not "start recording". Pressing it again when you are already in rec mode might have side effects...

The live view should not (and on my cameras, does not) stop when you switch from play to rec, outside of a brief hiccup in the actual transition.

I'm still completely baffled as to what is being described here.
Don't forget what the H stands for.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: alternative ptp client
« Reply #76 on: 27 / February / 2012, 16:06:26 »
Well that certainly should be faster than my laptop. However, looking at your screenshots, "last xfer ms" is ~250, which is a lot. If xfer time is really 250 ms, then 4 fps is all you can get :/

Can you check the value of xfer ms when target frame rate is below the point where things start to slow down ?

Is there other software that might be trying to talk to the camera ? (desktop integration etc)

In short tests at 4 fps, xfer ms varied between roughly
100 ms and 220 ms with Viewfinder only,
120 ms and 230 ms with VF and UI overlay,
90 ms and 250 ms with UI overlay only (on average seemed to be much less than with vf).

The camera was gphoto2 mounted while I tried this earlier, but unmounting doesn't speed it up, nor does disabling automounting (gconf-editor: /apps/nautilus/preferences/media_automount), nor 'chmod a-rx /usr/lib/gvfs/gvfs-gphoto2-volume-monitor'.

lsusb gives 'bcdUSB 2.00' for this so I suppose it's using USB 2.0.

This was with build r192, but I quickly tried the new r201 with similar results.

Re: alternative ptp client
« Reply #77 on: 27 / February / 2012, 17:25:41 »
In short tests at 4 fps, xfer ms varied between roughly
100 ms and 220 ms with Viewfinder only

by that, do you means transfer of the YUV data or also its conversion to an image ?

You would think transfer time of the data is the same on all cameras that use USB2.0.

Presumably, no tasks can interrupt the USB transfer ?


*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #78 on: 27 / February / 2012, 17:27:30 »
In short tests at 4 fps, xfer ms varied between roughly
100 ms and 220 ms with Viewfinder only,
120 ms and 230 ms with VF and UI overlay,
90 ms and 250 ms with UI overlay only (on average seemed to be much less than with vf).
Thanks, that explains the symptom, but doesn't really explain why...

Do you have something else on usb that would be using a lot of bandwidth ? Ethernet, wifi

Your OS is Ubuntu 10.04 ? If you have windows on the same box, it would be interesting to know what results you get. My windows box transfers a bit faster than my laptop but it's also much faster hardware.
Quote
This was with build r192, but I quickly tried the new r201 with similar results.
Yeah, I wouldn't expect any difference there.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #79 on: 27 / February / 2012, 17:30:37 »
by that, do you means transfer of the YUV data or also its conversion to an image ?
xfer ms only includes the time for the PTP command + related overhead to complete.
Quote
You would think transfer time of the data is the same on all cameras that use USB2.0.
This definitely not the case. My d10 tranfers much faster than a540. But I'd expect a540 and a570 to be roughly equal, and fudgey appears to be getting < 1 mbyte/sec, which is fairly pathetic.
Don't forget what the H stands for.

 

Related Topics