Can I use a PowerShot Canon as a Webcam? - page 2 - Script Writing - CHDK Forum supplierdeeply

Can I use a PowerShot Canon as a Webcam?

  • 38 Replies
  • 1620 Views
*

Offline reyalp

  • ******
  • 12595
Re: Can I use a PowerShot Canon as a Webcam?
« Reply #10 on: 10 / April / 2020, 23:25:23 »
Advertisements
@nubicon  Here's a test build for sx260hs 101a.
It may fix the problem. It will also show a debugging display with a long line of numbers across the screen. Please take screenshots of the debugging display in both still shooting and video mode, and post them here. You can use the screenshot button in chdkptp.
Don't forget what the H stands for.

Re: Can I use a PowerShot Canon as a Webcam?
« Reply #11 on: 11 / April / 2020, 18:51:32 »
You are the best! It works.
Could you explain in a few words what was the problem and what did you do?

*

Offline reyalp

  • ******
  • 12595
Re: Can I use a PowerShot Canon as a Webcam?
« Reply #12 on: 11 / April / 2020, 21:17:30 »
You are the best! It works.
Could you explain in a few words what was the problem and what did you do?
Different cameras use different number of buffers for the live view. This port was configured to use 4, but appears to actually have 8. So chdkptp live view would loop through some stale buffers instead of showing the most recent one, causing the glitching in your video.

Thanks for the screenshot. Unfortunately, I didn't fully turn on the debug display I wanted :-[. If you can try the attached and post screenshots again, that would be helpful.
I would like to have screenshots from still shooting mode (like P or M), Movie mode (the camcorder icon on the dial) not recording, and while a video is recording.

Thanks again for your help.
Don't forget what the H stands for.

Re: Can I use a PowerShot Canon as a Webcam?
« Reply #13 on: 12 / April / 2020, 16:42:32 »
Here you go.
But now there was a flickering in the chdkptp live view (a glimpse of the last recorded photo every one second).


*

Offline reyalp

  • ******
  • 12595
Re: Can I use a PowerShot Canon as a Webcam?
« Reply #14 on: 12 / April / 2020, 19:13:45 »
But now there was a flickering in the chdkptp live view (a glimpse of the last recorded photo every one second).
Thanks. Based on your screenshots, it looks like this camera uses 8 buffers in still mode, and 4 in video mode and while video is recording. The code you were testing assumed 8 everywhere, which might explain the flickering you saw.

I've updated the sx260 port to reflect these results. The changes are in CHDK 1.5 (trunk / unstable) autobuild 5459 and later. Please try that out.
Don't forget what the H stands for.

Re: Can I use a PowerShot Canon as a Webcam?
« Reply #15 on: 13 / April / 2020, 18:49:44 »
In the 1.5.0 build there's flickering in video mode but not in M. However I can work with that.
BTW how can prevent the live view from freezing after a minute? Can I turn the LCD off to save battery power and still get the live view in the chdkptp (and how)?

*

Offline reyalp

  • ******
  • 12595
Re: Can I use a PowerShot Canon as a Webcam?
« Reply #16 on: 13 / April / 2020, 21:49:36 »
In the 1.5.0 build there's flickering in video mode but not in M.
 However I can work with that.
I would like to understand the issue and fix it if possible.
You can make a recording of the live view data using the following command, while the issue is happening:
Code: [Select]
lvdump -count=20 -wait=3
and upload the resulting file. The file will be named something similar to chdk_32c1_20200413_183910.lvdump with different numbers.

Quote
BTW how can prevent the live view from freezing after a minute? Can I turn the LCD off to save battery power and still get the live view in the chdkptp (and how)?
LCD power saving turns off the sensor too. You can use
Code: [Select]
=set_lcd_display(0)
to turn off the LCD only. Use true to 1 it back on. You'll want to set "disable lcd off" in CHDK settings to always, to keep the sensor on.
Note the sensor consumes significant power, so just turning off the LCD display will have less impact than the standard power saving.
Don't forget what the H stands for.

Re: Can I use a PowerShot Canon as a Webcam?
« Reply #17 on: 14 / April / 2020, 10:49:10 »
Here you go.
https://www.sendspace.com/file/g3jafh
I still didn't understand how to prevent the steaming from going to sleep after every minute.A zoom command every minute does the job but is there a better solution?


*

Offline reyalp

  • ******
  • 12595
Re: Can I use a PowerShot Canon as a Webcam?
« Reply #18 on: 14 / April / 2020, 13:09:52 »
Here you go.
https://www.sendspace.com/file/g3jafh
Thanks.
Quote
I still didn't understand how to prevent the steaming from going to sleep after every minute.A zoom command every minute does the job but is there a better solution?
Set "disable lcd off" in CHDK settings to "always"
Don't forget what the H stands for.

Re: Can I use a PowerShot Canon as a Webcam?
« Reply #19 on: 14 / April / 2020, 17:07:43 »
Thanks.
BTW will you remove the debugging info just in the stable version?

 

Related Topics