Live view on Canon EOS M50

Antonio Cuni <[email protected]> Sat, 16 May 2020 17:27:10 +0200
Newsgroups gmane.comp.multimedia.gphoto.user
Message-ID <CAHPg78w5gXnawZmZBt=o6PRaGYWpNUkqHiKpRrgYR=63ZdwOAw@mail.gmail.com>
Hello,
I am having some troubles to control my Canon EOS M50 with gphoto2 (on
Linux):
$ gphoto2 --version
gphoto2 2.5.20
[...]
gphoto2         2.5.20         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect
usbscsi, gcc, ltdl, USB, serial without locking

What I would like to do is the following:
1. enable live view and get a stream of jpg frames to process
2. keep the camera's LCD screen on during the live view, and being able to
control the various settings from the camera (ISO, speed, focus, etc)

I tried to connect my camera to a windows PC and control it using Canon EOS
Utility: the "live view mode" of that program does exactly what I want,
i.e. it displays a real time stream of images on the windows computer, but
I can still control all the settings from the camera. So, this should prove
that the camera is capable of doing this, I suppose.
However, I did not manage to achieve the same with gphoto2. I tried to
connect the camera both via USB and Wi-Fi, and I get the same results in
both cases.

The first thing to note that as soon as gphoto2 connects to my camera, for
example with gphoto2 --config, the LCD turns off and the camera buttons are
not responding: I suppose this is the normal behavior and it's intended.
When gphoto2 exists, the LCD is still black, but the buttons work; in
particular, if I press the shutter the camera takes a picture, and if I
press "Menu" I can enter the menu. Once I do exit the menu, the LCD works
again and I can use the camera as normal.

The first things which I tried was "gphoto2 --capture-movie --stdout": this
works, and I can get a real time stream of frames. However, as soon as I
start gphoto2, the camera LCD turns off and I can no longer control my
camera using any button.

Then, I inspected gphoto2 --config, and I found a setting which looks
promising: /main/settings/output:
/main/settings/output
Label: Camera Output
Readonly: 0
Type: RADIO
Current: Unknown value 0008
Choice: 0 Off
Choice: 1 TFT
Choice: 2 PC
Choice: 3 TFT + PC
Choice: 4 Setting 4
Choice: 5 Setting 5
Choice: 6 Setting 6
Choice: 7 Setting 7
Choice: 8 Unknown value 0008
Choice: 9 Unknown value 0009
Choice: 10 Unknown value 000a
Choice: 11 Unknown value 000b
END

The setting "TFT + PC" looks exactly what I need, and indeed it seems to do
something. The following command turns the LCD back on:
    $ gphoto2 --set-config output="TFT + PC"

However, it seems I can't use it together with --capture-movie. I tried the
following, but I get the same result as a bare "--capture-movie", i.e. the
LCD turns off. Moreover, as soon as gphoto2 exits, /main/settings/output is
set back to "Unknown value 0008":
    $ gphoto2 --set-config output="TFT + PC" --capture-movie
    CTRL-C
    $ gphoto2 --get-config=output
    Label: Camera Output

    [...]
    Current: Unknown value 0008

I tried all of the possible "Camera Output" settings: same result with all
of them, apart 000a and 000b which cause an "Error 70" in the camera, for
which I have to remove the battery in order to have it working again.

The same happens also inside gphoto2 --shell:

gphoto2: {/tmp} /> capture-preview  # this turns the LCD OFF
gphoto2: {/tmp} /> set-config-index output=3 # LCD back ON
gphoto2: {/tmp} /> capture-preview # LCD OFF
[etc...]

I attach the output of gphoto2 --list-all-config, in case it's useful.

Does anybody have any idea?
Thanks in advance,
Antonio

