Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Focus Adjustment #66

Open
ispybadguys opened this issue Mar 8, 2021 · 3 comments
Open

Manual Focus Adjustment #66

ispybadguys opened this issue Mar 8, 2021 · 3 comments

Comments

@ispybadguys
Copy link

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.

@bjmc
Copy link
Contributor

bjmc commented Mar 8, 2021

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.

@mungewell
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants