-
Notifications
You must be signed in to change notification settings - Fork 17
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
VideoCaptureContext #14
Comments
Can you configure the logger to use the
|
The test script looks like this: import time
import gphoto2cffi as gp
import logging
logging.basicConfig(level = logging.DEBUG)
camera = gp.Camera()
context = gp.gphoto2.VideoCaptureContext(camera)
time.sleep(5)
context.stop() When I run python test_camera.py, the camera takes a 1 second video which is saved to the camera memory card. There is no output at all until about 10 seconds after the camera has clicked a second time, then I get:
Until I hit Ctl-C. I can use the gphoto2 command line to record an unlimited video:
will record video until I hit Ctl-C. |
Thank you for the details, I will have a look at the gphoto2 source code and see if I'm doing anything different/wrong when recording videos. |
I have debug output from the command line if that would help. Hank Sent from an iPhone....
|
Since I don't have your camera at home, that would help a great deal :-) |
Here is a link gphoto2 --set-config movie=1 --wait-event --set-config movie =0 --debug Hank On 2016-09-19 8:29 AM, Johannes Baiter wrote:
|
Is there a way to capture the debug info from libgphoto2 using the cffi wrapper? The logging command I used above only seems to get the Python log output. It would be useful to see what the underlying library is doing. |
You're right! I was convinced that I had already implemented this, but it turns out I did only half the work: The logging callback was defined, but never registered with the library! I now fixed this, so please install the latest version from github, set your logging level to DEBUG and see what the library says :-) |
Here is a link to debug output: https://docs.google.com/document/d/1EEEvzcrGHz7WSdN93y9vYzE0lXtBVnCtELTX7zlJL80/edit?usp=sharing There is an INFO:root log message where I instantiate the VideoCaptureContext, then another after that call returns. There are over 100 pages of output between the 2 root log messages, I'm not sure how to read it quickly! Does this help?? |
@hknox Sorry for not responding to your issue, I got a bit swamped in September/October and unfortunately this issue fell under the table :-( Could you please re-upload your log? |
Hello. I am trying to control a Nikon D750 from a Python script. I want to be able to start video recording, wait for something to happen elsewhere in my script, then stop the video recording. I have tried something like this:
This causes the camera to record video for 1 second then stop. When the code gets to "context.stop()", it hangs.
Any thoughts about what I might be doing wrong?
Python 2.7.12
libgphoto2 2. 5.10
gphoto2cffi 0.3~a1-1
Thanks, Hank
The text was updated successfully, but these errors were encountered: