User Tools

Site Tools


live_capture

Live Capture

Jun 2017



WARNING!!!! If you came to this page without looking at the Live Capture Setup page, then shame on you! You will probably find that capture does not work properly because you didn't do something very important, mentioned in the Live Capture Setup page :)



Plese read this next section, it's quite important.


It seems gphoto2 has an issue if the shutter speed is slow. So using a shutter speed of say 1/250, then I can capture and download a file. If I use a shutter speed of say 3s, then I can capture, but download simply won't happen.

On the 700D, 1/6 seems to be the cut off, if you go to 1/4, then you lose the ability to capture and download in a single command. You can of course capture, execute a wait equivalent to the shutter speed (plus a bit for writing to the card) then do a download using the –skip-existing so you only download files that have not already been backed up.




Now, this depends on your camera, and whether gphoto2 supports it on your model. To get the capabilities of your camera, use the following command:

  gphoto2 --summary


Now on my 700D, I see the following:

Camera summary:
Manufacturer: Canon Inc.
Model: Canon EOS 700D
  Version: 3-1.1.3
  Serial Number: 46ff2aa38fba41f88d84eccb8eba8ada
Vendor Extension ID: 0xb (1.0)

Capture Formats: JPEG
Display Formats: Association/Directory, Script, DPOF, MS AVI, MS Wave, JPEG, CRW, Unknown(b103), Unknown(bf02), Defined Type, Unknown(b104), Unknown(b105)

Device Capabilities:
        File Download, File Deletion, File Upload
        No Image Capture, No Open Capture, Canon EOS Capture, Canon EOS Shutter Button

Storage Devices Summary:
store_00020001:
        StorageDescription: SD
        VolumeLabel: None
        Storage Type: Removable RAM (memory card)
        Filesystemtype: Digital Camera Layout (DCIM)
        Access Capability: Read-Write
        Maximum Capability: 31678529536 (30211 MB)
        Free Space (Bytes): 31375130624 (29921 MB)
        Free Space (Images): -1

Device Property Summary:
Property 0xd402:(read only) (type=0xffff) 'Canon EOS 700D'
Property 0xd407:(read only) (type=0x6) 1
Property 0xd406:(readwrite) (type=0xffff) 'Unknown Initiator'
Property 0xd303:(read only) (type=0x2) 1
Battery Level(0x5001):(read only) (type=0x2) Enumeration [100,0,75,0,50] value: 100% (100)


Importantly, I see the following section:

Device Capabilities:

File Download, File Deletion, File Upload
No Image Capture, No Open Capture, Canon EOS Capture, Canon EOS Shutter Button

So my 700D does not allow gphoto2 to capture files. There are several methods that you can use to try, and they are:

  gphoto2 --trigger-capture
  
  gphoto2 --capture-image
  
  gphoto2 --capture-image-and-download


gphoto2 –trigger-capture takes a photo and stores it on the SD card.
gphoto2 –capture-image takes a photo and stores it on the SD card.
gphoto2 –capture-image-and-download takes a photo and stores it on the SD card and downloads it.


So if I list the files on my camera memory card:

  gphoto2 --list-files
There is no file in folder '/'.
There is no file in folder '/store_00020001'.
There is no file in folder '/store_00020001/DCIM'.
There are 2 files in folder '/store_00020001/DCIM/100CANON'.
#1     IMG_5859.CR2               rd 20815 KB image/x-canon-cr2
#2     IMG_5860.CR2               rd 27070 KB image/x-canon-cr2
There is no file in folder '/store_00020001/MISC'.

We can see that there are two photos here (IMG_5859.CR2 and IMG_5860.CR2).

If we use the following command:

  gphoto2 --capture-image


We can now again check the camera memory card:

There is no file in folder '/'.
There is no file in folder '/store_00020001'.
There is no file in folder '/store_00020001/DCIM'.
There are 3 files in folder '/store_00020001/DCIM/100CANON'.
#1     IMG_5859.CR2               rd 20815 KB image/x-canon-cr2
#2     IMG_5860.CR2               rd 27070 KB image/x-canon-cr2
#3     IMG_5861.CR2               rd 25884 KB image/x-canon-cr2
There is no file in folder '/store_00020001/MISC'.

We can see that a new imgage (IMG_5861.CR2) has appeared. So this works.
If we use the capture and download command:

   gphoto2 --capture-image-and-download


I get this output (in the Raspberry Pi terminal)

New file is in location /store_00020001/DCIM/100CANON/IMG_5862.CR2 on the camera
Downloading 'IMG_5862.CR2' from folder '/store_00020001/DCIM/100CANON'...
Saving file as IMG_5862.CR2
Deleting file /store_00020001/DCIM/100CANON/IMG_5862.CR2 on the camera
Deleting 'IMG_5862.CR2' from folder '/store_00020001/DCIM/100CANON'...

So this indicates that the camera captured and image called IMG_5862.CR2 and downloaded it to the Raspberry Pi, then deleted it.

A simple 'ls' will check the Raspberry Pi folder (remember it will be downloaded to your current directory)

ls

IMG_5862.CR2

And yes it is there, if we do another check of the camera memory card.

  gphoto2 --list-files
There is no file in folder '/'.
There is no file in folder '/store_00020001'.
There is no file in folder '/store_00020001/DCIM'.
There are 3 files in folder '/store_00020001/DCIM/100CANON'.
#1     IMG_5859.CR2               rd 20815 KB image/x-canon-cr2
#2     IMG_5860.CR2               rd 27070 KB image/x-canon-cr2
#3     IMG_5861.CR2               rd 25884 KB image/x-canon-cr2
There is no file in folder '/store_00020001/MISC'.

We can see that the captured image was indeed deleted (which if I am honest, is not what i would want).

If you wish to download and keep the files (this took a couple of attempts for me) then you can use the following syntax:

  gphoto2 --capture-image-and-download --keep


And to go back to just downloading the files, you can use:

  gphoto2 --capture-image-and-download --no-keep



live_capture.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1