_______________________________________________
Gphoto-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
m50.txt (text/plain, 11.8 KB)
/main/actions/syncdatetimeutc
Label: Synchronize camera date and time with PC
Readonly: 0
Type: TOGGLE
Current: 0
END
/main/actions/syncdatetime
Label: Synchronize camera date and time with PC
Readonly: 0
Type: TOGGLE
Current: 0
END
/main/actions/uilock
Label: UI Lock
Readonly: 0
Type: TOGGLE
Current: 2
END
/main/actions/autofocusdrive
Label: Drive Canon DSLR Autofocus
Readonly: 0
Type: TOGGLE
Current: 0
END
/main/actions/manualfocusdrive
Label: Drive Canon DSLR Manual focus
Readonly: 0
Type: RADIO
Current: None
Choice: 0 Near 1
Choice: 1 Near 2
Choice: 2 Near 3
Choice: 3 None
Choice: 4 Far 1
Choice: 5 Far 2
Choice: 6 Far 3
END
/main/actions/cancelautofocus
Label: Cancel Canon DSLR Autofocus
Readonly: 0
Type: TOGGLE
Current: 0
END
/main/actions/eoszoom
Label: Canon EOS Zoom
Readonly: 0
Type: TEXT
Current: 0
END
/main/actions/eoszoomposition
Label: Canon EOS Zoom Position
Readonly: 0
Type: TEXT
Current: 0,0
END
/main/actions/viewfinder
Label: Canon EOS Viewfinder
Readonly: 0
Type: TOGGLE
Current: 2
END
/main/actions/eosremoterelease
Label: Canon EOS Remote Release
Readonly: 0
Type: RADIO
Current: None
Choice: 0 None
Choice: 1 Press Half
Choice: 2 Press Full
Choice: 3 Release Half
Choice: 4 Release Full
Choice: 5 Immediate
Choice: 6 Press 1
Choice: 7 Press 2
Choice: 8 Press 3
Choice: 9 Release 1
Choice: 10 Release 2
Choice: 11 Release 3
END
/main/actions/opcode
Label: PTP Opcode
Readonly: 0
Type: TEXT
Current: 0x1001,0xparam1,0xparam2
END
/main/settings/datetimeutc
Label: Camera Date and Time
Readonly: 0
Type: DATE
Current: 1589491752
Printable: gio 14 mag 2020, 23:29:12
Help: Use 'now' as the current time when setting.

END
/main/settings/datetime
Label: Camera Date and Time
Readonly: 0
Type: DATE
Current: 1589491752
Printable: gio 14 mag 2020, 23:29:12
Help: Use 'now' as the current time when setting.

