Difference between revisions of "iPi Automation Add-on"

From iPi Docs
Jump to: navigation, search
(open-studio)
Line 127: Line 127:
 
     "arguments":  
 
     "arguments":  
 
     {
 
     {
         "filePath": "D:\iPiMocap\test_record.iPiVideo"
+
         "filePath": "D:\\iPiMocap\\test_record.iPiVideo"
 
     }
 
     }
 
}
 
}

Revision as of 09:36, 2 December 2015

Overview

iPi Integration Add-on allows to control iPi Recorder and iPi Mocap Studio from external application by sending JSON commands via Windows dll. It can be used for:

Note.png
Note: iPi Integration Add-on requires separate license key, which you need to activate in iPi Mocap Studio. 30-days free trial provided.

License and Trial

iPi Integration Add-on requires separate license key, which you need to activate in iPi Mocap Studio. You can order your license here, or activate 30-days free trial. Follow the steps below to start working with iPi Integration Add-on

  1. Switch to Integration tab.
  2. Press Activate button
  3. Press Start 30-days Free Trial Period or Enter Integration License Key and follow further on-screen instructions
    iPi-Integration-2-1.png
Note.png
Note: To use iPi Integration Add-on with iPi Recorder, you have to install iPi Mocap Studio on the same computer and activate iPi Integration Add-on following the instructions above.

Using iPi Integration Add-on

Command Syntax

Commands are strings based on JSON syntax. Commands are submitted via JSON requests that include command name and may optionally include command arguments.

The response is also JSON string. The response include success flag. In case of error the response include error message. In case of success the response may optionally include result that is JSON object.

SYNOPSIS

// Request for command without arguments
{
    "command": "<command_name_string>"
}
 
// Request for command with arguments
{
    "command": "<command_name_string>",
    "arguments": 
    {
        <arguments_list_json_string>
    }
}
 
// Simple response in case of success
{
    "success": true
}
 
// Response including command result field in case of success
{
    "success": true,
    "result":
    {
      <result_json_string>
    } 
}
 
// Response in case of error
{
    "success": false,
    "error": "<error_message_string>"
}

iPi Recorder Commands

General Commands

get-app-info

get-app-info command returns the name of application and its version.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
appNamestringmandatoryiPi Recorder 3 Application name.
appVersionstringmandatoryVersion number in the format XX.XXX.XXX.XXX Application version number.

EXAMPLE

// Request
{
    "command": "get-app-info"
}
 
// Response
{
    "success":true,
    "result":
    {
        "appName": "iPi Recorder 3",
        "appVersion": "99.876.543.210"
    }
}

open-studio

open-studio command opens iPi Mocap Studio and creates the project from specified .iPiVideo file.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
filePathstringmandatoryValid file path Full path of .iPiVideo file.
Result
Empty result

EXAMPLE

// Request
{
    "command": "open-studio",
    "arguments": 
    {
        "filePath": "D:\\iPiMocap\\test_record.iPiVideo"
    }
}
 
// Response
{
    "success":true
}

exit

exit command closes iPi Recorder.

Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
No arguments
Result
Empty result

EXAMPLE

// Request
{
    "command": "exit"
}
 
// Response
{
    "success":true
}

Recording Commands

set-recorder-props

set-recorder-props command sets properties for setup, background and recording stages.

Tip.png
Tip: If property is not specified in command arguments, current value in user interface will be used.
Parameter NameTypeMandatory /
Optional
Allowed ValuesDescription
Arguments
Properties for SETUP Stage:
videoModestringoptional

Available modes depend on camera model.

Setting RGB video mode. You can see available modes in "Video Mode" combobox at SETUP stage, or get it in the result of get-recorder-props command.

audioModestringoptional

Available modes depend on microphone model.

Setting audio mode. You can see available modes in "Audio Mode" combobox at SETUP stage, or get it in the result of get-recorder-props command.

globalDevicePropsJSON object
optional

Device-specific list of properties visible in “SHARED SETTINGS” section of SETUP stage.

PlayStation Eye: Darkening for Calibrationstringoptional "None"
"Darkening"
"Extra Darkening"

Darkening mode for Sony PS3 Eye cameras

screensInRownumberoptionalInteger from 1 to number of cameras

Setting number of screens in a row for multiple camera video view.

screenLayoutstringoptional

For RGB cameras:
"Color"

For depth sensors:
"Depth"
"Picture in picture"
"Side by side"

Setting screen layout.

Properties for BACKGROUND Stage:
backgroundEvaluationDurationnumberoptionalInteger number of seconds from 2 to 10

Setting duration of background evaluation.

backgroundEvaluationStartDelaynumberoptionalInteger number of seconds from 0 to 30

Setting start delay for background evaluation.

showEvaluatedBackgroundbooleanoptionaltrue
false

Show background mode on / off.

Properties for RECORD Stage:
recordingStartDelaynumberoptionalInteger number of seconds from 0 to 60

Setting start delay for recording.

hideBackgroundWhenRecordingbooleanoptionaltrue
false

Show hide background mode on / off.

destinationFilePathstringoptional

Valid file path

Full path to destination file for recording.

colorCompressionstringoptional

"None"
"Background subtraction"
"JPEG"

Setting RGB video compression mode.

jpegQualitynumberoptionalinteger from 0 to 100

JPEG quality for JPEG compression.

depthCompressionstringoptional"None"
"Background subtraction"

Setting depth compression mode.

Result
Empty result

EXAMPLE

// Request
{
    "command":"set-recorder-props",
    "arguments":
    {
        "colorCompression":"jpeg",
	"globalDeviceProps":
        {
	    "PlayStation Eye: Darkening for calibration":"None"
        },
    "hideBackgroundWhenRecording":true,
    "recordingStartDelay":0,
    "videoMode":"640x480 color @ 50Hz"
    }
}
 
// Response
{
    "success":true
}

Player Commands