Shutter speed property label problem

hi,

I’m testing theta z1 with usb api.

having a problem with the shutter speed property (0xd00f) label.
How can I get a human-readable shutter speed string like 1/100 or 0.01?

gphoto2 output:

/home/teevr/teevr-ctl # gphoto2 --set-config expprogram=0
/home/teevr/teevr-ctl # gphoto2 --get-config d00f
Label: PTP Property 0xd00f
Readonly: 0
Type: MENU
Current: 257698037761
Choice: 0 107374182400001
Choice: 1 85899345920001
Choice: 2 68719476736001
Choice: 3 53687091200001
Choice: 4 42949672960001
Choice: 5 34359738368001
Choice: 6 27487790694401
Choice: 7 21474836480001
Choice: 8 17179869184001
Choice: 9 13743895347201
Choice: 10 10737418240001
Choice: 11 8589934592001
Choice: 12 6871947673601
Choice: 13 5368709120001
Choice: 14 4294967296001
Choice: 15 3435973836801
Choice: 16 2748779069441
Choice: 17 2147483648001
Choice: 18 1717986918401
Choice: 19 1374389534721
Choice: 20 1073741824001
Choice: 21 858993459201
Choice: 22 687194767361
Choice: 23 536870912001
Choice: 24 429496729601
Choice: 25 343597383681
Choice: 26 257698037761
Choice: 27 214748364801
Choice: 28 171798691841
Choice: 29 128849018881
Choice: 30 107374182401
Choice: 31 85899345921
Choice: 32 64424509441
Choice: 33 55834574849
Choice: 34 42949672961
Choice: 35 34359738369
Choice: 36 25769803777
Choice: 37 21474836481
Choice: 38 17179869185
Choice: 39 12884901889
Choice: 40 107374182410
Choice: 41 8589934593
Choice: 42 68719476746
Choice: 43 55834574858
Choice: 44 4294967297
Choice: 45 42949672973
Choice: 46 42949672976
Choice: 47 4294967298
Choice: 48 42949672985
Choice: 49 42949672992
Choice: 50 4294967300
Choice: 51 4294967301
Choice: 52 4294967302
Choice: 53 4294967304
Choice: 54 4294967306
Choice: 55 4294967309
Choice: 56 4294967311
Choice: 57 4294967316
Choice: 58 4294967321
Choice: 59 4294967326
Choice: 60 4294967336
Choice: 61 4294967346
Choice: 62 4294967356
END
/home/teevr/teevr-ctl # gphoto2 --set-config expprogram=3
/home/teevr/teevr-ctl # gphoto2 --get-config d00f
Label: PTP Property 0xd00f
Readonly: 0
Type: MENU
Current: 257698037761
Choice: 0 107374182400001
Choice: 1 85899345920001
Choice: 2 68719476736001
Choice: 3 53687091200001
Choice: 4 42949672960001
Choice: 5 34359738368001
Choice: 6 27487790694401
Choice: 7 21474836480001
Choice: 8 17179869184001
Choice: 9 13743895347201
Choice: 10 10737418240001
Choice: 11 8589934592001
Choice: 12 6871947673601
Choice: 13 5368709120001
Choice: 14 4294967296001
Choice: 15 3435973836801
Choice: 16 2748779069441
Choice: 17 2147483648001
Choice: 18 1717986918401
Choice: 19 1374389534721
Choice: 20 1073741824001
Choice: 21 858993459201
Choice: 22 687194767361
Choice: 23 536870912001
Choice: 24 429496729601
Choice: 25 343597383681
Choice: 26 257698037761
Choice: 27 214748364801
Choice: 28 171798691841
Choice: 29 128849018881
Choice: 30 107374182401
Choice: 31 85899345921
Choice: 32 64424509441
Choice: 33 55834574849
Choice: 34 42949672961
Choice: 35 34359738369
Choice: 36 25769803777
Choice: 37 21474836481
Choice: 38 17179869185
Choice: 39 12884901889
Choice: 40 107374182410
Choice: 41 8589934593
Choice: 42 68719476746
Choice: 43 55834574858
Choice: 44 4294967297
Choice: 45 42949672973
Choice: 46 42949672976
Choice: 47 4294967298
Choice: 48 42949672985
Choice: 49 42949672992
Choice: 50 4294967300
Choice: 51 4294967301
Choice: 52 4294967302
Choice: 53 4294967304
Choice: 54 4294967306
Choice: 55 4294967309
Choice: 56 4294967311
END

