Access to Capture Profiles

Discussions on extending SharpCap using the built in Python scripting functionality
amister
Posts: 7
Joined: Wed Aug 02, 2023 3:47 pm

Re: Access to Capture Profiles

#11

Post by amister »

I went with the second approach and it worked like a charm. I had to nudge ChatGPT in that direction but once I did it was able to handle the rest. Thanks!
amister
Posts: 7
Joined: Wed Aug 02, 2023 3:47 pm

Re: Access to Capture Profiles

#12

Post by amister »

Hi, We've started to run live captures now, and we've noticed that when our .py script fires off to change the capture profile, it is killing a live capture if we have one running. Is that expected behavior? I've attached logs showing the event.


EDIT: I'm assuming this behavior is expected so I searched and found the following two objects, and put them in my script to 're-start' the capture after changing the capture profile.

SharpCap.SelectedCamera.PrepareToCapture()
SharpCap.SelectedCamera.RunCapture()

Thanks!
Attachments
image.png
image.png (22.41 KiB) Viewed 5466 times
User avatar
admin
Site Admin
Posts: 13349
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Access to Capture Profiles

#13

Post by admin »

Hi,

this is expected for SharpCap 4.0, which restarts the camera every time a profile is loaded, ending any capture.

If you move to SharpCap 4.1, then the restart only happens if necessary (if you change something like binning, capture area, colour space). If loading the profile will only change things like exposure and gain then there should be no restart, meaning the capture continues.

cheers,

Robin
Post Reply