All Products
Search
Document Center

Intelligent Media Services:AddMediaConnectFlowOutput

Last Updated:Dec 23, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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 Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
ice:AddMediaConnectFlowOutputcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
FlowIdstringYes

The flow ID.

34900dc6-90ec-4968-af3c-fcd87f231a5f
OutputProtocolstringYes

The output type.

Valid values:

  • RTMP-PUSH
  • SRT-Caller
  • RTMP-PULL
  • SRT-Listener
  • Flow
RTMP-PULL
OutputToUrlstringNo

The output URL. This parameter is required when OutputProtocol is set to RTMP-PUSH or SRT-Caller.

rtmp://push.test.alivecdn.com/live/alitest
OutputNamestringYes

The output name.

AliTestOutput
CidrsstringNo

The IP address whitelist in CIDR format. Separate multiple CIDR blocks with commas (,).

83.17.231.31/32
PlayerLimitintegerNo

The maximum number of viewers.

5
PairInputNamestringNo

The source name of the destination flow. This parameter is required when OutputProtocol is set to Flow.

AliTestInput
SrtLatencyintegerNo

The latency for the SRT stream. This parameter is required when the source type is SRT-Listener or SRT-Caller.

1000
SrtPbkeyLenstringNo

The encryption key length. This parameter is required when the source type is SRT-Listener or SRT-Caller.

32
SrtPassphrasestringNo

The SRT key. This parameter is required when the source type is SRT-Listener or SRT-Caller.

BETTERG08S01
PairFlowIdstringNo

The ID of the destination flow. This parameter is required when OutputProtocol is set to Flow.

8666ec062190f00e263012666319a5be

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Contentobject

The response body.

OutputUrlstring

The output URL.

srt://1.2.3.4:1025
Descriptionstring

The call description.

ok
RequestIdstring

The ID of the request.

11AA9E73-FBA0-58DC-97BA-D606D847BCB6
RetCodestring

The returned error code. A value of 0 indicates that the call is successful.

0

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.