### Start Recording Request Parameters - JSON Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_record_cmd.md This JSON object defines the parameters required to initiate video recording using the `camera._startRecording` command. It includes settings for the original video stream (resolution, framerate, bitrate, HDR, storage location), stitched video output (mode, resolution, framerate, bitrate), and audio settings (mime type, sample format, channels, sample rate, bitrate). ```JSON { "name": "camera._startRecording", "parameters":{ "origin": { "mime":string, "width":int, "height":int, "framerate":int, "bitrate":int, "logMode":int, "hdr":bool, "saveOrigin":bool, "storage_loc":int }, "stiching": { "mode":sting, "mime":string, "width":int, "height":int, "framerate":int, "bitrate":int }, "audio":{ "mime":string, "sampleFormat":string, "channelLayout":string, "samplerate":int, "bitrate":int } } } ``` -------------------------------- ### Sample Request for Starting Preview Stream (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_preview_cmd.md This JSON object provides a sample request payload for the `camera._startPreview` command, demonstrating how to configure `origin` and `stiching` parameters for video output, and includes an option for stabilization. ```json { "name": "camera._startPreview", "parameters":{ "origin":{ "mime":"h264", "width":1920, "height":1440, "framerate":30, "bitrate":20480 }, "stiching":{ "mode":"pano", "mime":"h264", "width":3840, "height":1920, "framerate":30, "bitrate":10240 } }, "stabilization":true } ``` -------------------------------- ### Starting Live Stream: camera._startLive Response (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_live_cmd.md This JSON object represents the expected response from the `camera._startLive` API command. It indicates the state of the operation and provides the `_liveUrl` in the results, which is the URL for the live stream. ```JSON { "name":"camera._startLive", "state":"done", "results":{"_liveUrl":null} } ``` -------------------------------- ### Example Success Response for Camera Connect Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/overview.md This JSON object demonstrates a successful response from a command execution, indicating a 'done' state and including a 'results' object that contains data returned by the command. ```JSON { "name":"camera._connect", "state":"done", "results":{ //results contains the data returned by the command. ... } } ``` -------------------------------- ### Example Failure Response for Camera Connect Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/overview.md This JSON object shows a command response indicating an 'exception' state, providing an 'error' object with a specific code and description for detailed failure information. ```JSON { "name":"camera._connect", "state":"exception", "error":{ //error object contains the detailed error "code":-1, //error code "description":"The camera has been taken by another client." //error description } } ``` -------------------------------- ### `get_result` Command Example Response for `_stopRecording` (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/async_command_handling.md This JSON snippet provides a concrete example of the `camera._getResult` command's response, illustrating the outcome for a `camera._stopRecording` command. It includes the `sequence` ID, the command's name (`camera._stopRecording`), and its final `results` which contain the `_picUrl` property, indicating the URL of the captured media (despite the command name suggesting video, the result shows a picture URL). ```json { "name":"camera._getResult", "results":{//results of get_result command "res_array":[ { "id":int, //the sequence stop_record command "name":"camera._stopRecording", //name of the async command "results":{ //the origin command response "state":"done", "results": {//the origin command results "_picUrl":string } } } ] } } ``` -------------------------------- ### Starting Live Stream: camera._startLive Request (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_live_cmd.md This JSON object defines the parameters for the `camera._startLive` API command. It allows configuration of 'origin' (fisheye streams), 'stiching' (stitched stream, for normal mode only), 'audio' settings, and 'autoConnect' behavior. The 'stiching' parameter should not be passed in 'origin live' mode. ```JSON { "name": "camera._startLive", "parameters":{ "origin":{ "mime":null, "width":null, "height":null, "framerate":null, "bitrate":null, "logMode":null, "liveUrl":null, "saveOrigin":null }, "stiching":{ "mode":null, "mime":null, "width":null, "height":null, "framerate":null, "bitrate":null, "map":null, "_liveUrl":null, "liveOnHdmi":null, "fileSave":null }, "audio":{ "mime":null, "sampleFormat":null, "channelLayout":null, "samplerate":null, "bitrate":null } }, "autoConnect":{ "enable":null, "interval":null, "count":null }, "stabilization":null } ``` -------------------------------- ### Example Request Body for Camera Connect Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/overview.md This JSON object illustrates the typical structure of a command request body, specifying the command name 'camera._connect' and its associated parameters, such as hardware time and time zone settings. ```JSON { "name": "camera._connect", "parameters":{ "hw_time":"MMDDhhmm[[CC]YY][.ss]", "time_zone":"GMT+08:00/GMT-08:00" } } ``` -------------------------------- ### Response Format for Start Preview Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_preview_cmd.md This JSON object outlines the expected response structure for the `camera._startPreview` command, indicating the command name, state, and the `_previewUrl` result which contains the absolute RTMP URL for playback. ```json { "name":"camera._startPreview", "state":"done", "results":{ "_previewUrl":string } } ``` -------------------------------- ### Requesting Image Parameters from Insta360 Camera API (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/get_image_param_cmd.md This JSON object represents the request body for the `camera._getImageParam` command. It is used to retrieve all current image parameters from the Insta360 camera and requires no additional parameters in the request. ```json { "name":"camera._getImageParam" } ``` -------------------------------- ### Receiving Image Parameters from Insta360 Camera API (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/get_image_param_cmd.md This JSON object represents the successful response from the `camera._getImageParam` command. It returns a `results` object containing various image parameters such as `aaa_mode`, `wb`, `iso_value`, `shutter_value`, and more, each with its corresponding integer value. ```json { "name":"camera._getImageParam", "state":"done", "results":{ "aaa_mode":int, "wb":int, "iso_value":int, "shutter_value":int, "brightness":int, "contrast":int, "saturation":int, "hue":int, "sharpness":int, "ev_bias":int, "ae_meter":int, "dig_effect":int, "flicker":int } } ``` -------------------------------- ### Insta360 Camera Connection - JSON Response Source: https://github.com/insta360develop/procameraapi/blob/master/commands/connect_cmd.md This JSON object details the response received after a successful `camera._connect` command. It includes the camera's model (`machine`), system information (`sys_info`), a session `Fingerprint`, and various configuration options for live, preview, record, and audio streams, along with `url_list` and `last_info`. ```json { "name":"camera._connect", "state":"done", "machine":"pro2", "results":{ "Fingerprint":"string", "_cam_state":0, "url_list":{ "_liveUrl": "string", "_previewUrl": "string", "_recordUrl": "string" }, "last_info":{ "state":"string", "version":"string", "moduleVersion":"string", "origin":{ "width":0, "height":0, "framerate":0, "bitrate":0, "mime":"string", "saveOrigin":false }, "preview":{ "width":0, "height":0, "framerate":0, "bitrate":0, "mime":"string" }, "live":{ "width":0, "height":0, "framerate":0, "bitrate":0, "mime":"string", "url":"string", "timePast":0, "timeLeft":0, "liveOnHdmi":false }, "record":{ "width":0, "height":0, "framerate":0, "bitrate":0, "mime":"string", "url":"string", "timePast":0, "timeLeft":0 }, "audio":{ "mime":"string", "sampleFormat":"string", "channelLayout":"string", "samplerate":0, "bitrate":0 }, "sys_info":{ "k_v": "6.0", "r_v":"'000", "p_v":"'1.00May 192017", "sn":"'xxxxxx", "h_v":"V0.9.0_2017.5.16" } } } } ``` -------------------------------- ### Defining Audio Capture Options (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_preview_cmd.md This JSON object describes the audio capture settings, including MIME type, sample format, channel layout, sample rate, and bitrate for the audio stream. ```json { "mime":'aac', "sampleFormat":'s16', "channelLayout":'stereo', "samplerate":48000, "bitrate":128 } ``` -------------------------------- ### Batch Camera Option Setting Response with Error Details (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/set_options_cmd.md This JSON object is the response for a batch option setting request. If all options are set successfully, the `state` is 'done'. If any option fails, the `state` becomes 'error', and the `results` object provides a `detail` array with specific error `code` and `description` for each failed `property`. ```JSON { "name":"camera._setOptions", "state":"done",//if any option failed, the state is error and the detailed error is described in results. "results": { "detail":[ { "property":string, "code":int, "description":string } ] } } ``` -------------------------------- ### Requesting Camera Options (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/get_options_cmd.md This JSON snippet illustrates the request format for the `camera._getOptions` command. It requires a `property` parameter, which is a string specifying the name of the option to retrieve from the camera. ```JSON { "name":"camera._getOptions", "parameters": { "property":string } } ``` -------------------------------- ### Defining On-Board Stitching Output (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_preview_cmd.md This JSON object specifies the parameters for on-board stitching output, including the stitching mode (e.g., pano, 3D), output MIME type, dimensions, framerate, and bitrate. Note the intentional typo 'stiching' for compatibility. ```json { "mode":string, "mime":string, "width":int, "height":int, "framerate":float, "bitrate":float } ``` -------------------------------- ### Requesting Batch Camera Option Setting (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/set_options_cmd.md This JSON structure outlines a request to set multiple camera options simultaneously. The `parameters` field is an array, where each element is an object specifying a `property` and its `value`, allowing for efficient bulk configuration. ```JSON { "name":"camera._setOptions", "parameters":[ { "property":string, "value"://depends on property, may be int,string,array or object },{ "property":string, "value"://depends on property, may be int,string,array or object } ] } ``` -------------------------------- ### Defining Origin Capture Options (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/start_preview_cmd.md This JSON object defines the capture options for each camera lens, including output MIME type, dimensions, framerate, bitrate, and whether to save the original fisheye video/image. ```json { "mime":string, "width":int, "height":int, "framerate":float, "bitrate":float, "saveOrigin":bool } ``` -------------------------------- ### Receiving Camera Options Response (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/get_options_cmd.md This JSON snippet shows the expected response structure for the `camera._getOptions` command. The `value` field in the `results` object will contain the retrieved option's data, which can be an integer, string, array, or object depending on the specific property requested. ```JSON { "name":"camera._getOptions", "state":"done", "results":{ "value": depends on property } } ``` -------------------------------- ### Handling camera._listFiles Asynchronous Response (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/list_files.md This JSON snippet illustrates the asynchronous response structure for the `camera._listFiles` command. It indicates the command's `name`, its completion `state` as 'done', and a `sequence` integer for tracking the asynchronous operation. This response signifies that the command has finished processing, and its full result should be retrieved via the async command handling mechanism. ```JSON { "name": "camera._listFiles", "state": "done", "sequence":int //sequence id for async handling } ``` -------------------------------- ### Connecting to Insta360 Camera - JSON Request Source: https://github.com/insta360develop/procameraapi/blob/master/commands/connect_cmd.md This JSON object represents the request payload for the `camera._connect` command. It requires the client to synchronize its time with the camera by providing the `hw_time` (UTC time) and `time_zone` (GMT time zone string) parameters to establish a session. ```json { "name":"camera._connect", "parameters":{ "hw_time":"MMDDhhmm[[CC]YY][.ss]", "time_zone":"GTM time zone str" } } ``` -------------------------------- ### Requesting Single Camera Option Setting (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/set_options_cmd.md This JSON structure defines a request to set a single option on the camera. It specifies the `name` of the command and includes a `parameters` object containing the `property` to be set and its corresponding `value`, which can vary in type. ```JSON { "name":"camera._setOptions", "parameters": { "property":string, "value"://depends on property, may be int,string,array or object } } ``` -------------------------------- ### Requesting File List with camera._listFiles (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/list_files.md This JSON snippet defines the request payload for the `camera._listFiles` command. It includes the command `name` and a `parameters` object containing the `path` string, which specifies the storage location on the camera from which to retrieve the file list. The `path` value is typically found in the camera's state command response. ```JSON { "name":"camera._listFiles", "parameters":{ "path":string // you could find the path of the storage in the response of state command } } ``` -------------------------------- ### Successful Single Camera Option Setting Response (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/set_options_cmd.md This JSON object represents a successful response after setting a single camera option. It confirms the `name` of the command executed and indicates a `state` of 'done', signifying that the operation completed without errors. ```JSON { "name":"camera._setOptions", "state":"done" } ``` -------------------------------- ### Asynchronous `take_picture` Command Initial Response (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/async_command_handling.md This JSON snippet illustrates the immediate HTTP response received after initiating an asynchronous `take_picture` command. It indicates the command's name, its current state as 'done' (meaning the request was accepted), and a unique `sequence` ID. This `sequence` ID is crucial for later polling the camera's state and retrieving the actual result of the picture-taking operation. ```json { "name":"camera._takePicture", "state":"done", "sequence":int } ``` -------------------------------- ### `get_result` Command General Response Structure (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/async_command_handling.md This JSON snippet outlines the general structure of the response from the `camera._getResult` command. It contains a `results` object with `res_array`, an array of objects. Each object in `res_array` includes the `id` (sequence ID), the `name` of the original asynchronous command, and a nested `results` object containing the actual outcome of that command, typically including its `state`. ```json { "name":"camera._getResult", "results":{ "res_array":[ { "id":int, //the sequence id "name":string, //name of the async command "results":{ //the sync command results "state":"done", ... } } ] } } ``` -------------------------------- ### Request Payload for _takePicture Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/take_picture_cmd.md This JSON object defines the request parameters for the `_takePicture` command. It allows configuration of original image properties (`origin`), stitched image properties (`stiching`), and enables specific modes like `burst`, `hdr`, and `bracket` with their respective settings. A `delay` parameter can also be set. ```json { "name": "camera._takePicture", "parameters":{ "origin":{ "mime":"jpeg", "width":4000, //single fisheye image width, eg. 4000 "height":3000,//single fisheye image height, eg. 3000 "saveOrigin":true, "storage_loc":1 //works for Titan,0:save on TF card 1:save on Main storage }, "stiching":{ "mode":"pano", "mime":"jpeg", "width":7680, //stitched image width, eg. 8000 "height":3840, //stitched image height, eg.4000 "map":"equirectangular", "algorithm":"normal" //on-board stitching algorithm, available values are "opticalFlow" and "normal",default "normal" }, "burst":{"enable":bool, "count":int},//available for burst mode "hdr":{"enable":bool, "count":int, "min_ev":int, "max_ev":int}, // available for hdr mode, currently only support 3 pictures "bracket":{"enable":bool, "count":int, "min_ev":int, "max_ev":int}, //available for bracket mode "delay":int//delay in second before the camera actually execute the take picture command } } ``` -------------------------------- ### Asynchronous Response for _takePicture Command (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/take_picture_cmd.md This JSON object represents the asynchronous response for the `_takePicture` command. It indicates the command's `state` (e.g., "done") and provides a `sequence` ID for tracking the asynchronous operation, as detailed in the async command handling documentation. ```json { "name": "camera._takePicture", "state": "done", "sequence":int //sequence id for async handling } ``` -------------------------------- ### Stopping Camera Preview - Request JSON Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_preview_cmd.md This JSON object represents the request payload for initiating the `stop_preview` command. It specifies the command name `camera._stopPreview` to instruct the camera to cease its live preview. ```JSON { "name":"camera._stopPreview" } ``` -------------------------------- ### `get_result` Command Request Payload (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/async_command_handling.md This JSON snippet shows the request payload for the `camera._getResult` command. It requires a `parameters` object containing `list_ids`, which is an array of integer `sequence` IDs. These IDs correspond to the asynchronous tasks whose final results are being requested. ```json { "name":"camera._getResult", "parameters": { "list_ids":[int] //array of sequence you want to get result. } } ``` -------------------------------- ### Stopping Camera Preview - Response JSON Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_preview_cmd.md This JSON object is the expected response from the camera after successfully processing the `camera._stopPreview` command. It confirms the command name and indicates that the operation is `done`. ```JSON { "name":"camera._stopPreview", "state":"done" } ``` -------------------------------- ### Stopping Recording Response - JSON Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_record_cmd.md This JSON object is the response received from the camera after a successful `camera._stopRecording` command. It confirms the command name, indicates the `state` as 'done', and provides a `sequence` number for the operation. ```json { "name":"camera._stopRecording", "state":"done", "sequence":int } ``` -------------------------------- ### Stopping Live Stream: Request Payload (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_live_cmd.md This JSON object represents the request payload for the `camera._stopLive` command, used to initiate the process of stopping a live stream. The `name` field specifies the API command to be executed. ```json { "name":"camera._stopLive" } ``` -------------------------------- ### State Command JSON Response Structure Source: https://github.com/insta360develop/procameraapi/blob/master/state_polling.md This JSON object represents the detailed response from the camera's `state` command, providing real-time information about various camera parameters such as battery status, completed asynchronous commands, external device details, camera state mask, GPS status, timelapse progress, microphone information, estimated storage remaining, and current fan level. ```json { "_battery":{ "battery_level":float, "battery_charge":bool }, "_idRes": [int], // array of finished async command sequence "_external_dev":{ "entries":[string],//array of filepath on camera main storage "save_path":string //default save_path }, "_cam_state":int, //camera state mask "_gps_state":int, //0: no device; 1: no location, 2: 2d location; 3: 3d location "_tl_info":{//information for timelapse "tl_count":int //count of pictures taken }, "_snd_state":{//microphone information "dev_name":string, //name of the microphone device "type":int, //mic type,0:none;1:built-in mic; 2: 3.5mm mic; 3: usb mic; -1: unknown "is_spatial":bool //whether it is a spatial mic }, "_left_info":{//estimated storage information "_rec_left_sec":int, //left recording time in current recording mode, in seconds. "_live_rec_left_sec":int,//left recording time in live+recording mode, in seconds. }, "fan_level":int //fan level of the camera } ``` -------------------------------- ### Stopping Live Stream: Response Payload (JSON) Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_live_cmd.md This JSON object represents the expected response from the camera after successfully processing the `camera._stopLive` command. It includes the command `name`, the `state` indicating completion, and a `sequence` number for tracking the operation. ```json { "name":"camera._stopLive", "state":"done", "sequence":int } ``` -------------------------------- ### Stopping Recording Request - JSON Source: https://github.com/insta360develop/procameraapi/blob/master/commands/stop_record_cmd.md This JSON object represents the request payload sent to the camera to stop the current recording. It contains the command name `camera._stopRecording`. ```json { "name":"camera._stopRecording" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.