gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Force EOS M50 to manual focus

Open grelle opened this issue 2 years ago • 7 comments

Trying to force the camera into MF (manual focus) when previous set to AF with the physical button. I'm unable to use the settings autofocusdrive, manualfocusdrive, cancelautofocus to force it into MF. When in --shell mode (interactive mode) I'm able to toggle between AF -> MF by executing this command "set-config autofocusdrive=1" it does not "survive" outside shell though.

Canon EOS M50

gphoto2 2.5.27 clang, popt(m), no exif, no cdk, no aa, jpeg, readline libgphoto2 2.5.27 standard camlibs, clang, ltdl, no EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1, clang, ltdl, no EXIF, USB, serial without locking

To Reproduce Connect the M50 camera to the USB port and execute the following commands with camera set to AF and try to capture an image in low light conditions or cover the lens to prevent it from focusing: gphoto2 --set-config autofocusdrive=1 --capture-image gphoto2 --set-config autofocusdrive=0--capture-image Using gphoto2 --shell: gphoto2 --set-config autofocusdrive=1

Attached debug.log when executing "gphoto2 --set-config autofocusdrive=0 --capture-image" the command fails because of AF reporting no focus (I'm deliberately covering the lens to see if it can capture the image even without focus).

debug.log

I have managed to get it to capture image in dark conditions while set to AF by using eosremoterelease immidiate and so on but it would be crucial to be able to switch from AF to MF and be able to focus manually using manualfocusdrive.

grelle avatar Dec 08 '21 15:12 grelle

autofocusdrive is a singleshot action, not a state.

try to use the eosremoterelease config for direct shutter control and --wait-event-and-download for downloading the ghenerated images

msmeissn avatar Dec 08 '21 15:12 msmeissn

Ok, so there is no possibility to change from AF to MF via remote and Gphoto2 ?

One problem I see in this is, that if I'm not able to set the camera into MF mode remote and instead use the eosremoterelease action I would end upp with the focus being off from time to time right ? Because if the camera is in AF and is having difficulty focus (in dark conditions for example), the focus can be anywhere from near to infinity.

Sure I could use the manualfocusdrive action, but it would make me have to call that action multiple times on each shot to ensure that I have the focus on infinity.

grelle avatar Dec 08 '21 16:12 grelle

e.g. eosremoterelease=Immediate should immediately trigger capture without focusing. (not sure if that works on EOS M without testing)

msmeissn avatar Dec 08 '21 16:12 msmeissn

yes but if camera is in AF mode and dark conditions it will constantly move back and forth to try to focus and if I interupt that with eosremoterelease=Immediate it will capture an image with the wrong focus.

EDIT: After writing this I realise that the focus moving is probably due to continuous AF, that is avoidable ofcourse. Even so it would be nice to 1. be able to switch between AF and MF 2. Read out what mode the camera is in 3. Use the autofocusdrive action as it does not seem to work now ?

grelle avatar Dec 08 '21 16:12 grelle

i am not sure the focus mode can be swirtched from remote, do you see any ioptions on the m50 config tree?

msmeissn avatar Dec 08 '21 17:12 msmeissn

I have tried everything without success.

  • /main/actions/syncdatetimeutc
  • /main/actions/syncdatetime
  • /main/actions/uilock
  • /main/actions/popupflash
  • /main/actions/autofocusdrive
  • /main/actions/manualfocusdrive
  • /main/actions/cancelautofocus
  • /main/actions/eoszoom
  • /main/actions/eoszoomposition
  • /main/actions/viewfinder
  • /main/actions/eosremoterelease
  • /main/actions/eosmoviemode
  • /main/actions/opcode
  • /main/settings/datetimeutc
  • /main/settings/datetime
  • /main/settings/output
  • /main/settings/movierecordtarget
  • /main/settings/evfmode
  • /main/settings/ownername
  • /main/settings/artist
  • /main/settings/copyright
  • /main/settings/nickname
  • /main/settings/focusarea
  • /main/settings/strobofiring
  • /main/settings/flashcharged
  • /main/settings/oneshotrawon
  • /main/settings/autopoweroff
  • /main/settings/depthoffield
  • /main/settings/capturetarget
  • /main/settings/capture
  • /main/settings/remotemode
  • /main/settings/eventmode
  • /main/status/serialnumber
  • /main/status/manufacturer
  • /main/status/cameramodel
  • /main/status/deviceversion
  • /main/status/vendorextension
  • /main/status/model
  • /main/status/Battery Level
  • /main/status/batterylevel
  • /main/status/lensname
  • /main/status/eosserialnumber
  • /main/status/availableshots
  • /main/status/eosmovieswitch
  • /main/imgsettings/imageformat
  • /main/imgsettings/imageformatsd
  • /main/imgsettings/imageformatcf
  • /main/imgsettings/iso
  • /main/imgsettings/whitebalance
  • /main/imgsettings/colortemperature
  • /main/imgsettings/whitebalanceadjusta
  • /main/imgsettings/whitebalanceadjustb
  • /main/imgsettings/whitebalancexa
  • /main/imgsettings/whitebalancexb
  • /main/imgsettings/colorspace
  • /main/capturesettings/zoomspeed
  • /main/capturesettings/exposurecompensation
  • /main/capturesettings/focusmode
  • /main/capturesettings/continuousaf
  • /main/capturesettings/aspectratio
  • /main/capturesettings/storageid
  • /main/capturesettings/highisonr
  • /main/capturesettings/autoexposuremode
  • /main/capturesettings/autoexposuremodedial
  • /main/capturesettings/drivemode
  • /main/capturesettings/picturestyle
  • /main/capturesettings/aperture
  • /main/capturesettings/shutterspeed
  • /main/capturesettings/meteringmode
  • /main/capturesettings/liveviewsize
  • /main/capturesettings/bracketmode
  • /main/capturesettings/aeb
  • /main/capturesettings/alomode
  • /main/other/d402
  • /main/other/d407
  • /main/other/d406
  • /main/other/d303
  • /main/other/5001

grelle avatar Dec 08 '21 17:12 grelle

The setting focusmode is of type RADIO, it's the closest one I can find.

Label: Focus Mode
Readonly: 0 Type: RADIO Current: Manual Choice: 0 Manual END

I'm able to read and change like this: set-config focusmode='Manual'

It does not however seem to have any real effect on the setting.

grelle avatar Dec 08 '21 19:12 grelle