reuterbal / photobooth

A flexible photobooth software
GNU Affero General Public License v3.0
319 stars 157 forks source link

no autofocus using python gphoto2 camera #214

Open vincent1903 opened 4 years ago

vincent1903 commented 4 years ago

Describe the bug

When using the python2 camera, the focus will be done at the initializing, but not for the next 4 pictures.

Otherwise, it works when I use the gphoto2 command line camera : the focus is done at every triggers but I don't have live preview functionnality

I read that some cameras models needs a configuration file in /photobooth/camera/models/ so I created a file named nikond5600.cfg with the same content that canoneos500d.cfg. I don't know if I've done right because I don't know how this config file work and what to put in

Expected behavior

autofocus between each pictures A clear and concise description of what you expected to happen.

Hardware (please complete the following information)

Software (please complete the following information)

Photobooth log

`2020-03-30 16:38:04,075 - root - INFO - Initializing photobooth
2020-03-30 16:38:04,076 - root - INFO - Photobooth version: 0.5.dev3+g40f1cda
2020-03-30 16:38:04,078 - root - INFO - Reading config file "/home/pi/photobooth/photobooth/defaults.cfg"
2020-03-30 16:38:04,083 - root - INFO - Reading config file "photobooth.cfg"
2020-03-30 16:38:04,102 - root - DEBUG - Context: New state is "WelcomeState"
2020-03-30 16:38:04,115 - root - DEBUG - CameraProcess: Initializing...
2020-03-30 16:38:04,124 - root - DEBUG - WorkerProcess: Initializing...
2020-03-30 16:38:04,126 - root - DEBUG - WorkerProcess: Running...
2020-03-30 16:38:04,132 - root - DEBUG - GpioProcess: Initializing...
2020-03-30 16:38:04,134 - root - DEBUG - GpioProcess: Running...
2020-03-30 16:38:04,134 - root - DEBUG - GuiProcess: Initializing...
2020-03-30 16:38:04,136 - root - INFO - GPIO disabled
2020-03-30 16:38:04,135 - root - INFO - Number of last existing file: 17
2020-03-30 16:38:04,138 - root - INFO - Saving pictures as "2020-03-30/photoboothXXXXX.jpg"
2020-03-30 16:38:04,141 - root - INFO - Number of last existing file: 0
2020-03-30 16:38:04,142 - root - INFO - Saving pictures as "2020-03-30/photobooth_shot_XXXXX.jpg"
2020-03-30 16:38:04,178 - root - DEBUG - CameraProcess: Running...
2020-03-30 16:38:04,485 - root - DEBUG - GuiProcess: Running...
2020-03-30 16:38:04,929 - root - INFO - Using printer ""
2020-03-30 16:38:08,854 - root - DEBUG - Context: Handling event "Teardown(0)"
2020-03-30 16:38:08,856 - root - DEBUG - Context: New state is "TeardownState"
2020-03-30 16:38:08,864 - root - DEBUG - CameraProcess: Exit
2020-03-30 16:38:08,864 - root - DEBUG - WorkerProcess: Exit
2020-03-30 16:38:08,864 - root - DEBUG - GpioProcess: Exit
2020-03-30 16:38:08,881 - root - DEBUG - GuiProcess: Exit
2020-03-30 16:38:08,917 - root - DEBUG - All processes joined, returning code 0
2020-03-30 16:38:08,922 - root - INFO - Exiting photobooth with status code 0
2020-03-30 16:38:13,133 - root - INFO - Initializing photobooth
2020-03-30 16:38:13,134 - root - INFO - Photobooth version: 0.5.dev3+g40f1cda
2020-03-30 16:38:13,136 - root - INFO - Reading config file "/home/pi/photobooth/photobooth/defaults.cfg"
2020-03-30 16:38:13,141 - root - INFO - Reading config file "photobooth.cfg"
2020-03-30 16:38:13,160 - root - DEBUG - Context: New state is "WelcomeState"
2020-03-30 16:38:13,176 - root - DEBUG - CameraProcess: Initializing...
2020-03-30 16:38:13,185 - root - DEBUG - WorkerProcess: Initializing...
2020-03-30 16:38:13,187 - root - DEBUG - WorkerProcess: Running...
2020-03-30 16:38:13,187 - root - DEBUG - GuiProcess: Initializing...
2020-03-30 16:38:13,196 - root - DEBUG - GpioProcess: Initializing...
2020-03-30 16:38:13,198 - root - DEBUG - GpioProcess: Running...
2020-03-30 16:38:13,201 - root - INFO - GPIO disabled
2020-03-30 16:38:13,195 - root - INFO - Number of last existing file: 17
2020-03-30 16:38:13,201 - root - INFO - Saving pictures as "2020-03-30/photoboothXXXXX.jpg"
2020-03-30 16:38:13,205 - root - INFO - Number of last existing file: 0
2020-03-30 16:38:13,206 - root - INFO - Saving pictures as "2020-03-30/photobooth_shot_XXXXX.jpg"
2020-03-30 16:38:13,251 - root - DEBUG - CameraProcess: Running...
2020-03-30 16:38:13,556 - root - DEBUG - GuiProcess: Running...
2020-03-30 16:38:14,035 - root - INFO - Using printer ""
2020-03-30 16:38:16,724 - root - DEBUG - Context: Handling event "start"
2020-03-30 16:38:16,726 - root - DEBUG - Context: New state is "StartupState"
2020-03-30 16:38:16,734 - root - INFO - Using python-gphoto2 bindings
2020-03-30 16:38:17,589 - root - INFO - Camera summary: Manufacturer: Nikon Corporation
Model: D5600
  Version: V1.10
  Serial Number: 00000000000000000000000005519003
Vendor Extension ID: 0xa (1.0)
Vendor Extension Description: Microsoft.com/DeviceServices: 1.0

Capture Formats: JPEG Undefined Type
Display Formats: JPEG, Undefined Type, Association/Directory, TIFF, DPOF, Script, Apple Quicktime

Device Capabilities:
    File Download, File Deletion, File Upload
    Generic Image Capture, No Open Capture, Nikon Capture 1, Nikon Capture 2, Nikon Capture 3

Storage Devices Summary:
store_00010001:
    StorageDescription: None
    VolumeLabel: NIKON D5600 [Slot 1]
    Storage Type: Removable RAM (memory card)
    Filesystemtype: Digital Camera Layout (DCIM)
    Access Capability: Read Only with Object deletion
    Maximum Capability: 31444697088 (29988 MB)
    Free Space (Bytes): 25082068992 (23920 MB)
    Free Space (Images): 4754

Device Property Summary:
Battery Level(0x5001):(read only) (type=0x2) Range [1 - 100, step 1] value: 35% (35)
Image Size(0x5003):(readwrite) (type=0xffff) Enumeration [
    '6000x4000',
    '4496x3000',
    '2992x2000'
    ] value: '4496x3000'
Compression Setting(0x5004):(readwrite) (type=0x2) Enumeration [0,1,2,4,5,6,7] value: JPEG Norm (1)
White Balance(0x5005):(readwrite) (type=0x4) Enumeration [2,4,5,6,7,32784,32785,32787] value: Automatic (2)
F-Number(0x5007):(readwrite) (type=0x4) Enumeration [350,400,450,500,560,630,710,800,900,1000,1100,1300,1400,1600,1800,2000,2200] value: f/3.5 (350)
Focal Length(0x5008):(read only) (type=0x6) Range [1800 - 5500, step 1] value: 18 mm (1800)
Focus Mode(0x500a):(read only) (type=0x4) Enumeration [1,32784,32785,32786,32787] value: AF-A (32786)
Exposure Metering Mode(0x500b):(readwrite) (type=0x4) Enumeration [2,3,4] value: Multi-spot (3)
Flash Mode(0x500c):(readwrite) (type=0x4) Enumeration [4,32784,32785,32786,32787] value: Auto (32784)
Exposure Time(0x500d):(read only) (type=0x6) Enumeration [2,3,4,5,6,8,10,12,15,20,25,31,40,50,62,80,100,125,166,200,250,333,400,500,666,769,1000,1250,1666,2000,2500,3333,4000,5000,6250,7692,10000,13000,16000,20000,25000,30000,40000,50000,60000,80000,100000,130000,150000,200000,250000,300000] value: 0.002 sec (200)
Exposure Program Mode(0x500e):(read only) (type=0x4) Enumeration [1,2,3,4,32784,32790,32792,32793] value: A (3)
Exposure Index (film speed ISO)(0x500f):(readwrite) (type=0x4) Enumeration [100,125,160,200,250,320,400,500,640,800,1000,1250,1600,2000,2500,3200,4000,5000,6400,8000,10000,12800,16000,20000,25600] value: ISO 400 (400)
Exposure Bias Compensation(0x5010):(readwrite) (type=0x3) Enumeration [-5000,-4666,-4333,-4000,-3666,-3333,-3000,-2666,-2333,-2000,-1666,-1333,-1000,-666,-333,0,333,666,1000,1333,1666,2000,2333,2666,3000,3333,3666,4000,4333,4666,5000] value: 0.0 stops (0)
Date & Time(0x5011):(readwrite) (type=0xffff) '20200330T153817'
Still Capture Mode(0x5013):(readwrite) (type=0x4) Enumeration [1,2,32784,32785,32790] value: Power Wind (2)
Burst Number(0x5018):(readwrite) (type=0x4) Range [1 - 100, step 1] value: 1
Focus Metering Mode(0x501c):(readwrite) (type=0x4) Enumeration [2,32784,32785,32786,32787,32788] value: Closest Subject (32785)
Artist(0x501e):(read only) (type=0xffff) ''
Copyright Info(0x501f):(read only) (type=0xffff) ''
Property 0xd303:(read only) (type=0x2) 1
Property 0xd406:(readwrite) (type=0xffff) 'Windows/6.0.5330.0 MTPClassDriver/6.0.5330.0'
Property 0xd407:(read only) (type=0x6) 1
Reset Bank 0(0xd015):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Auto White Balance Bias(0xd017):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Tungsten White Balance Bias(0xd018):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Fluorescent White Balance Bias(0xd019):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Daylight White Balance Bias(0xd01a):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Flash White Balance Bias(0xd01b):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Cloudy White Balance Bias(0xd01c):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
Shady White Balance Bias(0xd01d):(readwrite) (type=0x4) Range [0 - 1224, step 1] value: 612
White Balance Preset Number(0xd01f):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
White Balance Preset Value 0(0xd025):(read only) (type=0x6) 34406758
White Balance Preset Value 1(0xd026):(read only) (type=0x6) 34406758
Color Space(0xd032):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Effect Mode(0xd037):(readwrite) (type=0x2) Range [0 - 11, step 1] value: 11
Reset Menu Bank(0xd045):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
PTP_DPC_NIKON_A1AFCModePriority(0xd048):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 1
Enable Copyright(0xd053):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (1)
Auto ISO(0xd054):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
Exposure Step(0xd056):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 1/3 (0)
Live View AF Area(0xd05d):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 1
Live View AF Focus(0xd061):(readwrite) (type=0x2) Enumeration [0,2,3,4] value: 0
Auto Off Timers(0xd066):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 1
Exposure delay mode(0xd06a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
Long Exposure Noise Reduction(0xd06b):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
File Number Sequencing(0xd06c):(readwrite) (type=0x2) Range [0 - 2, step 1] value: Off (0)
High ISO noise reduction(0xd070):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 2
Artist Name(0xd072):(readwrite) (type=0xffff) ''
Copyright Information(0xd073):(readwrite) (type=0xffff) ''
Bracket Set(0xd078):(readwrite) (type=0x2) Range [0 - 4, step 1] value: AE only (1)
No CF Card Release(0xd08a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
AF Area Point(0xd08d):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
Clean Image Sensor(0xd08f):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 3
Image Comment String(0xd090):(readwrite) (type=0xffff) ''
Image Comment Enable(0xd091):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
Image Rotation(0xd092):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
Property 0xd09c:(read only) (type=0x2) Range [0 - 1, step 1] value: 0
Movie Screen Size(0xd0a0):(readwrite) (type=0x2) Range [0 - 6, step 1] value: 0
Movie Microphone(0xd0a2):(readwrite) (type=0x2) Range [0 - 5, step 1] value: 0
Property 0xd0a4:(read only) (type=0x6) 0
Manual Movie Setting(0xd0a6):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Yes (1)
Movie Quality(0xd0a7):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 1
Property 0xd0a8:(readwrite) (type=0x2) Range [1 - 20, step 1] value: 15
Property 0xd0aa:(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Property 0xd0ab:(read only) (type=0x4) 32894
Property 0xd0b5:(read only) (type=0x6) 400
Bracketing Enable(0xd0c0):(readwrite) (type=0x2) Range [0 - 1, step 1] value: Off (0)
Exposure Bracketing Step(0xd0c1):(read only) (type=0x2) Range [0 - 7, step 1] value: 7
Exposure Bracketing Program(0xd0c2):(read only) (type=0x2) Range [4 - 4, step 1] value: 4
Auto Exposure Bracket Count(0xd0c3):(read only) (type=0x2) Range [1 - 1, step 1] value: 1
White Balance Bracket Step(0xd0c4):(read only) (type=0x2) Range [0 - 2, step 1] value: 0
White Balance Bracket Program(0xd0c5):(read only) (type=0x2) Range [4 - 4, step 1] value: 4
Property 0xd0c6:(read only) (type=0x2) Range [0 - 0, step 1] value: 0
Lens ID(0xd0e0):(read only) (type=0x4) 928
Lens Sort(0xd0e1):(read only) (type=0x2) Range [0 - 1, step 1] value: 1
Lens Type(0xd0e2):(read only) (type=0x8) 1567133696
Min. Focal Length(0xd0e3):(read only) (type=0x6) 18 mm (1800)
Max. Focal Length(0xd0e4):(read only) (type=0x6) 55 mm (5500)
Max. Aperture at Min. Focal Length(0xd0e5):(read only) (type=0x4) f/3.5 (350)
Max. Aperture at Max. Focal Length(0xd0e6):(read only) (type=0x4) f/5.6 (560)
Vignette Control(0xd0f7):(readwrite) (type=0x2) Range [0 - 3, step 1] value: 1
Auto Distortion Control(0xd0f8):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Scene Mode(0xd0f9):(readwrite) (type=0x2) Range [0 - 18, step 1] value: 13
Nikon Exposure Time(0xd100):(read only) (type=0x6) Enumeration [69536,68736,68036,67536,67136,66786,66536,66336,66176,66036,65936,65856,65786,65736,65696,65661,65636,65616,65596,65586,65576,65566,65561,65556,65551,65549,65546,65544,65542,65541,65540,65539,655385,65538,655376,655373,65537,851978,1048586,131073,1638410,196609,262145,327681,393217,524289,655361,851969,983041,1310721,1638401,1966081] value: 65586
AC Power(0xd101):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Warning Status(0xd102):(read only) (type=0x2) 0
AF Locked(0xd104):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
AE Locked(0xd105):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Active AF Sensor(0xd108):(readwrite) (type=0x2) Range [0 - 39, step 1] value: Centre (0)
Flexible Program(0xd109):(readwrite) (type=0x1) Range [-30 - 30, step 2] value: 0
Recording Media(0xd10b):(readwrite) (type=0x2) Range [0 - 2, step 1] value: Card (0)
Camera Orientation(0xd10e):(read only) (type=0x2) Range [0 - 3, step 1] value: 0' (0)
External Flash Attached(0xd120):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
External Flash Status(0xd121):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
External Flash Sort(0xd122):(read only) (type=0x2) Range [0 - 3, step 1] value: 0
External Flash Compensation(0xd124):(read only) (type=0x1) Range [-18 - 18, step 1] value: 0 (0)
External Flash Mode(0xd125):(read only) (type=0x2) Range [0 - 7, step 1] value: 0
Flash Exposure Compensation(0xd126):(readwrite) (type=0x1) Range [-18 - 6, step 2] value: 0.0 stops (0)
Property 0xd12d:(read only) (type=0x2) Range [0 - 1, step 1] value: 0
HDR Mode(0xd130):(readwrite) (type=0x2) Range [0 - 5, step 1] value: 0
Raw Bit Mode(0xd149):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 1
Active D-Lighting(0xd14e):(readwrite) (type=0x2) Range [0 - 5, step 1] value: 0
Flourescent Type(0xd14f):(readwrite) (type=0x2) Range [0 - 6, step 1] value: 3
Autofocus Mode(0xd161):(readwrite) (type=0x2) Range [0 - 4, step 1] value: AF-A (2)
AF Assist Lamp(0xd163):(readwrite) (type=0x2) Range [0 - 1, step 1] value: On (0)
Auto ISO P/A/DVP Setting(0xd164):(readwrite) (type=0x2) Range [0 - 29, step 1] value: 29
Flash Mode(0xd167):(readwrite) (type=0x2) Range [0 - 1, step 1] value: iTTL (0)
ISO Auto(0xd16a):(readwrite) (type=0x2) Range [0 - 1, step 1] value: 1
ISO Auto High Limit(0xd183):(readwrite) (type=0x2) Range [0 - 7, step 1] value: 7
Live View Status(0xd1a2):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Live View Image Zoom Ratio(0xd1a3):(readwrite) (type=0x2) Range [0 - 5, step 1] value: 0
Live View Prohibit Condition(0xd1a4):(read only) (type=0x6) 0
Property 0xd1ac:(readwrite) (type=0x2) Enumeration [1,2] value: 2
Exposure Display Status(0xd1b0):(read only) (type=0x2) Range [0 - 3, step 1] value: No (0)
Exposure Indicate Status(0xd1b1):(read only) (type=0x1) Range [-60 - 60, step 1] value: 0.0 stops (0)
Info Display Error Status(0xd1b2):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Exposure Indicate Lightup(0xd1b3):(read only) (type=0x2) Range [0 - 1, step 1] value: Yes (1)
Property 0xd1b4:(read only) (type=0x2) Range [0 - 100, step 1] value: 28
Property 0xd1b5:(read only) (type=0x4) Enumeration [0,32784,32785,32786,32787,32800] value: 0
Flash Open(0xd1c0):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Flash Charged(0xd1c1):(read only) (type=0x2) Range [0 - 1, step 1] value: No (0)
Property 0xd1f0:(readwrite) (type=0x2) Range [0 - 1, step 1] value: 0
Property 0xd1f1:(read only) (type=0x4) Range [0 - 65535, step 1] value: 4754
Property 0xd1f4:(readwrite) (type=0x1) Range [-2 - 2, step 1] value: 0
Active Pic Ctrl Item(0xd200):(readwrite) (type=0x4) Enumeration [1,2,3,4,5,6,7,201,202,203,204,205,206,207,208,209] value: 1
Change Pic Ctrl Item(0xd201):(read only) (type=0x4) Enumeration [] value: 0

2020-03-30 16:38:17,604 - root - INFO - Loading camera config "d5600.cfg"
2020-03-30 16:38:17,634 - root - INFO - Camera configuration:
Camera Actions [actions]: 
    Bulb Mode [bulb]: 2
    Drive Nikon DSLR Autofocus [autofocusdrive]: 0
    Drive Nikon DSLR Manual focus [manualfocusdrive]: 0.0
    Set Nikon Autofocus area [changeafarea]: 0x0
    Set Nikon Control Mode [controlmode]: 0
    Nikon Viewfinder [viewfinder]: 0
    Movie Capture [movie]: 2
    PTP Opcode [opcode]: 0x1001,0xparam1,0xparam2
Camera Settings [settings]: 
    Camera Date and Time [datetime]: 1585575497
    Image Comment [imagecomment]: 
    Enable Image Comment [imagecommentenable]: Off (On, Off, )
    Recording Media [recordingmedia]: Card (Card, SDRAM, Unknown value 0002, )
    Artist [artist]: 
    Copyright [copyright]: 
    Clean Sensor [cleansensor]: Startup and Shutdown (Off, Startup, Shutdown, Startup and Shutdown, )
    Fast Filesystem [fastfs]: 1
    Capture Target [capturetarget]: Internal RAM (Internal RAM, Memory card, )
    Autofocus [autofocus]: On (On, Off, )
Camera Status Information [status]: 
    Serial Number [serialnumber]: 00000000000000000000000005519003
    Camera Manufacturer [manufacturer]: Nikon Corporation
    Camera Model [cameramodel]: D5600
    Device Version [deviceversion]: V1.10
    Vendor Extension [vendorextension]: Microsoft.com/DeviceServices: 1.0
    AC Power [acpower]: Off (On, Off, )
    External Flash [externalflash]: Off (On, Off, )
    Battery Level [batterylevel]: 35%
    Camera Orientation [orientation]: 0' (0', 270', 90', 180', )
    Flash Open [flashopen]: Off (On, Off, )
    Flash Charged [flashcharged]: Off (On, Off, )
    Focal Length Minimum [minfocallength]: 18 mm
    Focal Length Maximum [maxfocallength]: 55 mm
    Maximum Aperture at Focal Length Minimum [apertureatminfocallength]: 4
    Maximum Aperture at Focal Length Maximum [apertureatmaxfocallength]: 6
    Low Light [lowlight]: 0.0
    Light Meter [lightmeter]: 0.0
    AF Locked [aflocked]: Off (On, Off, )
    AE Locked [aelocked]: Off (On, Off, )
Image Settings [imgsettings]: 
    Image Size [imagesize]: 4496x3000 (6000x4000, 4496x3000, 2992x2000, )
    ISO Speed [iso]: 400 (100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 10000, 12800, 16000, 20000, 25600, )
    ISO Auto [isoauto]: On (On, Off, )
    WhiteBalance [whitebalance]: Automatic (Automatic, Daylight, Fluorescent, Tungsten, Flash, Cloudy, Shade, Preset, )
    Color Space [colorspace]: sRGB (sRGB, AdobeRGB, )
    Auto ISO [autoiso]: Off (On, Off, )
Capture Settings [capturesettings]: 
    Minimum Shutter Speed [minimumshutterspeed]: Unknown value 001d (1/2000, 1/1600, 1/1250, 1/1000, 1/800, 1/640, 1/500, 1/400, 1/320, 1/250, 1/200, 1/160, 1/125, 1/100, 1/80, 1/60, 1/50, 1/40, 1/30, 1/15, 1/8, 1/4, 1/2, 1, Unknown value 0018, Unknown value 0019, Unknown value 001a, Unknown value 001b, Unknown value 001c, Unknown value 001d, )
    ISO Auto Hi Limit [isoautohilimit]: Unknown value 0007 (400, 800, 1600, 3200, Hi 1, Hi 2, Unknown value 0006, Unknown value 0007, )
    Active D-Lighting [dlighting]: Extra high (Extra high, High, Normal, Low, Off, Auto, )
    High ISO Noise Reduction [highisonr]: Normal (Off, Low, Normal, High, )
    Movie Quality [moviequality]: 320x216 (320x216, 640x424, 1280x720, Unknown value 0003, Unknown value 0004, Unknown value 0005, Unknown value 0006, )
    Long Exp Noise Reduction [longexpnr]: Off (On, Off, )
    Assist Light [assistlight]: Off (On, Off, )
    Exposure Compensation [exposurecompensation]: 0 (-5, -4.666, -4.333, -4, -3.666, -3.333, -3, -2.666, -2.333, -2, -1.666, -1.333, -1, -0.666, -0.333, 0, 0.333, 0.666, 1, 1.333, 1.666, 2, 2.333, 2.666, 3, 3.333, 3.666, 4, 4.333, 4.666, 5, )
    Flash Mode [flashmode]: Auto (Red-eye automatic, Auto, Auto Slow Sync, Rear Curtain Sync + Slow Sync, Red-eye Reduction + Slow Sync, )
    Nikon Flash Mode [nikonflashmode]: iTTL (iTTL, Manual, )
    F-Number [f-number]: f/3.5 (f/3.5, f/4, f/4.5, f/5, f/5.6, f/6.3, f/7.1, f/8, f/9, f/10, f/11, f/13, f/14, f/16, f/18, f/20, f/22, )
    Flexible Program [flexibleprogram]: 0.0
    Image Quality [imagequality]: JPEG Normal (JPEG Basic, JPEG Normal, JPEG Fine, NEF (Raw), NEF+Basic, NEF+Normal, NEF+Fine, )
    Focal Length [focallength]: 18.0
    Focus Mode [focusmode]: AF-A (Manual, AF-S, AF-C, AF-A, Unknown value 8013, )
    Focus Mode 2 [focusmode2]: AF-A (AF-S, AF-C, AF-A, MF (fixed), MF (selection), )
    Effect Mode [effectmode]: Unknown value 000b (Night Vision, Color sketch, Miniature effect, Selective color, Silhouette, High key, Low key, Unknown value 0007, Unknown value 0008, Unknown value 0009, Unknown value 000a, Unknown value 000b, )
    Exposure Program [expprogram]: A (M, P, A, S, Auto, Night Landscape, Automatic (No Flash), Unknown value 8019, )
    Scene Mode [scenemode]: Portrait (Night landscape, Party/Indoor, Beach/Snow, Sunset, Dusk/Dawn, Pet Portrait, Candlelight, Blossom, Autumn colors, Food, Unknown value 000a, Unknown value 000b, Unknown value 000c, Portrait, Landscape, Child, Sports, Close up, Night Portrait, )
    HDR Mode [hdrmode]: Off (On, Off, )
    Still Capture Mode [capturemode]: Burst (Single Shot, Burst, Continuous Low Speed, Timer, Quiet Release, )
    Focus Metering Mode [focusmetermode]: Closest Subject (Multi-spot, Single Area, Closest Subject, Group Dynamic, Unknown value 8013, Unknown value 8014, )
    Exposure Metering Mode [exposuremetermode]: Multi Spot (Center Weighted, Multi Spot, Center Spot, )
    Shutter Speed [shutterspeed]: 0.0200s (0.0002s, 0.0003s, 0.0004s, 0.0005s, 0.0006s, 0.0008s, 0.0010s, 0.0012s, 0.0015s, 0.0020s, 0.0025s, 0.0031s, 0.0040s, 0.0050s, 0.0062s, 0.0080s, 0.0100s, 0.0125s, 0.0166s, 0.0200s, 0.0250s, 0.0333s, 0.0400s, 0.0500s, 0.0666s, 0.0769s, 0.1000s, 0.1250s, 0.1666s, 0.2000s, 0.2500s, 0.3333s, 0.4000s, 0.5000s, 0.6250s, 0.7692s, 1.0000s, 1.3000s, 1.6000s, 2.0000s, 2.5000s, 3.0000s, 4.0000s, 5.0000s, 6.0000s, 8.0000s, 10.0000s, 13.0000s, 15.0000s, 20.0000s, 25.0000s, 30.0000s, )
    Shutter Speed 2 [shutterspeed2]: 1/50 (1/4000, 1/3200, 1/2500, 1/2000, 1/1600, 1/1250, 1/1000, 1/800, 1/640, 1/500, 1/400, 1/320, 1/250, 1/200, 1/160, 1/125, 1/100, 1/80, 1/60, 1/50, 1/40, 1/30, 1/25, 1/20, 1/15, 1/13, 1/10, 1/8, 1/6, 1/5, 1/4, 1/3, 10/25, 1/2, 10/16, 10/13, 1, 13/10, 16/10, 2, 25/10, 3, 4, 5, 6, 8, 10, 13, 15, 20, 25, 30, )
    Exposure Delay Mode [exposuredelaymode]: Off (On, Off, )
    Live View AF Mode [liveviewafmode]: Wide-area AF (Face-priority AF, Wide-area AF, Normal-area AF, Subject-tracking AF, )
    Live View AF Focus [liveviewaffocus]: Single-servo AF (Single-servo AF, Full-time-servo AF, Unknown value 0003, Manual Focus, )
    File Number Sequencing [filenrsequencing]: Off (On, Off, )
    Image Rotation Flag [imagerotationflag]: Off (On, Off, )
    Release without CF card [nocfcardrelease]: Off (On, Off, )
    Auto Focus Area [autofocusarea]: Centre (Centre, Top, Bottom, Left, Right, Unknown value 0005, Unknown value 0006, Unknown value 0007, Unknown value 0008, Unknown value 0009, Unknown value 000a, Unknown value 000b, Unknown value 000c, Unknown value 000d, Unknown value 000e, Unknown value 000f, Unknown value 0010, Unknown value 0011, Unknown value 0012, Unknown value 0013, Unknown value 0014, Unknown value 0015, Unknown value 0016, Unknown value 0017, Unknown value 0018, Unknown value 0019, Unknown value 001a, Unknown value 001b, Unknown value 001c, Unknown value 001d, Unknown value 001e, Unknown value 001f, Unknown value 0020, Unknown value 0021, Unknown value 0022, Unknown value 0023, Unknown value 0024, Unknown value 0025, Unknown value 0026, Unknown value 0027, )
    Flash Exposure Compensation [flashexposurecompensation]: 0.0
    Bracketing [bracketing]: Off (On, Off, )
    EV Step [evstep]: 1/3 (1/3, 1/2, )
    Bracket Set [bracketset]: AE only (AE & Flash, AE only, Flash only, WB bracketing, ADL bracketing, )
    Burst Number [burstnumber]: 1.0
    White Balance Bias Preset Nr [whitebiaspresetno]: 0 (0, )
    White Balance Bias Preset 0 [whitebiaspreset0]: 34406758
    White Balance Bias Preset 1 [whitebiaspreset1]: 34406758
    Application Mode [applicationmode]: Application Mode 0 (Application Mode 0, Application Mode 1, )
    Manual Movie Setting [manualmoviesetting]: On (On, Off, )
    Microphone [microphone]: Auto sensitivity (Auto sensitivity, High sensitivity, Medium sensitivity, Low sensitivity, Microphone off, Unknown value 0005, )
    Auto Distortion Control [autodistortioncontrol]: On (On, Off, )
Other PTP Device Properties [other]: 
    Battery Level [5001]: 35 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, )
    Image Size [5003]: 4496x3000 (6000x4000, 4496x3000, 2992x2000, )
    Compression Setting [5004]: 1 (0, 1, 2, 4, 5, 6, 7, )
    White Balance [5005]: 2 (2, 4, 5, 6, 7, 32784, 32785, 32787, )
    F-Number [5007]: 350 (350, 400, 450, 500, 560, 630, 710, 800, 900, 1000, 1100, 1300, 1400, 1600, 1800, 2000, 2200, )
    Focal Length [5008]: 1800.0
    Focus Mode [500a]: 32786 (1, 32784, 32785, 32786, 32787, )
    Exposure Metering Mode [500b]: 3 (2, 3, 4, )
    Flash Mode [500c]: 32784 (4, 32784, 32785, 32786, 32787, )
    Exposure Time [500d]: 200 (2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 25, 31, 40, 50, 62, 80, 100, 125, 166, 200, 250, 333, 400, 500, 666, 769, 1000, 1250, 1666, 2000, 2500, 3333, 4000, 5000, 6250, 7692, 10000, 13000, 16000, 20000, 25000, 30000, 40000, 50000, 60000, 80000, 100000, 130000, 150000, 200000, 250000, 300000, )
    Exposure Program Mode [500e]: 3 (1, 2, 3, 4, 32784, 32790, 32792, 32793, )
    Exposure Index (film speed ISO) [500f]: 400 (100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 10000, 12800, 16000, 20000, 25600, )
    Exposure Bias Compensation [5010]: 0 (-5000, -4666, -4333, -4000, -3666, -3333, -3000, -2666, -2333, -2000, -1666, -1333, -1000, -666, -333, 0, 333, 666, 1000, 1333, 1666, 2000, 2333, 2666, 3000, 3333, 3666, 4000, 4333, 4666, 5000, )
    Date & Time [5011]: 20200330T153817
    Still Capture Mode [5013]: 2 (1, 2, 32784, 32785, 32790, )
    Burst Number [5018]: 1 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, )
    Focus Metering Mode [501c]: 32785 (2, 32784, 32785, 32786, 32787, 32788, )
    Artist [501e]: 
    Copyright Info [501f]:
    PTP Property 0xd303 [d303]: 1
    PTP Property 0xd406 [d406]: Windows/6.0.5330.0 MTPClassDriver/6.0.5330.0
    PTP Property 0xd407 [d407]: 1
    Reset Bank 0 [d015]: 0 (0, 1, )
    Auto White Balance Bias [d017]: 612.0
    Tungsten White Balance Bias [d018]: 612.0
    Fluorescent White Balance Bias [d019]: 612.0
    Daylight White Balance Bias [d01a]: 612.0
    Flash White Balance Bias [d01b]: 612.0
    Cloudy White Balance Bias [d01c]: 612.0
    Shady White Balance Bias [d01d]: 612.0
    White Balance Preset Number [d01f]: 0 (0, 1, )
    White Balance Preset Value 0 [d025]: 34406758
    White Balance Preset Value 1 [d026]: 34406758
    Color Space [d032]: 0 (0, 1, )
    Effect Mode [d037]: 11 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
    Reset Menu Bank [d045]: 0 (0, 1, )
    PTP_DPC_NIKON_A1AFCModePriority [d048]: 1 (0, 1, )
    Enable Copyright [d053]: 1 (0, 1, )
    Auto ISO [d054]: 0 (0, 1, )
    Exposure Step [d056]: 0 (0, 1, )
    Live View AF Area [d05d]: 1 (0, 1, 2, 3, )
    Live View AF Focus [d061]: 0 (0, 2, 3, 4, )
    Auto Off Timers [d066]: 1 (0, 1, 2, 3, )
    Exposure delay mode [d06a]: 0 (0, 1, )
    Long Exposure Noise Reduction [d06b]: 0 (0, 1, )
    File Number Sequencing [d06c]: 0 (0, 1, 2, )
    High ISO noise reduction [d070]: 2 (0, 1, 2, 3, )
    Artist Name [d072]: 
    Copyright Information [d073]: 
    Bracket Set [d078]: 1 (0, 1, 2, 3, 4, )
    No CF Card Release [d08a]: 0 (0, 1, )
    AF Area Point [d08d]: 0 (0, 1, )
    Clean Image Sensor [d08f]: 3 (0, 1, 2, 3, )
    Image Comment String [d090]: 
    Image Comment Enable [d091]: 0 (0, 1, )
    Image Rotation [d092]: 0 (0, 1, )
    PTP Property 0xd09c [d09c]: 0 (0, 1, )
    Movie Screen Size [d0a0]: 0 (0, 1, 2, 3, 4, 5, 6, )
    Movie Microphone [d0a2]: 0 (0, 1, 2, 3, 4, 5, )
    PTP Property 0xd0a4 [d0a4]: 0
    Manual Movie Setting [d0a6]: 1 (0, 1, )
    Movie Quality [d0a7]: 1 (0, 1, )
    PTP Property 0xd0a8 [d0a8]: 15 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
    PTP Property 0xd0aa [d0aa]: 0 (0, 1, )
    PTP Property 0xd0ab [d0ab]: 32894
    PTP Property 0xd0b5 [d0b5]: 400
    Bracketing Enable [d0c0]: 0 (0, 1, )
    Exposure Bracketing Step [d0c1]: 7 (0, 1, 2, 3, 4, 5, 6, 7, )
    Exposure Bracketing Program [d0c2]: 4 (4, )
    Auto Exposure Bracket Count [d0c3]: 1 (1, )
    White Balance Bracket Step [d0c4]: 0 (0, 1, 2, )
    White Balance Bracket Program [d0c5]: 4 (4, )
    PTP Property 0xd0c6 [d0c6]: 0 (0, )
    Lens ID [d0e0]: 928
    Lens Sort [d0e1]: 1 (0, 1, )
    Lens Type [d0e2]: 383
    Min. Focal Length [d0e3]: 1800
    Max. Focal Length [d0e4]: 5500
    Max. Aperture at Min. Focal Length [d0e5]: 350
    Max. Aperture at Max. Focal Length [d0e6]: 560
    Vignette Control [d0f7]: 1 (0, 1, 2, 3, )
    Auto Distortion Control [d0f8]: 0 (0, 1, )
    Scene Mode [d0f9]: 13 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
    Nikon Exposure Time [d100]: 65586 (69536, 68736, 68036, 67536, 67136, 66786, 66536, 66336, 66176, 66036, 65936, 65856, 65786, 65736, 65696, 65661, 65636, 65616, 65596, 65586, 65576, 65566, 65561, 65556, 65551, 65549, 65546, 65544, 65542, 65541, 65540, 65539, 655385, 65538, 655376, 655373, 65537, 851978, 1048586, 131073, 1638410, 196609, 262145, 327681, 393217, 524289, 655361, 851969, 983041, 1310721, 1638401, 1966081, )
    AC Power [d101]: 0 (0, 1, )
    Warning Status [d102]: 0
    AF Locked [d104]: 0 (0, 1, )
    AE Locked [d105]: 0 (0, 1, )
    Active AF Sensor [d108]: 0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, )
    Flexible Program [d109]: 0.0
    Recording Media [d10b]: 0 (0, 1, 2, )
    Camera Orientation [d10e]: 0 (0, 1, 2, 3, )
    External Flash Attached [d120]: 0 (0, 1, )
    External Flash Status [d121]: 0 (0, 1, )
    External Flash Sort [d122]: 0 (0, 1, 2, 3, )
    External Flash Compensation [d124]: 0 (-18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
    External Flash Mode [d125]: 0 (0, 1, 2, 3, 4, 5, 6, 7, )
    Flash Exposure Compensation [d126]: 0.0
    PTP Property 0xd12d [d12d]: 0 (0, 1, )
    HDR Mode [d130]: 0 (0, 1, 2, 3, 4, 5, )
    Raw Bit Mode [d149]: 1 (0, 1, )
    Active D-Lighting [d14e]: 0 (0, 1, 2, 3, 4, 5, )
    Flourescent Type [d14f]: 3 (0, 1, 2, 3, 4, 5, 6, )
    Autofocus Mode [d161]: 2 (0, 1, 2, 3, 4, )
    AF Assist Lamp [d163]: 0 (0, 1, )
    Auto ISO P/A/DVP Setting [d164]: 29 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, )
    Flash Mode [d167]: 0 (0, 1, )
    ISO Auto [d16a]: 1 (0, 1, )
    ISO Auto High Limit [d183]: 7 (0, 1, 2, 3, 4, 5, 6, 7, )
    Live View Status [d1a2]: 0 (0, 1, )
    Live View Image Zoom Ratio [d1a3]: 0 (0, 1, 2, 3, 4, 5, )
    Live View Prohibit Condition [d1a4]: 0
    PTP Property 0xd1ac [d1ac]: 2 (1, 2, )
    Exposure Display Status [d1b0]: 0 (0, 1, 2, 3, )
    Exposure Indicate Status [d1b1]: 0 (-60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, )
    Info Display Error Status [d1b2]: 0 (0, 1, )
    Exposure Indicate Lightup [d1b3]: 1 (0, 1, )
    PTP Property 0xd1b4 [d1b4]: 28 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, )
    PTP Property 0xd1b5 [d1b5]: 0 (0, 32784, 32785, 32786, 32787, 32800, )
    Flash Open [d1c0]: 0 (0, 1, )
    Flash Charged [d1c1]: 0 (0, 1, )
    PTP Property 0xd1f0 [d1f0]: 0 (0, 1, )
    PTP Property 0xd1f1 [d1f1]: 4754.0
    PTP Property 0xd1f4 [d1f4]: 0 (-2, -1, 0, 1, 2, )
    Active Pic Ctrl Item [d200]: 1 (1, 2, 3, 4, 5, 6, 7, 201, 202, 203, 204, 205, 206, 207, 208, 209, )
    Change Pic Ctrl Item [d201]: 0 ()

2020-03-30 16:38:17,641 - root - INFO - Using camera with preview functionality
2020-03-30 16:38:20,427 - root - DEBUG - Assembled picture will contain 4 (2x2) pictures in positions [0, 1, 2, 3]
2020-03-30 16:38:20,508 - root - DEBUG - Context: Handling event "ready"
2020-03-30 16:38:20,509 - root - DEBUG - Context: New state is "IdleState"
2020-03-30 16:38:21,554 - root - DEBUG - Context: Handling event "trigger"
2020-03-30 16:38:21,555 - root - DEBUG - Context: New state is "GreeterState"
2020-03-30 16:38:24,415 - root - DEBUG - Context: Handling event "countdown"
2020-03-30 16:38:24,416 - root - DEBUG - Context: New state is "CountdownState"
2020-03-30 16:38:30,669 - root - DEBUG - Context: Handling event "capture"
2020-03-30 16:38:30,670 - root - DEBUG - Context: New state is "CaptureState"
2020-03-30 16:38:34,312 - root - DEBUG - Context: Handling event "countdown"
2020-03-30 16:38:34,313 - root - DEBUG - Context: New state is "CountdownState"
2020-03-30 16:38:40,152 - root - DEBUG - Context: Handling event "capture"
2020-03-30 16:38:40,153 - root - DEBUG - Context: New state is "CaptureState"
2020-03-30 16:38:43,731 - root - DEBUG - Context: Handling event "countdown"
2020-03-30 16:38:43,732 - root - DEBUG - Context: New state is "CountdownState"
2020-03-30 16:38:49,626 - root - DEBUG - Context: Handling event "capture"
2020-03-30 16:38:49,627 - root - DEBUG - Context: New state is "CaptureState"
2020-03-30 16:38:52,651 - root - DEBUG - Context: Handling event "countdown"
2020-03-30 16:38:52,652 - root - DEBUG - Context: New state is "CountdownState"
2020-03-30 16:38:58,476 - root - DEBUG - Context: Handling event "capture"
2020-03-30 16:38:58,478 - root - DEBUG - Context: New state is "CaptureState"
2020-03-30 16:39:01,840 - root - DEBUG - Context: Handling event "assemble"
2020-03-30 16:39:01,841 - root - DEBUG - Context: New state is "AssembleState"
2020-03-30 16:39:04,190 - root - DEBUG - Context: Handling event "review"
2020-03-30 16:39:04,191 - root - DEBUG - Context: New state is "ReviewState"
2020-03-30 16:39:04,219 - root - INFO - Saving picture as 2020-03-30/photobooth00018.jpg
2020-03-30 16:39:09,415 - root - DEBUG - Context: Handling event "postprocess"
2020-03-30 16:39:09,417 - root - DEBUG - Context: New state is "PostprocessState"
2020-03-30 16:39:20,378 - root - DEBUG - Context: Handling event "idle"
2020-03-30 16:39:20,378 - root - DEBUG - Context: New state is "IdleState"
2020-03-30 16:39:21,798 - root - DEBUG - Context: Handling event "Teardown(2)"
2020-03-30 16:39:21,800 - root - DEBUG - Context: New state is "TeardownState"
2020-03-30 16:39:21,805 - root - DEBUG - Context: Handling event "welcome"
2020-03-30 16:39:21,806 - root - DEBUG - Context: New state is "WelcomeState"
2020-03-30 16:39:25,668 - root - DEBUG - Context: Handling event "Teardown(0)"
2020-03-30 16:39:25,669 - root - DEBUG - Context: New state is "TeardownState"
2020-03-30 16:39:25,674 - root - DEBUG - CameraProcess: Exit
2020-03-30 16:39:25,676 - root - DEBUG - WorkerProcess: Exit
2020-03-30 16:39:25,679 - root - DEBUG - GpioProcess: Exit
2020-03-30 16:39:25,722 - root - DEBUG - GuiProcess: Exit
2020-03-30 16:39:25,779 - root - DEBUG - All processes joined, returning code 0
2020-03-30 16:39:25,781 - root - INFO - Exiting photobooth with status code 0`
vincent1903 commented 4 years ago

I created an other config file called d5600.cfg as specified in the log file, with the following settings :

[Startup]
imagequality = JPEG Fine
autofocus = On

[Shutdown]

[Idle]

[Active]

But it doesn't change anything :(

vincent1903 commented 4 years ago

What I suppose: I think this is related to the Nikon AF system. When using Liveview (what the python gphoto2 camera does and the gphoto2 cli doesn't) you have other parameters impacting the AF system. For example, with Liveview you have these parameters :

gphoto 2 :

Label: Live View AF Mode
Readonly: 0
Type: RADIO
Current: Wide-area AF
Choice: 0 Face-priority AF
Choice: 1 Wide-area AF
Choice: 2 Normal-area AF
Choice: 3 Subject-tracking AF
END

The first initializing picture does'nt use liveview, that's why the focus work, then the liveview starts, and focus mode changes.

But even with the new parameters in the camera config file autofocus is still not activated :(

[Startup]
imagequality = JPEG Fine
autofocus = On
liveviewafmode = Normal-area AF
thebino commented 4 years ago

@vincent1903 I ran into the same issue and created a PR here: https://github.com/reuterbal/photobooth/pull/215

vincent1903 commented 4 years ago

Hello @thebino

thanks for helping me, nevertheless I tried to copy your file but now the photobooth won't start. When starting the photobooth, I see the camera making the focus while I have the "Starting the photobooth" message, and I get an unexpected error :

020-04-06 19:50:03,862 - root - INFO - Using camera with preview functionality
2020-04-06 19:50:03,875 - root - INFO - CameraGphoto2: change autofocusdrive to "1"
2020-04-06 19:50:16,566 - root - ERROR - CameraProcess: Exception "[-1] Unspecified error"
Traceback (most recent call last):
  File "/home/pi/photobooth/photobooth/main.py", line 66, in run
    if cap.run():
  File "/home/pi/photobooth/photobooth/camera/__init__.py", line 94, in run
    self.handleState(state)
  File "/home/pi/photobooth/photobooth/camera/__init__.py", line 101, in handleState
    self.startup()
  File "/home/pi/photobooth/photobooth/camera/__init__.py", line 67, in startup
    test_picture = self._cap.getPicture()
  File "/home/pi/photobooth/photobooth/camera/CameraGphoto2.py", line 144, in getPicture
    file_path = self._cap.capture(gp.GP_CAPTURE_IMAGE)
gphoto2.GPhoto2Error: [-1] Unspecified error
2020-04-06 19:50:16,575 - root - DEBUG - CameraProcess: Running...
2020-04-06 19:50:16,577 - root - DEBUG - Context: Handling event "Camera: [-1] Unspecified error"
2020-04-06 19:50:16,578 - root - DEBUG - Context: New state is "ErrorState"
2020-04-06 19:50:16,581 - root - ERROR - Camera: [-1] Unspecified error
2020-04-06 19:50:19,165 - root - DEBUG - Context: Handling event "abort"
2020-04-06 19:50:19,167 - root - DEBUG - Context: New state is "TeardownState"
2020-04-06 19:50:19,199 - root - DEBUG - Context: Handling event "welcome"
2020-04-06 19:50:19,200 - root - DEBUG - Context: New state is "WelcomeState"
2020-04-06 19:50:20,910 - root - DEBUG - Context: Handling event "Teardown(0)"
2020-04-06 19:50:20,911 - root - DEBUG - Context: New state is "TeardownState"
2020-04-06 19:50:20,916 - root - DEBUG - CameraProcess: Exit
2020-04-06 19:50:20,917 - root - DEBUG - WorkerProcess: Exit
2020-04-06 19:50:20,919 - root - DEBUG - GpioProcess: Exit
2020-04-06 19:50:20,924 - root - DEBUG - GuiProcess: Exit
2020-04-06 19:50:20,967 - root - DEBUG - All processes joined, returning code 0
2020-04-06 19:50:20,973 - root - INFO - Exiting photobooth with status code 0

After that, if I click on retry, it says that it cannot claim the USB device.

I tried to do a gphoto2 --set-config=autofocusdrive=1 and it do the focus without error.

thebino commented 4 years ago

Hi, sorry to hear that. Can you try to change the camera to continuous focus and also adjust the liveviewaffocus You should be able to set the autofocusdrive multiple times without an error.

vincent1903 commented 4 years ago

I change the following settings :

in liveview :

but the issue remain.

I don't know if it is useful or not but there is the gphoto2 commands i used

pi@photobooth1:~/photobooth/photobooth/camera $ gphoto2 --get-config=autofocusdrive
Label: Drive Nikon DSLR Autofocus                                              
Readonly: 0
Type: TOGGLE
Current: 0
END
pi@photobooth1:~/photobooth/photobooth/camera $ gphoto2 --set-config=autofocusdrive=1
pi@photobooth1:~/photobooth/photobooth/camera $ gphoto2 --get-config=autofocusdrive
Label: Drive Nikon DSLR Autofocus                                              
Readonly: 0
Type: TOGGLE
Current: 0
END
pi@photobooth1:~/photobooth/photobooth/camera $ gphoto2 --set-config=autofocusdrive=0
pi@photobooth1:~/photobooth/photobooth/camera $ gphoto2 --get-config=autofocusdrive
Label: Drive Nikon DSLR Autofocus                                              
Readonly: 0
Type: TOGGLE
Current: 0
END
AndPDale commented 3 years ago

@vincent1903 - was this issue resolved? I am having the same issue with my Nikon D90, it will autofocus first but not on each of the 4 photos, but it shows a preview on the count down. However, I have managed to get the camera to autofocus but it will not show a preview on the count down. Please let me know if you have come to a solution. I have looked into using a Picamera for the preview to allow the Nikon to autofocus, but I no one has offered a solution in this repo. If you know different please let me know