Files
Saddle-Drone-Client/conn_test.py
Luke Ogburn a3c3790781 updating
2021-03-31 09:11:41 -04:00

20 lines
430 B
Python

import os
from signal import signal, SIGINT
from goprocam import GoProCamera, constants
seconds = 4
# helps with video recording
def handler(s, f):
gopro.stopWebcam()
quit()
def takeVideo(time):
signal(SIGINT, handler)
gopro = GoProCamera.GoPro()
gopro.shoot_video(time)
gopro.downloadLastMedia(custom_filename=(location+"plaintext/" + numFiles() + ".mp4"))
gopro.delete("last")
takeVideo(seconds)