Insta360Develop / Insta360_OSC

36 stars 4 forks source link

Insta360 OSC Get-Started

中文文档

Overview

Insta360 OSC is implemented based on Google OSC Note When your client connected to the AP of Insta360 ONE X、X2、X3、ONE R、ONE RS ,the ip address of the camera is:192.168.42.1 Strongly recommended : Never send osc/commands request before you get the response of the previous one

Get Camera Info

_sensorModuleType : Indicates the current lens module type of the camera, only supported on ONE R. Available values are 4K, 4K_Selfie,Dual_Fisheye,Leica,Leica_Selfie. The Selfie suffix indicates the lens is facing the same direction with touch screen.

{
    "name": "camera.getOptions",
    "state": "done",
    "results": {
        "options": {
            "iso": 100,
            "isoSupport": [
                0,
                100,
                125,
                160,
                200,
                250,
                320,
                400,
                500,
                640,
                800,
                1000,
                1250,
                1600,
                2000,
                2500,
                3200
            ],
            "shutterSpeed": 0.001000,
            "shutterSpeedSupport": [
                0,
                120,
                100,
                80,
                60,
                50,
                40,
                30,
                15,
                8,
                2,
                1,
                0.500000,
                0.200000,
                0.100000,
                0.066660,
                0.033330,
                0.020000,
                0.016660,
                0.010000,
                0.008330,
                0.002000,
                0.001000,
                0.000500,
                0.000250,
                0.000125
            ],
            "hdr": "off",
            "hdrSupport": [
                "off",
                "hdr"
            ],
            "totalSpace": 0,
            "remainingSpace": 0,
            "photoStitching": "none",
            "photoStitchingSupport": [
                "none",
                "ondevice"
            ],
            "captureInterval": 3000,
            "captureIntervalSupport": {
                "minInterval": 3,
                "maxInterval": 120
            },
            "captureMode": "image",
            "_videoType": "normal",
            "_videoTypeSupport": [
                "normal",
                "timelapse"
            ],
            "_timelapseResolution": "5.7K",
            "_timelapseResolutionSupport": [
                "5.7K",
                "8K"
            ],
            "_timelapseInterval": 4000,
            "_timelapseIntervalSupport": [
                200,
                500,
                1000,
                2000,
                4000,
                10000,
                30000,
                60000,
                120000
            ],
            "exposureProgram": 2,
            "exposureDelay": 0,
            "exposureDelaySupport": [
                0,
                3,
                5,
                10,
                15,
                0
            ],
            "_topBottomCorrection": {
                "_topBottomCorrection": 0
            },
            "whiteBalance": "auto",
            "whiteBalanceSupport": [
                "auto",
                "incandescent",
                "fluorescent",
                "daylight",
                "cloudy-daylight"
            ],
            "_dateTime": "2023:03:23 16:05:41",
            "_MuteEnable": {
                "_MuteEnable": 0
            },
            "_batteryCapacity": {
                "powerType": 1,
                "powerLevel": 100
            },
            "_sysTimestamp": 60427274
        }
    }
}

camera.getOptions response example (with error):

{
    "name": "camera.getOptions",
    "state": "error",
    "error": {
        "code": "invalidParameterName ",
        "message": "parameter is not supported."
    }
}

After successfully connected to the camera,execute camera.getOptions to know if the camera firmware support on-device stitching.

{
  "name":"camera.getOptions",
  "parameters": {
      "optionNames": [
          "photoStitchingSupport",
          "photoStitching"
      ]
  }
}

If the on-device stitching is supported, the response will be like below. Otherwise, the response may contain error or photoStitchingSupport only has value none.

{
  "results": {
      "options": {
           "photoStitchingSupport":["none","ondevice"],
           "photoStitching":"none"
      }
  }
}

iso: value of current iso isoSupport: list of supported iso values hdrSpport: list of supported hdr values hdr: current hdr value totalSpace: total SDcard space in byte remainingSpace: remaining space in byte photoStitchingSupport: list of supported photoStitching modes photoStitching: current photoStitching mode captureIntervalInterval photo time captureIntervalSupportTime Range Supported by Interval photo captureModecapture mode _videoTypevideo submode _videoTypeSupportlist of video submodes _timelapseResolutiontimelapse resolution _timelapseResolutionSupportList of available timelapse resolutions _timelapseIntervaltimelapse interval in millisecond _timelapseIntervalSupportlist of times available for timeLapse exposureProgramExposure mode, 1 -> manual Manual, 2 -> automatic Normal Program, 4 -> shutter priority ShutterPriority, 9 -> ISO priority ISOPriority exposureDelayExposure delay time, after starting shooting, delay for a certain period of time before exposing exposureDelaySupportList of supported exposure delay times _topBottomCorrectionPhoto Level Correction Switch whiteBalanceThe mode name of the current white balance whiteBalanceSupportList supported white balance settings _dateTimeTime format "YYYY:MM:DD HH:MM:SS", for example: "2022:05:06 17:56:15" _MuteEnableMute setting, 0 is no mute, 1 is mute _batteryCapacity"powerType": 0 charging status, 0 means not charging, 1 means charging "powerLevel": 100 battery percentage 100 means 100%, 0 means no battery _sysTimestampSystem timestamp in microseconds(us)

SetOptions/GetOptions allows you to query/set options as need, just put required options in the optionsName array

TakePicture

setOptions

takePicture

check capture status

Get file url and download

Delete the photo (optional)

Get File Lists

Recording

setOptions

startCapture

stopCapture

  1. Timelapse mode needs to be set before taking pictures
{
    "name":"camera.setOptions",
    "parameters":{
        "options":{
            "captureMode":"video",
            "_videoType":"timelapse",
            "_timelapseInterval":1000
        }
    }
}
  1. Start capture
{
    "name":"camera.startCapture"
}

stopTimelapse