my setup:

root@teevr-NucBox5:/home/teevr/teevr-ctl# gphoto2 --version
gphoto2 2.5.28.1

Copyright (c) 2000-2021 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.28.1       gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.29.1       standard camlibs, gcc, no ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking
root@teevr-NucBox5:/home/teevr/teevr-ctl# gphoto2 --get-config deviceversion
Label: Device Version                                                          
Readonly: 1
Type: TEXT
Current: 2.10.3
END

thanks in advance,
dalho.

Have you seen these posts?

Refer to the first post above for recompilation information for RICOH THETA with gphoto2 shutterspeed. As the post is a bit old, I am not sure if it is still relevant to the current version.

{ N_(“Shutter Speed”), “shutterspeed”, PTP_DPC_RICOH_ShutterSpeed, PTP_VENDOR_MICROSOFT, PTP_DTC_UINT64, _get_Ricoh_ShutterSpeed, _put_Ricoh_ShutterSpeed },
1 Like

oh, thank you very much!

adding a one-liner (your first link) solved the problem.

thank you once again.

output:

~/hacking/libgphoto2 # gphoto2 --set-config-index expprogram=0
~/hacking/libgphoto2 # gphoto2 --get-config shutterspeed
Label: Shutter Speed
Readonly: 0
Type: RADIO
Current: 1/60
Choice: 0 1/25000
Choice: 1 1/20000
Choice: 2 1/16000
Choice: 3 1/12500
Choice: 4 1/10000
Choice: 5 1/8000
Choice: 6 1/6400
Choice: 7 1/5000
Choice: 8 1/4000
Choice: 9 1/3200
Choice: 10 1/2500
Choice: 11 1/2000
Choice: 12 1/1600
Choice: 13 1/1250
Choice: 14 1/1000
Choice: 15 1/800
Choice: 16 1/640
Choice: 17 1/500
Choice: 18 1/400
Choice: 19 1/320
Choice: 20 1/250
Choice: 21 1/200
Choice: 22 1/160
Choice: 23 1/125
Choice: 24 1/100
Choice: 25 1/80
Choice: 26 1/60
Choice: 27 1/50
Choice: 28 1/40
Choice: 29 1/30
Choice: 30 1/25
Choice: 31 1/20
Choice: 32 1/15
Choice: 33 1/13
Choice: 34 1/10
Choice: 35 1/8
Choice: 36 1/6
Choice: 37 1/5
Choice: 38 1/4
Choice: 39 1/3
Choice: 40 10/25
Choice: 41 1/2
Choice: 42 10/16
Choice: 43 10/13
Choice: 44 1/1
Choice: 45 13/10
Choice: 46 16/10
Choice: 47 2/1
Choice: 48 25/10
Choice: 49 32/10
Choice: 50 4/1
Choice: 51 5/1
Choice: 52 6/1
Choice: 53 8/1
Choice: 54 10/1
Choice: 55 13/1
Choice: 56 15/1
Choice: 57 20/1
Choice: 58 25/1
Choice: 59 30/1
Choice: 60 40/1
Choice: 61 50/1
Choice: 62 60/1
END
~/hacking/libgphoto2 # gphoto2 --set-config-index expprogram=3
~/hacking/libgphoto2 # gphoto2 --get-config shutterspeed
Label: Shutter Speed
Readonly: 0
Type: RADIO
Current: 1/60
Choice: 0 1/25000
Choice: 1 1/20000
Choice: 2 1/16000
Choice: 3 1/12500
Choice: 4 1/10000
Choice: 5 1/8000
Choice: 6 1/6400
Choice: 7 1/5000
Choice: 8 1/4000
Choice: 9 1/3200
Choice: 10 1/2500
Choice: 11 1/2000
Choice: 12 1/1600
Choice: 13 1/1250
Choice: 14 1/1000
Choice: 15 1/800
Choice: 16 1/640
Choice: 17 1/500
Choice: 18 1/400
Choice: 19 1/320
Choice: 20 1/250
Choice: 21 1/200
Choice: 22 1/160
Choice: 23 1/125
Choice: 24 1/100
Choice: 25 1/80
Choice: 26 1/60
Choice: 27 1/50
Choice: 28 1/40
Choice: 29 1/30
Choice: 30 1/25
Choice: 31 1/20
Choice: 32 1/15
Choice: 33 1/13
Choice: 34 1/10
Choice: 35 1/8
Choice: 36 1/6
Choice: 37 1/5
Choice: 38 1/4
Choice: 39 1/3
Choice: 40 10/25
Choice: 41 1/2
Choice: 42 10/16
Choice: 43 10/13
Choice: 44 1/1
Choice: 45 13/10
Choice: 46 16/10
Choice: 47 2/1
Choice: 48 25/10
Choice: 49 32/10
Choice: 50 4/1
Choice: 51 5/1
Choice: 52 6/1
Choice: 53 8/1
Choice: 54 10/1
Choice: 55 13/1
Choice: 56 15/1
END
~/hacking/libgphoto2 #