END
/main/settings/output
Label: Camera Output
Readonly: 0
Type: RADIO
Current: Unknown value 0008
Choice: 0 Off
Choice: 1 TFT
Choice: 2 PC
Choice: 3 TFT + PC
Choice: 4 Setting 4
Choice: 5 Setting 5
Choice: 6 Setting 6
Choice: 7 Setting 7
Choice: 8 Unknown value 0008
Choice: 9 Unknown value 0009
Choice: 10 Unknown value 000a
Choice: 11 Unknown value 000b
END
/main/settings/movierecordtarget
Label: Recording Destination
Readonly: 0
Type: RADIO
Current: Unknown value 0003
Choice: 0 Card
Choice: 1 None
Choice: 2 Unknown value 0003
END
/main/settings/evfmode
Label: EVF Mode
Readonly: 0
Type: RADIO
Current: 1
Choice: 0 1
END
/main/settings/ownername
Label: Owner Name
Readonly: 0
Type: TEXT
Current: 
END
/main/settings/artist
Label: Artist
Readonly: 0
Type: TEXT
Current: 
END
/main/settings/copyright
Label: Copyright
Readonly: 0
Type: TEXT
Current: 
END
/main/settings/focusarea
Label: Focus Area
Readonly: 0
Type: TEXT
Current: 1431656279
END
/main/settings/autopoweroff
Label: Auto Power Off
Readonly: 0
Type: TEXT
Current: 60
END
/main/settings/depthoffield
Label: Depth of Field
Readonly: 0
Type: TEXT
Current: 0
END
/main/settings/capturetarget
Label: Capture Target
Readonly: 0
Type: RADIO
Current: Memory card
Choice: 0 Internal RAM
Choice: 1 Memory card
END
/main/settings/capture
Label: Capture
Readonly: 0
Type: TOGGLE
Current: 0
END
/main/status/serialnumber
Label: Serial Number
Readonly: 0
Type: TEXT
Current: e000436190134578a994e4c725dacd6f
END
/main/status/manufacturer
Label: Camera Manufacturer
Readonly: 0
Type: TEXT
Current: Canon.Inc
END
/main/status/cameramodel
Label: Camera Model
Readonly: 0
Type: TEXT
Current: Canon EOS M50
END
/main/status/deviceversion
Label: Device Version
Readonly: 0
Type: TEXT
Current: 3-1.0.1
END
/main/status/vendorextension
Label: Vendor Extension
Readonly: 0
Type: TEXT
Current: None
END
/main/status/model
Label: Camera Model
Readonly: 0
Type: TEXT
Current: 1042
END
/main/status/Battery Level
Label: Battery Level
Readonly: 1
Type: TEXT
Current: 67%
END
/main/status/batterylevel
Label: Battery Level
Readonly: 0
Type: TEXT
Current: 50%
END
/main/status/lensname
Label: Lens Name
Readonly: 0
Type: TEXT
Current: EF-M22mm f/2 STM
END
/main/status/eosserialnumber
Label: Serial Number
Readonly: 0
Type: TEXT
Current: 663044008624
END
/main/status/availableshots
Label: Available Shots
Readonly: 0
Type: TEXT
Current: 28859
END
/main/imgsettings/imageformat
Label: Image Format
Readonly: 0
Type: RADIO
Current: RAW + Large Fine JPEG
Choice: 0 Large Fine JPEG
Choice: 1 Large Normal JPEG
Choice: 2 Medium Fine JPEG
Choice: 3 Medium Normal JPEG
Choice: 4 Small Fine JPEG
Choice: 5 Small Normal JPEG
Choice: 6 Smaller JPEG
Choice: 7 RAW + Large Fine JPEG
Choice: 8 RAW + Large Normal JPEG
Choice: 9 RAW + Medium Fine JPEG
Choice: 10 RAW + Medium Normal JPEG
Choice: 11 RAW + Small Fine JPEG
Choice: 12 RAW + Small Normal JPEG
Choice: 13 RAW + Smaller JPEG
Choice: 14 Unknown value 0303
Choice: 15 Unknown value 0302
Choice: 16 Unknown value 0313
Choice: 17 Unknown value 0312
Choice: 18 Unknown value 03d3
Choice: 19 Unknown value 03d2
Choice: 20 Unknown value 03e3
Choice: 21 RAW
Choice: 22 Large Fine JPEG
END
/main/imgsettings/imageformatsd
Label: Image Format SD
Readonly: 0
Type: RADIO
Current: RAW + Large Fine JPEG
Choice: 0 Large Fine JPEG
Choice: 1 Large Normal JPEG
Choice: 2 Medium Fine JPEG
Choice: 3 Medium Normal JPEG
Choice: 4 Small Fine JPEG
Choice: 5 Small Normal JPEG
Choice: 6 Smaller JPEG
Choice: 7 RAW + Large Fine JPEG
Choice: 8 RAW + Large Normal JPEG
Choice: 9 RAW + Medium Fine JPEG
Choice: 10 RAW + Medium Normal JPEG
Choice: 11 RAW + Small Fine JPEG
Choice: 12 RAW + Small Normal JPEG
Choice: 13 RAW + Smaller JPEG
Choice: 14 Unknown value 0303
Choice: 15 Unknown value 0302
Choice: 16 Unknown value 0313
Choice: 17 Unknown value 0312
Choice: 18 Unknown value 03d3
Choice: 19 Unknown value 03d2
Choice: 20 Unknown value 03e3
Choice: 21 RAW
Choice: 22 Large Fine JPEG
END
/main/imgsettings/imageformatcf
Label: Image Format CF
Readonly: 0
Type: RADIO
Current: RAW + Large Fine JPEG
Choice: 0 Large Fine JPEG
Choice: 1 Large Normal JPEG
Choice: 2 Medium Fine JPEG
Choice: 3 Medium Normal JPEG
Choice: 4 Small Fine JPEG
Choice: 5 Small Normal JPEG
Choice: 6 Smaller JPEG
Choice: 7 RAW + Large Fine JPEG
Choice: 8 RAW + Large Normal JPEG
Choice: 9 RAW + Medium Fine JPEG
Choice: 10 RAW + Medium Normal JPEG
Choice: 11 RAW + Small Fine JPEG
Choice: 12 RAW + Small Normal JPEG
Choice: 13 RAW + Smaller JPEG
Choice: 14 Unknown value 0303
Choice: 15 Unknown value 0302
Choice: 16 Unknown value 0313
Choice: 17 Unknown value 0312
Choice: 18 Unknown value 03d3
Choice: 19 Unknown value 03d2
Choice: 20 Unknown value 03e3
Choice: 21 RAW
Choice: 22 Large Fine JPEG
END
/main/imgsettings/iso
Label: ISO Speed
Readonly: 0
Type: RADIO
Current: 100
Choice: 0 Auto
Choice: 1 100
Choice: 2 125
Choice: 3 160
Choice: 4 200
Choice: 5 250
Choice: 6 320
Choice: 7 400
Choice: 8 500
Choice: 9 640
Choice: 10 800
Choice: 11 1000
Choice: 12 1250
Choice: 13 1600
Choice: 14 2000
Choice: 15 2500
Choice: 16 3200
Choice: 17 4000
Choice: 18 5000
Choice: 19 6400
Choice: 20 8000
Choice: 21 10000
Choice: 22 12800
Choice: 23 16000
Choice: 24 20000
Choice: 25 25600
Choice: 26 51200
END
/main/imgsettings/whitebalance
Label: WhiteBalance
Readonly: 0
Type: RADIO
Current: Manual
Choice: 0 Auto
Choice: 1 Unknown value 0017
Choice: 2 Daylight
Choice: 3 Shadow
Choice: 4 Cloudy
Choice: 5 Tungsten
Choice: 6 Fluorescent
Choice: 7 Flash
Choice: 8 Manual
Choice: 9 Color Temperature
END
/main/imgsettings/colortemperature
Label: Color Temperature
Readonly: 0
Type: TEXT
Current: 3000
END
/main/imgsettings/whitebalanceadjusta
Label: WhiteBalance Adjust A
Readonly: 0
Type: RADIO
Current: 0
Choice: 0 -9
Choice: 1 -8
Choice: 2 -7
Choice: 3 -6
Choice: 4 -5
Choice: 5 -4
Choice: 6 -3
Choice: 7 -2
Choice: 8 -1
Choice: 9 0
Choice: 10 1
Choice: 11 2
Choice: 12 3
Choice: 13 4
Choice: 14 5
Choice: 15 6
Choice: 16 7
Choice: 17 8
Choice: 18 9
END
/main/imgsettings/whitebalanceadjustb
Label: WhiteBalance Adjust B
Readonly: 0
Type: RADIO
Current: 0
Choice: 0 -9
Choice: 1 -8
Choice: 2 -7
Choice: 3 -6
Choice: 4 -5
Choice: 5 -4
Choice: 6 -3
Choice: 7 -2
Choice: 8 -1
Choice: 9 0
Choice: 10 1
Choice: 11 2
Choice: 12 3
Choice: 13 4
Choice: 14 5
Choice: 15 6
Choice: 16 7
Choice: 17 8
Choice: 18 9
END
/main/imgsettings/whitebalancexa
Label: WhiteBalance X A
Readonly: 0
Type: TEXT
Current: 0
END
/main/imgsettings/whitebalancexb
Label: WhiteBalance X B
Readonly: 0
Type: TEXT
Current: 0
END
/main/imgsettings/colorspace
Label: Color Space
Readonly: 0
Type: RADIO
Current: sRGB
Choice: 0 sRGB
Choice: 1 AdobeRGB
END
/main/capturesettings/zoomspeed
Label: Zoom Speed
Readonly: 0
Type: TEXT
Current: 0
END
/main/capturesettings/exposurecompensation
Label: Exposure Compensation
Readonly: 0
Type: RADIO
Current: 0
Choice: 0 -3
Choice: 1 -2.6
Choice: 2 -2.3
Choice: 3 -2
Choice: 4 -1.6
Choice: 5 -1.3
Choice: 6 -1
Choice: 7 -0.6
Choice: 8 -0.3
Choice: 9 0
Choice: 10 0.3
Choice: 11 0.6
Choice: 12 1
Choice: 13 1.3
Choice: 14 1.6
Choice: 15 2
Choice: 16 2.3
Choice: 17 2.6
Choice: 18 3
END
/main/capturesettings/focusmode
Label: Focus Mode
Readonly: 0
Type: RADIO
Current: One Shot
Choice: 0 One Shot
END
/main/capturesettings/continuousaf
Label: Continuous AF
Readonly: 0
Type: RADIO
Current: Off
Choice: 0 Off
Choice: 1 On
END
/main/capturesettings/aspectratio
Label: Aspect Ratio
Readonly: 0
Type: RADIO
Current: 3:2
Choice: 0 3:2
Choice: 1 4:3
Choice: 2 16:9
Choice: 3 1:1
END
/main/capturesettings/storageid
Label: Storage Device
Readonly: 0
Type: TEXT
Current: 00020001
END
/main/capturesettings/highisonr
Label: High ISO Noise Reduction
Readonly: 0
Type: RADIO
Current: Off
Choice: 0 High
Choice: 1 Low
Choice: 2 Off
Choice: 3 Normal
Choice: 4 Multi-Shot
END
/main/capturesettings/autoexposuremode
Label: Canon Auto Exposure Mode
Readonly: 0
Type: RADIO
Current: AV
Choice: 0 P
Choice: 1 TV
Choice: 2 AV
Choice: 3 Manual
Choice: 4 Bulb
Choice: 5 A_DEP
Choice: 6 DEP
Choice: 7 Custom
Choice: 8 Lock
Choice: 9 Green
Choice: 10 Night Portrait
Choice: 11 Sports
Choice: 12 Portrait
Choice: 13 Landscape
Choice: 14 Closeup
Choice: 15 Flash Off
END
/main/capturesettings/drivemode
Label: Drive Mode
Readonly: 0
Type: RADIO
Current: Single
Choice: 0 Single
Choice: 1 Continuous high speed
Choice: 2 Continuous low speed
Choice: 3 Timer 10 sec
Choice: 4 Timer 2 sec
Choice: 5 Unknown value 0007
END
/main/capturesettings/picturestyle
Label: Picture Style
Readonly: 0
Type: RADIO
Current: Auto
Choice: 0 Auto
Choice: 1 Standard
Choice: 2 Portrait
Choice: 3 Landscape
Choice: 4 Unknown value 0088
Choice: 5 Neutral
Choice: 6 Faithful
Choice: 7 Monochrome
Choice: 8 User defined 1
Choice: 9 User defined 2
Choice: 10 User defined 3
END
/main/capturesettings/aperture
Label: Aperture
Readonly: 0
Type: RADIO
Current: 2
Choice: 0 2
Choice: 1 2.2
Choice: 2 2.5
Choice: 3 2.8
Choice: 4 3.2
Choice: 5 3.5
Choice: 6 4
Choice: 7 4.5
Choice: 8 5
Choice: 9 5.6
Choice: 10 6.3
Choice: 11 7.1
Choice: 12 8
Choice: 13 9
Choice: 14 10
Choice: 15 11
Choice: 16 13
Choice: 17 14
Choice: 18 16
Choice: 19 18
Choice: 20 20
Choice: 21 22
END
/main/capturesettings/shutterspeed
Label: Shutter Speed
Readonly: 0
Type: RADIO
Current: 1
Choice: 0 1
END
/main/capturesettings/meteringmode
Label: Metering Mode
Readonly: 0
Type: RADIO
Current: Evaluative
Choice: 0 Evaluative
Choice: 1 Partial
Choice: 2 Spot
Choice: 3 Center-weighted average
END
/main/capturesettings/bracketmode
Label: Bracket Mode
Readonly: 0
Type: TEXT
Current: 0
END
/main/capturesettings/aeb
Label: Auto Exposure Bracketing
Readonly: 0
Type: RADIO
Current: off
Choice: 0 off
Choice: 1 +/- 1/3
Choice: 2 +/- 2/3
Choice: 3 +/- 1
Choice: 4 +/- 1 1/3
Choice: 5 +/- 1 2/3
Choice: 6 +/- 2
END
/main/other/d402
Label: PTP Property 0xd402
Readonly: 1
Type: TEXT
Current: Canon EOS M50
END
/main/other/d407
Label: PTP Property 0xd407
Readonly: 1
Type: TEXT
Current: 1
END
/main/other/d406
Label: PTP Property 0xd406
Readonly: 0
Type: TEXT
Current: Unknown Initiator
END
/main/other/d303
Label: PTP Property 0xd303
Readonly: 1
Type: TEXT
Current: 1
END
/main/other/5001
Label: Battery Level
Readonly: 1
Type: MENU
Current: 67
Choice: 0 100
Choice: 1 0
Choice: 2 75
Choice: 3 0
Choice: 4 50
END