Change Camera Settings Dynamically - Multiplatform


#1

I'm trying to find a good way to alter the camera settings on the fly (focus, white balance, resolution, etc) that will work in multiple platforms (rpi, windows, mac). Currently I am able to change settings, but only when using mjpegstreamer with the control.htm page enabled (requires changes to octopi.txt).

What I would like to do is to detect the streaming server type (yawcam, mjpegstreamer), and to adjust the settings without access to any special pages (control.htm), maybe through a combination of bash/bat scripts, or via some 3rd party library. I also would like this to support multiple cameras if possible, so it would be great if I could provide a list of attached cameras.

Any ideas?

Thanks!


#2

I never checked, but do those webcam servers maybe send a usable Server http header that could be used for detection here? A simple HEAD request should already help in such a case.


#3

I never checked, but do those webcam servers maybe send a usable Server http header that could be used for detection here? A simple HEAD request should already help in such a case.

I just checked, and mjpegstreamer at least does in fact return the following value for server for both snapshots and control.htm access: MJPG-Streamer/0.2

Awesome! Why didn't I think of that :slight_smile:?

Any ideas on how to work around the problem of control.htm access? Is there a way to make it accessible locally by default instead of blocking control.htm? Most users who have asked have been able to edit octopi.txt successfully, but I'm guessing many other users try it and ask no questions when it fails. I could pretty easily detect this issue when requests sent to control.htm return 404 or something similar, and suggest a fix or link to a help file. Additionally, even when control.htm is available, there is still the problem of unauthenticated access, though this could be mitigated if only local access is available.

I've not yet even tried yawcam, so I'll try to configure this and see what I can find.

Thanks for your helpful suggestions!