链接复制成功!
实例视频设置
功能介绍
实例视频设置。
调用此api的前提条件是租户需要先购买koophone云手机实例。
使用该接口可以设置实例每一个清晰度对应的码率和出流的帧率。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
PUT /v1/instances/video-setting
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
x-request-id |
是 |
String |
消息跟踪唯一id |
X-Auth-Token |
是 |
String |
租户级Token |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
instance_ids |
是 |
Array of strings |
实例列表,单个实例最大长度32,列表最大长度100 |
instance_settings |
是 |
Array of InstanceSetting objects |
视频设置内容 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
network_type |
是 |
String |
网络类型,枚举:MOBILE_NETWORK/WIFI/WIRED,注意这三个参数都必须有,配合encoding_type必填的2种参数共6种组合,详细先看请求示例 |
encoding_type |
是 |
String |
编码类型,H264/H265,注意这两个参数都必须有,配合network_type必填的3种参数共6种组合,详细先看请求示例 |
video_spec_groups |
是 |
Array of VideoSpecGroup objects |
视频规格组 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
响应码,KOOPHONE.API.xxxx或者common.00000xxx |
error_msg |
String |
响应描述 |
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
响应码,KOOPHONE.API.xxxx或者common.00000xxx |
error_msg |
String |
响应描述 |
状态码:500
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
响应码,KOOPHONE.API.xxxx或者common.00000xxx |
error_msg |
String |
响应描述 |
请求示例
/v1/instances/video-setting { "instance_ids" : [ "iRJEVP96" ], "instance_settings" : [ { "network_type" : "MOBILE_NETWORK", "encoding_type" : "H264", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] }, { "network_type" : "MOBILE_NETWORK", "encoding_type" : "H265", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] }, { "network_type" : "WIFI", "encoding_type" : "H264", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] }, { "network_type" : "WIFI", "encoding_type" : "H265", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] }, { "network_type" : "WIRED", "encoding_type" : "H264", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] }, { "network_type" : "WIRED", "encoding_type" : "H265", "video_spec_groups" : [ { "definition_540P" : { "code_rate" : 6000, "fps" : 30 }, "definition_720P" : { "code_rate" : 6000, "fps" : 30 }, "definition_1080P" : { "code_rate" : 8000, "fps" : 30 } } ] } ] }
响应示例
状态码:200
正常响应
{ "error_code" : "0", "error_msg" : "ok" }
状态码
状态码 |
描述 |
---|---|
200 |
正常响应 |
400 |
请求错误 |
500 |
内部错误 |
错误码
请参见错误码。