接口请求域名: mdc.intl.tencentcloudapi.com 。
创建媒体传输的输入配置。
默认接口请求频率限制:20次/秒。
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:CreateStreamLinkInput。 |
| Version | 是 | String | 公共参数,本接口取值:2020-08-28。 |
| Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
| FlowId | 是 | String | 媒体传输流ID。 |
| InputGroup.N | 否 | Array of CreateInput | 流的输入组。 |
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Info | DescribeFlow | 创建的Flow信息。 |
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
POST / HTTP/1.1
Host: mdc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateStreamLinkInput
<公共请求参数>
{
"FlowId": "aaa",
"InputGroup": [
{
"InputName": "inputname",
"Description": "inputnameDescription",
"Protocol": "RTP",
"AllowIpList": [
"0.0.0.0/0"
],
"SRTSettings": {
"StreamId": "#!::u=johnny,t=file,m=publish,r=results.csv",
"Latency": 1000,
"RecvLatency": 1000,
"PeerLatency": 1000,
"PeerIdleTimeout": 1000,
"Passphrase": "aaa",
"PbKeyLen": 10
},
"RTPSettings": {
"FEC": "none",
"IdleTimeout": 1000
}
}
]
}
{
"Response": {
"Info": {
"FlowId": "abc",
"FlowName": "abc",
"State": "abc",
"MaxBandwidth": 0,
"InputGroup": [
{
"InputId": "abc",
"InputName": "abc",
"Description": "abc",
"Protocol": "abc",
"InputAddressList": [
{
"Ip": "abc",
"Port": 0
}
],
"AllowIpList": [
"abc"
],
"SRTSettings": {
"Mode": "abc",
"StreamId": "abc",
"Latency": 0,
"RecvLatency": 0,
"PeerLatency": 0,
"PeerIdleTimeout": 0,
"Passphrase": "abc",
"PbKeyLen": 0,
"SourceAddresses": [
{
"Ip": "abc",
"Port": 0
}
]
},
"RTPSettings": {
"FEC": "abc",
"IdleTimeout": 0
},
"InputRegion": "abc",
"RTMPSettings": {
"AppName": "abc",
"StreamKey": "abc"
},
"FailOver": "abc",
"Zones": [
"abc"
],
"RTMPPullSettings": {
"SourceAddresses": [
{
"TcUrl": "abc",
"StreamKey": "abc"
}
]
},
"RTSPPullSettings": {
"SourceAddresses": [
{
"Url": "abc"
}
]
},
"HLSPullSettings": {
"SourceAddresses": [
{
"Url": "abc"
}
]
},
"ResilientStream": {
"Enable": true,
"BufferTime": 1
},
"SecurityGroupIds": [
"abc"
]
}
],
"OutputGroup": [
{
"OutputId": "abc",
"OutputName": "abc",
"OutputType": "abc",
"Description": "abc",
"Protocol": "abc",
"OutputAddressList": [
{
"Ip": "abc"
}
],
"OutputRegion": "abc",
"SRTSettings": {
"Destinations": [
{
"Ip": "abc",
"Port": 0
}
],
"StreamId": "abc",
"Latency": 0,
"RecvLatency": 0,
"PeerLatency": 0,
"PeerIdleTimeout": 0,
"Passphrase": "abc",
"PbKeyLen": 0,
"Mode": "abc",
"SourceAddresses": [
{
"Ip": "abc",
"Port": 0
}
]
},
"RTPSettings": {
"Destinations": [
{
"Ip": "abc",
"Port": 0
}
],
"FEC": "abc",
"IdleTimeout": 0
},
"RTMPSettings": {
"IdleTimeout": 0,
"ChunkSize": 0,
"Destinations": [
{
"Url": "abc",
"StreamKey": "abc"
}
]
},
"RTMPPullSettings": {
"ServerUrls": [
{
"TcUrl": "abc",
"StreamKey": "abc"
}
]
},
"AllowIpList": [
"abc"
],
"RTSPPullSettings": {
"ServerUrls": [
{
"Url": "abc"
}
]
},
"HLSPullSettings": {
"ServerUrls": [
{
"Url": "abc"
}
]
},
"MaxConcurrent": 1,
"SecurityGroupIds": [
"abc"
],
"Zones": [
"abc"
]
}
],
"EventId": "abc",
"CreateTime": "abc"
},
"RequestId": "abc"
}
}
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| InternalError | 内部错误。 |
| InvalidParameter | 参数错误。 |
| InvalidParameter.ExceededQuantityLimit | 超出数量限制。 |
| InvalidParameter.Input | 输入无效。 |
| InvalidParameter.MaxBandwidth | 最大带宽值无效。 |
| InvalidParameter.Name | Name无效。 |
文档反馈