droidcam icon indicating copy to clipboard operation
droidcam copied to clipboard

REST api for Camera control

Open rwebber opened this issue 4 years ago • 3 comments

I have DroidCam feeding into an video art piece I am working on. (thank-you!) However, I would like to control the camera (zoom in and out, AutoFocus etc..) via http get calls. I tried a few that I found in the webapp, such as http://IP:4747/cam/1/af or http://IP:4747/cam/1/zoomout I have seen the camera respond once to each, but I can't get it to do some reliably. Is this something that should be possible? If not would you consider making a control REST api?

rwebber avatar Feb 10 '21 22:02 rwebber

The original API is really basic, you need to make those calls while the camera is active. Each call has to use its own connection, eg. curl http://IP:4747/cam/1/zoomout

/cam/1/af
/cam/1/led_toggle
/cam/1/zoomout
/cam/1/zoomin

The new DroidCam OBS app has a better API, if you want to consider looking into it. The remote control web-page is not obfuscated if you pull up it's source.

aramg avatar Feb 11 '21 18:02 aramg

Thanks for the reply, this should be rather helpful. I imagine was running into problems with individual connections. I will double check that each connection closes. Thanks again.

rwebber avatar Feb 12 '21 20:02 rwebber

Adding https://github.com/dev47apps/droidcam/issues/132 here

aramg avatar May 21 '21 18:05 aramg