说明:当切换到NDI推流模式时,web会发送以下请求获取当前初始的NDI输出参数,主要是通道号,帧率,分辨率的参数获取
API URL
/api/ndi/get.json
Request
Method:GET/POST
Response
格式(Example):
{
"result": "ok",
"data": {
"output": "1", // 当前控制的输出窗口 type: String
"host":"DESKTOP-7T0CUHF", // 当前主机名 type:String
"name": "输出1", // 当前窗口的名称,也是NDI的通道名 type: String
"resolution": 2, // 分辨参数,对应分辨率列表的id 此项为0时,为自定义模式 type: Number
"customResolution":{
"width": 1920, // 分辨率宽度,跟随resolution同步变化 type:Number
"height": 1080, // 分辨率高度,跟随resolution同步变化 type:Number
},
"aspectRatio":0,// 纵横比 为0时表示不限制 为999时表示自定义 type: Number
"customAspectRatio":{ // 自定义分辨率
"width": 18,
"height": 9
},
"frameRate": 0, // 帧率 type:Number 此项为0时,请读取自定义
"customFrameRate": 24,// 自定义帧率 type:Number
}
}
Data字段说明:
Field | Value | 说明 |
---|---|---|
output | [STRING] | 窗口id |
host | [STRING] | 主机名 |
name | [STRING] | 窗口名称,也是NDI通道名 |
resolution | [INT] | 分辨率参数0:自定义模式 |
aspectRatio | [INT] | 纵横比参数0:不限制 |
frameRate | [INT] | 帧率 |
customFrameRate | [INT] | 自定义帧率 |