sony_camera_api icon indicating copy to clipboard operation
sony_camera_api copied to clipboard

Manual Focus Adjustment

Open ispybadguys opened this issue 3 years ago • 3 comments

I am wondering if this package can do the manual focus adjustment. I have managed to get this working on the A7R4 with the Sony SDK with the following commands

SDK::CrDeviceProperty prop;
prop.SetCode(SDK::CrDevicePropertyCode::CrDeviceProperty_NearFar);
prop.SetCurrentValue(selected_index);
prop.SetValueType(SDK::CrDataType::CrDataType_Int8);
SDK::SetDeviceProperty(m_device_handle, &prop);

I was wondering if you have this control in this package.

ispybadguys avatar Mar 08 '21 18:03 ispybadguys

This library just helps call whatever APIs the camera itself makes available from Python. There are some files in /doc scraped from various cameras that show what operations they expose, for example

setFocusMode getFocusMode getAvailableFocusMode getSupportedFocusMode

I don't know if any of those would do the trick, but you could give it a try depending on what your camera offers.

bjmc avatar Mar 08 '21 19:03 bjmc

It's been a while since I played with the code/cameras. I think that you may be referring to a different API (ie. over USB), this project uses the 'Sony Remote API' (over WiFi).

A found some discussion here: https://stackoverflow.com/questions/51025623/extend-camera-remote-api-for-adjusting-the-focus

My HX60

trying 'getAvailableFocusMode()':
{'result': ['AF-S', ['AF-S', 'MF']], 'id': 1}

My A5000 (which I brought more recently) appears to support the DirectManualFocus methods.

trying 'getAvailableFocusMode()':
{'result': ['AF-S', ['AF-S', 'AF-C', 'DMF', 'MF']], 'id': 1}

When Auto-tracking the camera will report these locations, and the demo app can show where these are located with markers, using the '--info' parameter: https://github.com/Bloodevil/sony_camera_api/blob/develop/examples/pygameLiveView.py#L207

mungewell avatar Mar 08 '21 20:03 mungewell

WiFi API is defined here: https://developer.sony.com/develop/cameras/#overview-content

mungewell avatar Mar 08 '21 21:03 mungewell