diff (in libgphoto2 root dir):

~/hacking/libgphoto2 # git diff camlibs/ptp2/config.c
WARNING: terminal is not fully functional
-  (press RETURN)
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index ace32a617..963df0fd2 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -10753,6 +10753,7 @@ static struct submenu capture_settings_menu[] = {
        { N_("Shutter Speed"),                  "shutterspeed",             PTP_DPC_SONY_ShutterSpeed2,             PTP_VENDOR_SONY,    PTP_DTC_UINT32,  _get_Sony_ShutterSpeed,             _put_Sony_ShutterSpeed },
        { N_("Shutter Speed"),                  "shutterspeed",             PTP_DPC_SONY_ShutterSpeed,              PTP_VENDOR_SONY,    PTP_DTC_UINT32,  _get_Sony_ShutterSpeed,             _put_Sony_ShutterSpeed },
        { N_("Shutter Speed"),                  "shutterspeed",             PTP_DPC_RICOH_ShutterSpeed,             PTP_VENDOR_PENTAX,  PTP_DTC_UINT64, _get_Ricoh_ShutterSpeed,            _put_Ricoh_ShutterSpeed },
+       { N_("Shutter Speed"),                  "shutterspeed",             PTP_DPC_RICOH_ShutterSpeed,             PTP_VENDOR_MICROSOFT, PTP_DTC_UINT64, _get_Ricoh_ShutterSpeed,          _put_Ricoh_ShutterSpeed },
        { N_("Shutter Speed"),                  "shutterspeed",             PTP_DPC_GP_SIGMA_FP_ShutterSpeed,       PTP_VENDOR_GP_SIGMAFP, PTP_DTC_UINT64, _get_SigmaFP_ShutterSpeed,       _put_SigmaFP_ShutterSpeed },
        { N_("Aperture"),                       "aperture",                 PTP_DPC_GP_SIGMA_FP_Aperture,           PTP_VENDOR_GP_SIGMAFP, PTP_DTC_UINT64, _get_SigmaFP_Aperture,           _put_SigmaFP_Aperture },
        { N_("Metering Mode"),                  "meteringmode",             PTP_DPC_CANON_MeteringMode,             PTP_VENDOR_CANON,   PTP_DTC_UINT8,  _get_Canon_MeteringMode,            _put_Canon_MeteringMode },
2 Likes

thank you for the report back. :slight_smile:

The original author of the fix is @Hugues

I’m still hoping that a student researcher will submit a pull request to get the main source of libgphoto2 updated. In the meantime, it is good to know that there is a workaround that still works.

1 Like