How to use the goprocam.constants.Video function in goprocam

To help you get started, we’ve selected a few goprocam examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KonradIT / gopro-py-api / goprocam / GoProCamera.py View on Github external
def video_settings(self, res, fps="none"):
        """Change video resolution and FPS
        See constants.Video.Resolution"""
        if self.whichCam() == constants.Camera.Interface.GPControl:
            x = "constants.Video.Resolution.R" + res
            videoRes = eval(x)
            return self.gpControlSet(constants.Video.RESOLUTION, videoRes)
            if fps != "none":
                x = "constants.Video.FrameRate.FR" + fps
                videoFps = eval(x)
                return self.gpControlSet(constants.Video.FRAME_RATE, videoFps)
        elif self.whichCam() == constants.Camera.Interface.Auth:
            if res == "4k":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "06")
            elif res == "4K_Widescreen":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "08")
            elif res == "2kCin":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "07")
            elif res == "2_7k":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "05")
            elif res == "1440p":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "04")
github KonradIT / gopro-py-api / goprocam / GoProCamera.py View on Github external
def video_settings(self, res, fps="none"):
        """Change video resolution and FPS
        See constants.Video.Resolution"""
        if self.whichCam() == constants.Camera.Interface.GPControl:
            x = "constants.Video.Resolution.R" + res
            videoRes = eval(x)
            return self.gpControlSet(constants.Video.RESOLUTION, videoRes)
            if fps != "none":
                x = "constants.Video.FrameRate.FR" + fps
                videoFps = eval(x)
                return self.gpControlSet(constants.Video.FRAME_RATE, videoFps)
        elif self.whichCam() == constants.Camera.Interface.Auth:
            if res == "4k":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "06")
            elif res == "4K_Widescreen":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "08")
            elif res == "2kCin":
                return self.sendCamera(
                    constants.Hero3Commands.VIDEO_RESOLUTION, "07")
            elif res == "2_7k":
                return self.sendCamera(
github KonradIT / gopro-py-api / goprocam / GoProCamera.py View on Github external
def overview(self):
        if self.whichCam() == constants.Camera.Interface.GPControl:
            print("camera overview")
            print("current mode: " + "" + self.parse_value("mode",
                                                           self.getStatus(constants.Status.Status, constants.Status.STATUS.Mode)))
            print("current submode: " + "" + self.parse_value("sub_mode",
                                                              self.getStatus(constants.Status.Status, constants.Status.STATUS.SubMode)))
            print("current video resolution: " + "" + self.parse_value("video_res",
                                                                       self.getStatus(constants.Status.Settings, constants.Video.RESOLUTION)))
            print("current video framerate: " + "" + self.parse_value("video_fr",
                                                                      self.getStatus(constants.Status.Settings, constants.Video.FRAME_RATE)))
            print("pictures taken: " + "" + str(self.getStatus(constants.Status.Status,
                                                               constants.Status.STATUS.PhotosTaken)))
            print("videos taken: ",	 "" + str(self.getStatus(constants.Status.Status,
                                                             constants.Status.STATUS.VideosTaken)))
            print("videos left: " + "" + self.parse_value("video_left",
                                                          self.getStatus(constants.Status.Status, constants.Status.STATUS.RemVideoTime)))
            print("pictures left: " + "" + str(self.getStatus(constants.Status.Status,
                                                              constants.Status.STATUS.RemPhotos)))
            print("battery left: " + "" + self.parse_value("battery",
                                                           self.getStatus(constants.Status.Status, constants.Status.STATUS.BatteryLevel)))
            print("space left in sd card: " + "" + self.parse_value("rem_space",
                                                                    self.getStatus(constants.Status.Status, constants.Status.STATUS.RemainingSpace)))
            print("camera SSID: " + "" + str(self.getStatus(constants.Status.Status,
                                                            constants.Status.STATUS.CamName)))
            print("Is Recording: " + "" + self.parse_value("recording",
                                                           self.getStatus(constants.Status.Status, constants.Status.STATUS.IsRecording)))