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

chdkptp - alternative ptp client

  • 1106 Replies
  • 559635 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: chdkptp - alternative ptp client
« Reply #1050 on: 29 / February / 2020, 10:50:07 »
Advertisements
I noticed that the GUI buttons for wheel do not use the wheel related camera side functions, but fixed logical events instead. It was a bit misleading until I peeked into the camera log and found events there I did not send.
I then used the following and it worked.
Code: [Select]
Index: lua/gui.lua
===================================================================
--- lua/gui.lua (revision 829)
+++ lua/gui.lua (working copy)
@@ -366,7 +366,7 @@
  title='wheel l',
  size='45x15',
  action=function(self)
- gui.execquick('post_levent_to_ui("RotateJogDialLeft",1)')
+ gui.execquick('wheel_left()')
  end,
  },
  iup.fill{
@@ -375,7 +375,7 @@
  title='wheel r',
  size='45x15',
  action=function(self)
- gui.execquick('post_levent_to_ui("RotateJogDialRight",1)')
+ gui.execquick('wheel_right()')
  end,
  },
  expand="HORIZONTAL",
The downside of using wheel_left and wheel_right is that some ports do not have the right implementation. On the other hand, there are cameras with wheels that use different levents, or even a sequence of levents. I wonder what could be the best way to deal with this issue.

*

Offline reyalp

  • ******
  • 14125
Re: chdkptp - alternative ptp client
« Reply #1051 on: 29 / February / 2020, 18:42:11 »
I noticed that the GUI buttons for wheel do not use the wheel related camera side functions, but fixed logical events instead. It was a bit misleading until I peeked into the camera log and found events there I did not send.
Thanks for bringing that up. I switched it to use CHDK wheel functions in r929. I don't remember if I had a specific reason for using levents originally.
Quote
The downside of using wheel_left and wheel_right is that some ports do not have the right implementation.
We can fix them if anyone complains.

IIRC, one difference with the events is they work on some cameras without a jogdial. However, it's mostly equivalent to left / right anyway, and people can still use them from the console if they really want.
Don't forget what the H stands for.

Re: chdkptp - alternative ptp client
« Reply #1052 on: 26 / March / 2020, 06:52:36 »
Hi, just discovered the CHDK project and chdkptp and it's phenomenal, really unlocks what Canon in their infinite wisdom have decided to prevent you doing with your camera!

I've been using the live preview feature to get my camera view into OBS and it's been working great except the live preview is definitely not updating at the refresh rate that the Statistics box states, it seems like it's about half of that. Is there some way to get the live preview window in the app itself to run at a higher refresh rate?

edit: Another thought that I had was that you might be able to achieve better quality and framerate at the expense of latency by streaming recorded video onto the host computer as a video file, in a format like mkv that can be read like a buffer. I've tried simply starting to record video and then starting a Pic&Video download but this doesn't seem to work, potentially because the camera is storing the video being recorded seperately then creating the DCIM file once it finishes.
« Last Edit: 26 / March / 2020, 06:55:58 by seagullpat »

*

Offline reyalp

  • ******
  • 14125
Re: chdkptp - alternative ptp client
« Reply #1053 on: 26 / March / 2020, 13:47:33 »
I've been using the live preview feature to get my camera view into OBS and it's been working great except the live preview is definitely not updating at the refresh rate that the Statistics box states, it seems like it's about half of that. Is there some way to get the live preview window in the app itself to run at a higher refresh rate?
The way live view works is the client polls the camera periodically for frame data, set the the "target FPS" control, limited to whatever throughput the client can sustain.

This is not synchronized with the actual refresh rate on the camera, and on CHDK ports without vid_get_viewport_live_fb implemented, only every third frame on the camera will actually be seen. What camera are you using?

In low light, some cameras may also reduce the physical refresh rate.

Quote
edit: Another thought that I had was that you might be able to achieve better quality and framerate at the expense of latency by streaming recorded video onto the host computer as a video file, in a format like mkv that can be read like a buffer.
Yeah, streaming video file data would potentially be good, but would require a bunch of reverse engineering that hasn't been done.

Quote
I've tried simply starting to record video and then starting a Pic&Video download but this doesn't seem to work, potentially because the camera is storing the video being recorded seperately then creating the DCIM file once it finishes.
This definitely won't work. While your computer may present the camera as something like a file system, it actually communicates using PTP, which is much more limited.
Don't forget what the H stands for.

Re: chdkptp - alternative ptp client
« Reply #1054 on: 26 / March / 2020, 16:05:09 »
Thanks very much for responding, my aim at the moment is basically just to get up to maybe 20-30fps to have vaguely smooth video as an alternative to a webcam given that I don't really want to order one atm. The framerate is still noticeably low (I'd judge ~10fps) when the slider is set to 30fps and the reported framerate is at about 20fps, so should I have a go at modifying the PTP live view scripts on the camera itself to change this behaviour?

*

Offline reyalp

  • ******
  • 14125
Re: chdkptp - alternative ptp client
« Reply #1055 on: 26 / March / 2020, 22:28:53 »
The framerate is still noticeably low (I'd judge ~10fps) when the slider is set to 30fps and the reported framerate is at about 20fps, so should I have a go at modifying the PTP live view scripts on the camera itself to change this behaviour?
There's not much to change. If you post which camera you are using, I can check if vid_get_viewport_live_fb is implemented. If it's not, it can probably be added.

Also, what OS and version of chdkptp are you using?
Don't forget what the H stands for.

Re: chdkptp - alternative ptp client
« Reply #1056 on: 27 / March / 2020, 10:09:16 »
Using a G15 PowerShot with firmware 100e, with CHDK 1.4.1 r5414, and I'm on Windows 10

*

Offline reyalp

  • ******
  • 14125
Re: chdkptp - alternative ptp client
« Reply #1057 on: 27 / March / 2020, 13:35:25 »
Using a G15 PowerShot with firmware 100e, with CHDK 1.4.1 r5414, and I'm on Windows 10
Thanks. Looks like vid_get_viewport_live_fb is not correctly implemented on this port, so you are only seeing every 3rd frame at most, likely resulting in 10 FPS as you suspected. I should be able to post a test build in the next few days, unless someone beats me to it.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: chdkptp - alternative ptp client
« Reply #1058 on: 28 / March / 2020, 23:37:17 »
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 946
  • A590IS 101b
    • Planetary astrophotography
Re: chdkptp - alternative ptp client
« Reply #1059 on: 30 / June / 2020, 07:02:46 »
The last few days I've been playing with Ubuntu 20.04 under VM and chdkptp works pretty well, both versions, CLI and GUI.
In the latest distribution libreadline.so.6 has been upgraded to libreadline.so.8, this solves the problem:
Code: [Select]
cd / lib / x86_64-linux-gnu /
sudo ln -s libreadline.so.8.0 libreadline.so.6
sudo ln -s libhistory.so.8.0 libhistory.so.6
I have no clue about working on Linux, the last time I worked on a Unix / Linux system was in the early 90s, maybe there is a better solution but I only remembered this. :D
The problem with gpphoto still exists but this solution works well: https://app.assembla.com/spaces/chdkptp/wiki/Install
Maybe this will help someone even bigger novice than me.
The next step is compiling under Linux. :P

 

Related Topics


SimplePortal © 2008-2014, SimplePortal