Creates an output for a MediaConnect flow.
Operation description
- When the specified flow ID is not available, an error code is returned.
- A flow can have a maximum of four outputs.
- The output names in the same flow cannot be duplicated.
- You can set an upper limit on the number of concurrent viewers for each output. If this limit is exceeded, any new playback requests will fail. Each output supports up to five streams.
Output types
- RTMP-PUSH: An output that the MediaConnect flow pushes to the server you specified over the RTMP protocol.
- RTMP-PULL: An output that you can pull using the returned streaming URL over the RTMP protocol.
- SRT-Caller: An output that the MediaConnect flow pushes to the server you specified over the SRT protocol.
- SRT-Listener: An output that you can pull using the returned streaming URL over the SRT protocol.
- Flow: An output that is pushed to the source URL of another MediaConnect flow. The source type of the destination flow must be SRT-Listener or RTMP-PUSH. By default, a dedicated line is used when flows are cascaded. This allows for cross-region distribution among multiple flows.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| ice:AddMediaConnectFlowOutput | create | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| FlowId | string | Yes | The flow ID. | 34900dc6-90ec-4968-af3c-fcd87f231a5f |
| OutputProtocol | string | Yes | The output type. Valid values:
| RTMP-PULL |
| OutputToUrl | string | No | The output URL. This parameter is required when OutputProtocol is set to RTMP-PUSH or SRT-Caller. | rtmp://push.test.alivecdn.com/live/alitest |
| OutputName | string | Yes | The output name. | AliTestOutput |
| Cidrs | string | No | The IP address whitelist in CIDR format. Separate multiple CIDR blocks with commas (,). | 83.17.231.31/32 |
| PlayerLimit | integer | No | The maximum number of viewers. | 5 |
| PairInputName | string | No | The source name of the destination flow. This parameter is required when OutputProtocol is set to Flow. | AliTestInput |
| SrtLatency | integer | No | The latency for the SRT stream. This parameter is required when the source type is SRT-Listener or SRT-Caller. | 1000 |
| SrtPbkeyLen | string | No | The encryption key length. This parameter is required when the source type is SRT-Listener or SRT-Caller. | 32 |
| SrtPassphrase | string | No | The SRT key. This parameter is required when the source type is SRT-Listener or SRT-Caller. | BETTERG08S01 |
| PairFlowId | string | No | The ID of the destination flow. This parameter is required when OutputProtocol is set to Flow. | 8666ec062190f00e263012666319a5be |
Response parameters
Examples
Sample success responses
JSONformat
{
"Content": {
"OutputUrl": "srt://1.2.3.4:1025"
},
"Description": "ok",
"RequestId": "11AA9E73-FBA0-58DC-97BA-D606D847BCB6",
"RetCode": 0
}Error codes
For a list of error codes, visit the Service error codes.
