Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long capture-image-and-download , trigger-capture times - 40s+ #622

Open
tomtomhoward opened this issue Jan 21, 2024 · 9 comments
Open

Long capture-image-and-download , trigger-capture times - 40s+ #622

tomtomhoward opened this issue Jan 21, 2024 · 9 comments
Assignees
Labels
Nikon tagging Nikon reports

Comments

@tomtomhoward
Copy link

tomtomhoward commented Jan 21, 2024

I've got big delays on trying to use capture-image-and-download, it's usually over 30s and can be longer.

Using Nikon Coolpix L810 (PTP mode) , on OSX 14.2.1.

It's gphoto2 homebrew install, should be up to date....

gphoto2 2.5.28 clang, popt(m), exif, no cdk, no aa, jpeg, readline
libgphoto2 2.5.31 standard camlibs, clang, no ltdl, EXIF
libgphoto2_port 0.12.2 iolibs: disk ptpip serial usb1, clang, no ltdl, EXIF, USB, serial without locking

I'm not sure if this is expected OSX behaviour as I'm assuming it won't be as snappy as linux?
Or if there's anything in my installation that isn't right for this setup - I have standard camlibs, but there doesn't seem to be Nikon in the extended - I assume they use PTP libraries?

Or if there is another camera I can try to improve behaviour? I'm going to try a few different cameras to see if I can improve behaviour just by using a different camera.

I'm trying to remove the delays and recompile as per some other suggestions, I can download the .tar.gz and make the edit but I cannot get it to compile and install on OSX.
I've tried using trigger-capture and wait-for-event as a workaround, but I'm not getting anything faster with those. I don't need mad fast but ideally I'd like to get it down to under 5s for what I'm doing - trying to interval 3 pictures in about 15s. I can do the download after if I can do three trigger-captures and run the download after....
trigger-capture seems to work within about 6s the first time then either be a very long wait or fail subsequent times.

Attached logs

captureimageanddownload-33s.log
triggercapture-6s-firsttime.log
triggercapture-failed.log

@tomtomhoward
Copy link
Author

tomtomhoward commented Jan 21, 2024

I've found something.... the trigger-capture runs quickly every time if the camera is turned on and off. I had assumed it was a terminal restart that was needed, but its a camera restart that clears it. I'm trying to find something to clear / disconnect the camera, or I could hack the power button and switch it on & off with a contact but that's a bit of a bodge....

There is also strange behaviour with the power button on the camera - after the 2nd trigger-capture has failed, the power button on the camera won't work - ie the camera appears to be crashed.
This seems to correlate incidentally with the motorised lens - if the lens is retracted, when trigger-capture is run, it extracts, takes & stays there. When it's run the 2nd time and lens is already out, it fails - but this may be related to the turning on & off and the lens is just influenced by the same thing...

@msmeissn msmeissn self-assigned this Jan 22, 2024
@msmeissn msmeissn added the Nikon tagging Nikon reports label Jan 22, 2024
@msmeissn
Copy link
Contributor

you can try to adjust the L810 entry in library.c:
{"Nikon:Coolpix L810 (PTP mode)",0x04b0, 0x032f, PTP_CAP|PTP_NIKON_BROKEN_CAP},

this might avoid the wait times.

@msmeissn
Copy link
Contributor

/(e.g. add |PTP_NIKON_BROKEN_CAP there)

@tomtomhoward
Copy link
Author

tomtomhoward commented Jan 22, 2024

Thanks I've got that in camlibs/ptp2/library.c

I'm really struggling with compiling on OSX as I just can't get it to work with a local compile. There's no way to pass this as an argument is there?
I'll try make a Home-brew patch if possible - I cannot get it to compile manually on OSX at all.
(I'm not actually sure how to build & link it, I've tried Congifure > Make > Make install but I've got loads of permission problems in Sonoma - I'm not sure if it will install with make errors or not)

@msmeissn
Copy link
Contributor

i think we cannot override this without rebuilding currently :(

@msmeissn
Copy link
Contributor

make should work, make install might need "sudo make install" ?

@tomtomhoward
Copy link
Author

tomtomhoward commented Jan 22, 2024

I have got this built now... I had to use sudo make and sudo make install - without sudo make the library was only installing a few files and not all...
Unfortunately though it makes no difference to the timings for the 2nd shot - it still only does a shot within a reasonable time when the camera is first started up.

I've attached log files for capture-image-and-download for two shots, I turn camera off, run firstshot.log, immediately run command again to secondshot.log

firstshot.log
secondshot.log

@tomtomhoward
Copy link
Author

tomtomhoward commented Jan 22, 2024

first is under 7s, second is 26s
I have uninstalled the ghoto2 homebrew install and am running an absolute file path for gphoto2 so pretty sure I'm running on the new code

I think this is a lock-up camera side between the first and second shots - the camera doesn't respond for about 25s after a shot is taken. The camera won't turn off in this time and appears frozen - I've tried --reset between shots and anything I can think of but it takes the time to respond to --reset also.

@tomtomhoward
Copy link
Author

I've fixed the problem by buying a Canon 1000D, and I'm down to 1.8s for capture-image with manual focus and 3.5s with auto-focus on the camera.

I'm having a slight problem with ptpcamerad starting and hogging the camera after a while that I wasn't with the Nikon, but running as Sudo circumvents that. Not ideal but it works - will try work on disabling ptpcamerad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Nikon tagging Nikon reports
Projects
None yet
Development

No branches or pull requests

2 participants