Open benjyl opened 1 year ago
you need to have them set-config movie=1 ... wait and --set-config movie=0 in one command.
As soon as gphoto2 commandline tool exits it sends "close session" commands to the camera and the movie capture terminates at this time already.
Ah Thanks. What's the syntax to do it all in 1 command? I am unfamiliar with the library and have never seen more than 1 setting changed in a single command
you had in the first comment:
gphoto2 --set-config movie=1 --wait-event=10s --set-config movie=0 --wait-event-and-download=2s
:)
Ah ok, I didn't realise I could do that all within one step in python.
Out of curiosity, I'm looking at taking this further, trying to get the camera to start recording and turn off when a signal is generated and sent to the raspberry pi it is plugged in to. Starting the recording is no problem, just an if statement, but given that I can only use one statement to keep the recording going for a certain amount of time, is there a way of changing the 10s recording time to continuous until a pin changes state and if so how does the syntax change? Otherwise I assume ctrl C is the only way of stopping the recording?
Thanks
I am trying to create a python script that triggesr a video recording that saves to a Nikon D7200 SD card.
I tried using the command line code to see if the video could be recorded
gphoto2 --set-config movie=1 --wait-event=10s --set-config movie=0 --wait-event-and-download=2s
but received an error "Failed to se new configuration value 0 for configuration entry movie".I also tried running the following python script:
The script opens the camera, starts the recording and then stops the recording after around 1s of the wait event (I added a print statement after the wait event that only appeared after 10s) and it always happened after 1s, no matter how long I made the wait-event so something appears to be going wrong during this time.
The following came out in the terminal, I don't know if it is useful.
Does anyone know what might be causing the issue and how to solve it?
Thanks