petabite / libsonyapi

Python binding for the Sony Camera API
https://philipzha.ng/libsonyapi/
MIT License
58 stars 8 forks source link

Control the camera zoom #2

Closed SureshbabuAkash1999 closed 3 years ago

SureshbabuAkash1999 commented 3 years ago

I am building a GUI application for my camera (sonyHx400v) using this library. The problem that I face is that I am not able to control the zoom to a particular value, even though I am able to zoom in and zoom out using 1shot.

petabite commented 3 years ago

Hi,

From looking at the documentation, it doesn't seem that it is possible to zoom to a particular value.

However, a possible solution could be to combine actZoom and Event notification (getEvent) to create a feedback loop of sorts.

image

pg. 54

You could use the zoomPosition value that is returned to figure out how far you are zoomed in. Then keep calling actZoom with the 1shot movement parameter and read zoomPosition again until you reach your desired zoom percentage.

Hope that helps.

SureshbabuAkash1999 commented 3 years ago

Thank you so much for your support.