-
Notifications
You must be signed in to change notification settings - Fork 317
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
Focus manipulation during live streaming video #62
Comments
Hi, I'm using libgphoto2 directly in C and by patching libgphoto2 I'm able to get live view while the camera is focusing. I had to patch libgphoto2 because there is an explicit "sleep" in the libgphoto2 code when you ask autofocus. I suspect that not all camera send the liveview while focusing. But in my case, it works. |
here the code I updated : https://github.com/gphoto/libgphoto2/blob/master/camlibs/ptp2/config.c#L5123 |
@mfk-smart technically you can only have 1 ptp session open with the device at any point in time as there is just one usb session concept (and it uses incrementing sequence numbers, so a new one will either not work, or abort the first). So for specific work in parallel you would need a single program that handles both. @rlamarche the sleep was there to get the result of the focusing and if the camera returns busy it might not allow other operations ... it seems it does allow some operations, so the code might need to be revisitied |
Thank you for the explanation @msmeissn . Indeed I'm able to get liveview while focusing, but I don't know if any other operation is possible. Moreover I've only a Nikon D800 to test. That's why I keep it as a patch for the moment. |
Hmm so this is still not possible using only gphoto2's CLI application? Does anyone know an application built on top of libgphoto2 (as mentioned by @rlamarche) that allows to send commands (not just autofocus but in general) to the camera while streaming video? |
Hi,
I can stream live image from my EOS camera with the following command :
gphoto2 --capture-movie --stdout | ffmpeg -i pipe:0 http://localhost:8080/feed1.ffm
Also I can do focus manipulation with the following command :
gphoto2 --set-config-index manualfocusdrive=6
Is it technically possible to do these both at the same time in Python or C by using gphoto2?
Thanks!
mfk
The text was updated successfully, but these errors were encountered: