gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Panasonic DC-GH5 delays: capture-image-and-download takes ~10 seconds

Open dustinkerstein opened this issue 1 year ago • 0 comments

Capturing with the following command takes around 10 seconds for the command to complete:

gphoto2 --capture-image-and-download

0.375827s: GH5: trigger capture... 1.379560s: GH5: checking for new object... 2.683018s: GH5: checking for new object... 2.683071s: ptp_usb_sendreq...Sending PTP_OC 0x1008 (Get object info) (0x122080ad) request... 2.879945s: gp_port_read...Read 524288 = 0x80000 bytes from port: (hexdump of 524288 bytes) 3.648628s: gp_camera_file_delete 3.648879s: ptp_usb_getresp 4.050497s: camera_wait_for_event 4.050508s: gp_port_set_timeout...Setting port timeout to 2962 milliseconds 7.015596s: gp_port_check_int 9.980686s: ptp_usb_event...Reading PTP event failed: Timeout reading from or writing to the port (-10) 9.981922s: gp_camera_exit 10.287844s: delete_all_files

The full debug log can be downloaded here. Also note that I also see these similar delays when running these commands: --capture-tethered and --set-config movie=1 --wait-event=5s --set-config movie=0 --wait-event-and-download=3s

A few related questions:

  1. I see 11 instances of Requeuing completed transfer - Is that expected?
  2. When comparing the time differential of sequential gp_port_read messages related to the actual transfer (with byte sizes like 523264, 524288, and 195584) I calculate a transfer speed of ~75 MB/s, but when I compare gp_camera_file_delete to the first large gp_port_read I calculate an effective transfer rate of 8.5 MB/s. Is that just the normal expected overhead of the PTP transfer process?
  3. The last GH5: checking for new object... message at 2.683018s is well after the camera's SD card activity indicator ends. Is the camera just misreporting during previous checks that the file isn't there / ready?
  4. Is there any way to optimize the ~7 second time after the Delete object response?

Camera/Host setup:

  • Writing to the Raspberry Pi 4b's /dev/shm ramdisk
  • Panasonic DC-GH5 connected to USB3 port and verified at 5gbps bus speed
  • Shutter speed - 1/40th
  • Manual focus lens with no electrical contacts
  • Lexar UHS-II 2000x 300MB/s 32GB SD card
  • JPEG Fine output with file size ~6MB

Version Info:

gphoto2         2.5.28         gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.30         standard camlibs (SKIPPING docupen lumix), gcc, no ltdl, EXIF
libgphoto2_port 0.12.1         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking

Let me know if you'd like any further info / debug. Thanks for the help!

dustinkerstein avatar Aug 14 '22 17:08 dustinkerstein