Comments (14)
The bugreport was about the old Canon driver, not Sony ...
I think this is more an Indi problem.
A Capture might trigger more than 1 image, so event handling should be called to handle multiple file addition events.
from gphoto2.
Might be related to these issues:
gphoto/libgphoto2#66
gphoto/libgphoto2#51
from gphoto2.
bvoth are unrelated i think. your camera uses the old canon driver, the cameras in the two issues above use the ptp2 driver.
from gphoto2.
Thanks! I understand, definitely not new drivers. Do you have any recommendations for where I can look? I don't mind diving into the code but I'm not sure where the issue may be.
from gphoto2.
I can confirm the exact same behavior with a 20D with gphoto 2.5.9. Was there ever a resolution to this?
Interestingly enough, it's every other image that fails to capture. It is not related to timing. I can run gphoto --wait-event-and-download=10s and quickly fire off 5 shots... 1, 3 and 5 will be captured to the filesystem. Upon a new invocation of gphoto2, the first image will fail to capture, so the even/odd failure is not reset upon a new invocation of gphoto2.
If you set camera to record RAW + JPG, gphoto2 will capture the .CR2 and .JPG from the first photo, and nothing from second capture, then .CR2 and .JPG from the third capture, and so on.
Sometimes immediately after switching the camera to RAW+JPG after being on RAW, gphoto2 seems to record just the .CR2 files, but from every capture, leading to somewhat desired behavior, but eventually it reverts to the behavior listed in the previous paragraph.
from gphoto2.
I think i might know how this happens. Lets see if I can code something up :/
from gphoto2.
Let me know if you need any logs or have code changes to test.
from gphoto2.
Ugh...
I've replicated this issue on a Pine64 2GB board as well as a RaspberryPi. It appears to be a common issue, and likely tied to the ARM platform. I'm finding complaints regarding this defect going back as far as 2013 and sadly no one has managed to fix the problem.
what I did notice is that using "--keep" will prevent the problem from manifesting itself. unfortunately, this does not help me much because i primarily am using this camera with indilib server which is using a gphoto-based driver for canon-dslr support. I don't see an option to specify the "--keep" option, so that app is broken due to this underlying issue with gphoto. :(
I'll see if I have a non-ARM SBC I can test on and attempt to replicate the issue.
from gphoto2.
The same problem happens on an intel platform (intel edison)
I suspect that it is a problem with this particular camera model and not an issue with the ARM platform.
I am 95% confident that the issue is with the image delete. The first image is grabbed, the delete happens, second image fails because something is hung up. Since second image fails and doesn't trigger a delete, the third image succeeds, and so on.
from gphoto2.
The issue is in the driver.... It detects new images currently by taking filesystem snapshots and comparing them. If the difference is more than 1 image, only the first image is returned and the rest will be silently ignored.
I need to change this logic a bit, or add new.
from gphoto2.
Understood. This does happen when creating single images (RAW only) as well. When you say "difference is more than 1 image" does that mean that the change due to the file being deleted from the previous capture operation counts as one change and the new file from the current capture counts as a second, and thus there is an issue?
from gphoto2.
The issue is in the driver.... It detects new images currently by taking filesystem snapshots and comparing them. If the difference is more than 1 image, only the first image is returned and the rest will be silently ignored.
I need to change this logic a bit, or add new.
I may have stumbled upon similar problem and here's my proposed fix. May I kindly ask you to have a look? indilib/indi-3rdparty#151
from gphoto2.
I'm experiencing the same issue. Is there any workaround?
Canon 70D (firmware 1.1.2) is set to capture RAW+JPG and downloading the JPG images but every second results in file not found error.
The issue is in the driver.... It detects new images currently by taking filesystem snapshots and comparing them. If the difference is more than 1 image, only the first image is returned and the rest will be silently ignored.
Is there a way to force this snapshot to be retaken?
Thank you
from gphoto2.
Same issue here, Canon EOS 20D, Intel processor.
Running gphoto2 in verbose mode, the first time it is called works fine.
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.27 gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2 2.5.27 standard camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking
Detected a 'Canon:EOS 20D (normal mode)'.
New file is in location /DCIM/496CANON/IMG_9657.CR2 on the camera
Saving file as IMG_9657.CR2
Deleting file /DCIM/496CANON/IMG_9657.CR2 on the camera
The second time that it's called, it seems it's an issue with accessing the file on the camera, as it captures the image fine, but then hangs when it tries to detect the location on the new file:
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.27 gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2 2.5.27 standard camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking
Detected a 'Canon:EOS 20D (normal mode)'.
gphoto2 never returns from this call, so subsequent crontab calls to gphoto2 find the resource busy.
But the error it returns is actually related to the image capture. If I run gphoto2 in verbose mode and then cancel when it hangs, this is the error which I receive.
Error capturing image
ERROR: Could not capture image.
ERROR: Could not capture.
*** Error (-114: 'OS error in camera communication') ***
In fact, running gphoto2 --capture-image-and-download
immediately followed by gphoto2 -capture-image
results in the same hanging behavior. However, gphoto2 -capture-image
can be run repeatedly with no issue. So it's an issue with triggering the capture after a file has been deleted.
I've got a hacked solution which works for me. Put the following code into a bash script and call this instead of gphoto2 --capture-image-and-download
. You'll need to know the shutter speed to give adequate time for image capture and the folder in which image is being saved on the camera.
#/bin/bash
cd /path/to/directory/on/computer
FOLDERNAME=/DCIM/1000
SHUTTERSPEED=10
# Capture image
gphoto2 --capture-image --folder=$FOLDERNAME -v&
# Wait for capture, kill hanging process
sleep $SHUTTERSPEED; pkill -f gphoto2;
# Short wait to ensure process is killed
sleep 1;
# Next two lines obtains the last collected image number.
NUMBERSTRING=$( gphoto2 --num-files --folder=$FOLDERNAME | grep --only-matching :.*[[:digit:]*] )
NUMBER=${NUMBERSTRING:2}
# Obtain the image from the camera
gphoto2 --get-file=$NUMBER --filename %Y%m%dT%H%M%S.%C --folder=$FOLDERNAM
E
# Delete the image from the camera
gphoto2 --delete-file=$NUMBER --folder=$FOLDERNAME
from gphoto2.
Related Issues (20)
- Long capture-image-and-download , trigger-capture times - 40s+ HOT 9
- Zoom level values HOT 2
- problem on canon eos very slow or stop after several takes if objective present HOT 3
- Canon 700D Unspecified error HOT 4
- Can't use capture image in SonyA7III HOT 3
- EOS7D No sound on video streaming HOT 1
- Canon EOS R7 Error 0x2019: Périphérique PTP occupé
- Gphoto2 saving image in buffer of camera
- Add support for Nikon Zf HOT 2
- Capture fails on Sony A7R 5 HOT 2
- Capture-Image significantly slowing down as SD card fills (Panasonic GH5)
- Nikon P1000 power zoom support
- Command --get-all-files with --filename=%Y%m%d%H%M.jpg returns a datetime that is 3 hours later than system time
- Nikon DSC D3x(PTP mode) PTP Parameter Not Supported
- Windows Issue via MINGW64 / WinUSB HOT 1
- Problème d'import
- Fuji GFX 50R --capture-tethered seems to freeze camera
- Panasonic DMC-TZ8 , TZ15, TZ18 supported. What about TZ10 , TZ71 and the old DMC-G3 ??
- Can you please add support for WeMacro Rail?
- Could not capture image with Sony A7RV HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gphoto2.