using_gphoto2_to_control_a_dslr_camera
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
using_gphoto2_to_control_a_dslr_camera [2017/06/25 13:50] – [gphoto2 Support for my Camera] walkeradmin | using_gphoto2_to_control_a_dslr_camera [2023/03/09 22:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | <color darkorange> | + | <color darkorange> |
- | \\ | + | ---- |
- | \\ | + | |
- | <color # | + | |
- | \\ | + | |
- | \\ | + | |
{{: | {{: | ||
- | |||
---- | ---- | ||
==== Introduction ==== | ==== Introduction ==== | ||
Line 14: | Line 9: | ||
\\ | \\ | ||
\\ | \\ | ||
- | Anyway, gphoto2 allows you to control your camera via the USB port, the amount of control you get varies between the make and model of camera that you are using. | + | Anyway, |
\\ | \\ | ||
\\ | \\ | ||
- | You can use gphoto2 to take photos (great for making your own intervalometer, | + | You can use <color #22b14c>gphoto2</ |
\\ | \\ | ||
\\ | \\ | ||
Line 40: | Line 35: | ||
\\ | \\ | ||
\\ | \\ | ||
- | \\ | + | ---- |
==== Topics ==== | ==== Topics ==== | ||
* [[Installing gphoto2]]\\ | * [[Installing gphoto2]]\\ | ||
* [[Running gphoto2]]\\ | * [[Running gphoto2]]\\ | ||
- | * [[gphoto | + | * [[gphoto2 |
- | * [[gphoto | + | * [[gphoto2 Support for My Camera]] |
- | * [[gphoto | + | * [[List Files on Camera]] |
- | * [[gphoto | + | * [[Copy all files from SD Card]] |
- | * [[gphoto | + | * [[Live Capture Setup]] |
- | * [[gphoto | + | * [[Live Capture]] |
- | * [[gphoto | + | * [[Tested Cameras]] |
- | * [[gphoto | + | * [[Use gphoto2 to Configure DSLR]] |
- | * [[gphoto | + | * [[Basic Intervalometer]] |
\\ | \\ | ||
\\ | \\ | ||
- | ---- | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | ---- | ||
- | |||
- | ---- | ||
- | |||
- | ==== List Files on Camera ==== | ||
- | To list the files on the camera, we use the --list-files command. | ||
- | \\ | ||
- | gphoto2 --list-files | ||
- | \\ | ||
- | Here is the list of files currently on the SD Card. | ||
- | \\ | ||
- | < | ||
- | There is no file in folder '/' | ||
- | There is no file in folder '/ | ||
- | There is no file in folder '/ | ||
- | There are 11 files in folder '/ | ||
- | #1 | ||
- | #2 | ||
- | #3 | ||
- | #4 | ||
- | #5 | ||
- | #6 | ||
- | #7 | ||
- | #8 | ||
- | #9 | ||
- | #10 IMG_5838.CR2 | ||
- | #11 IMG_5839.CR2 | ||
- | There is no file in folder '/ | ||
- | </ | ||
- | \\ | ||
- | This is the file listing, and as can been seen there are 11 images. | ||
- | \\ | ||
- | \\ | ||
- | ---- | ||
- | ==== Copy All Files From SD Card ==== | ||
- | To copy all of the files from the SD Card, use the following command: | ||
- | \\ | ||
- | gphoto2 --get-all-files | ||
- | \\ | ||
- | This will start to download the files from the camera. By default, the files will be copied to the present working directory (PWD) of your Raspberry Pi, i.e. the folder that you are in when you execute this command. | ||
- | \\ | ||
- | < | ||
- | Downloading ' | ||
- | Saving file as IMG_5829.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5830.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5831.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5832.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5833.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5834.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5835.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5836.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5837.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5838.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5839.CR2 | ||
- | </ | ||
- | \\ | ||
- | Now, lets say I have a few files on my SD Card, lets list them here: | ||
- | \\ | ||
- | gphoto2 --list-files | ||
- | < | ||
- | There is no file in folder '/' | ||
- | There is no file in folder '/ | ||
- | There is no file in folder '/ | ||
- | There are 5 files in folder '/ | ||
- | #1 | ||
- | #2 | ||
- | #3 | ||
- | #4 | ||
- | #5 | ||
- | There is no file in folder '/ | ||
- | </ | ||
- | \\ | ||
- | So I have 5 files, now I can back them up (I am in a folder on the Raspberry Pi called / | ||
- | \\ | ||
- | gphoto2 --get-all-files | ||
- | < | ||
- | total 150116 | ||
- | drwxr-xr-x | ||
- | drwxr-xr-x 17 pi pi 4096 Jun 25 11:03 .. | ||
- | -rw-r--r-- | ||
- | -rw-r--r-- | ||
- | -rw-r--r-- | ||
- | -rw-r--r-- | ||
- | -rw-r--r-- | ||
- | </ | ||
- | \\ | ||
- | If I take some more photos (another five in this example) and I want to back them up, to stop gphoto2 downloading the original five files again, we can use another switch. | ||
- | \\ | ||
- | | ||
- | < | ||
- | Skip existing file IMG_5840.CR2 | ||
- | Skip existing file IMG_5841.CR2 | ||
- | Skip existing file IMG_5842.CR2 | ||
- | Skip existing file IMG_5843.CR2 | ||
- | Skip existing file IMG_5844.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5845.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5846.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5847.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5848.CR2 | ||
- | Downloading ' | ||
- | Saving file as IMG_5849.CR2 | ||
- | </ | ||
- | \\ | ||
- | So here we can see that by using <color # | ||
- | \\ | ||
- | \\ | ||
- | ---- | ||
- | ==== Live Capture ==== | ||
- | <color # | ||
- | After failing to capture images, I discovered this little gem: gphoto2 is configured by default to capture files to your camera' | ||
- | \\ | ||
- | \\ | ||
- | Type in the following from the terminal. | ||
- | \\ | ||
- | gphoto2 --get-config capturetarget | ||
- | \\ | ||
- | You will most likely get the following: | ||
- | \\ | ||
- | \\ | ||
- | Label: Capture Target | ||
- | Type: RADIO | ||
- | <color # | ||
- | Choice: 0 Internal RAM | ||
- | Choice: 1 Memory card | ||
- | \\ | ||
- | \\ | ||
- | Here we can see that the capture target is set to <color # | ||
- | \\ | ||
- | \\ | ||
- | Enter the following: | ||
- | \\ | ||
- | gphoto2 --set-config capturetarget=1 | ||
- | \\ | ||
- | Now when we check, we should get the following: | ||
- | \\ | ||
- | Label: Capture Target | ||
- | Type: RADIO | ||
- | <color # | ||
- | Choice: 0 Internal RAM | ||
- | Choice: 1 Memory card | ||
- | \\ | ||
- | \\ | ||
- | Now we are set to record captures to the <color # | ||
- | \\ | ||
- | \\ | ||
- | 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: | ||
- | Model: Canon EOS 700D | ||
- | Version: 3-1.1.3 | ||
- | Serial Number: 46ff2aa38fba41f88d84eccb8eba8ada | ||
- | Vendor Extension ID: 0xb (1.0) | ||
- | |||
- | Capture Formats: JPEG | ||
- | Display Formats: Association/ | ||
- | |||
- | 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: | ||
- | VolumeLabel: | ||
- | Storage Type: Removable RAM (memory card) | ||
- | Filesystemtype: | ||
- | Access Capability: Read-Write | ||
- | Maximum Capability: 31678529536 (30211 MB) | ||
- | Free Space (Bytes): 31375130624 (29921 MB) | ||
- | Free Space (Images): -1 | ||
- | |||
- | Device Property Summary: | ||
- | Property 0xd402: | ||
- | Property 0xd407: | ||
- | Property 0xd406: | ||
- | Property 0xd303: | ||
- | Battery Level(0x5001): | ||
- | </ | ||
- | \\ | ||
- | Importantly, | ||
- | \\ | ||
- | \\ | ||
- | <color # | ||
- | \\ | ||
- | File Download, File Deletion, File Upload\\ | ||
- | <color # | ||
- | \\ | ||
- | So my 700D does not allow gphoto2 to capture files. There are two methods that you can use to try, and they are: | ||
- | \\ | ||
- | gphoto2 --capture-image | ||
- | | ||
- | gphoto2 --capture-image-and-download | ||
- | \\ | ||
- | <color # | ||
- | <color # | ||
- | \\ | ||
- | \\ | ||
- | On some cameras the <color # | ||
- | \\ | ||
- | \\ | ||
- | So in summary, I have been able to download files from my camera(s) but not capture from them. So I can make a decent backup solution using gphoto2, but not an intervalometer. | ||
- | \\ | ||
- | \\ | ||
- | Cameras tested so far: | ||
- | \\ | ||
- | < | ||
- | Canon EOS M (the original) | ||
- | Canon EOS 550D | ||
- | Canon EOS 700D | ||
- | Canon EOS 5DMk2 | ||
- | </ | ||
- | \\ | ||
- | \\ | ||
- | ---- | ||
- | ==== gphoto2 Trigger Capture === |
using_gphoto2_to_control_a_dslr_camera.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1