ListRtcMPUTaskDetail

Updated at:

Queries the parameter details of a stream mixing and relaying task.

Operation description

  • This operation queries the parameter details of a stream mixing and relaying task. Only stream mixing and relaying tasks created by using API operations can be queried.

  • For a paged query, the query results are sorted by task update time in descending order by default.

QPS limit

The single-user QPS limit for this operation is 50 calls per second. If the limit is exceeded, the API invocation is throttled, which may affect your business. Invoke this operation as needed.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:ListRtcMPUTaskDetail

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

Note

The application ID consists of uppercase and lowercase letters, digits, underscores, and hyphens (-), with a maximum of 64 characters.

yourAppId

TaskId

string

No

The task ID.

Note
  • The task ID consists of uppercase and lowercase letters, digits, underscores, and hyphens (-), with a maximum of 55 characters.

  • If you specify a task ID, the query is performed based on the task ID first, and the result contains the parameter details of the stream mixing and relaying task with the specified task ID.

yourTaskId

PageSize

integer

No

The number of records per page. Valid values: 1 to 100.

Note

If you do not specify a task ID, you must specify the PageSize and PageNo parameters. In this case, the paged query results of all stream mixing and relaying tasks under the specified application ID are returned.

10

PageNo

integer

No

The page number.

Note

If you do not specify a task ID, you must specify the PageSize and PageNo parameters. In this case, the paged query results of all stream mixing and relaying tasks under the specified application ID are returned.

20

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

******3B-0E1A-586A-AC29-742247******

MPUTasks

array<object>

The task parameter details. The parameter format is the same as the parameter format used when you call the operation to create a stream mixing task.

array<object>

AppId

string

The application ID.

yourAppId

ChannelId

string

The channel ID.

yourChannelId

TaskId

string

The task ID. This ID is the identifier of the stream mixing and relaying task.

yourTaskId

MixMode

string

The stream mixing mode. Valid values:

  • 0: single-stream relaying without stream mixing or transcoding. Only the original single stream is relayed. You do not need to configure stream mixing and transcoding parameters.

  • 1 (default): stream mixing, transcoding, and relaying.

0

StreamURL

string

The live stream ingest URL.

rtmp://example.com/live/stream****

MultiStreamURL

array<object>

The multi-address relaying parameters.

object

URL

string

The live stream ingest URL.

rtmp://example.com/live/stream****

IsAliCdn

boolean

Indicates whether the stream is relayed to Content Delivery Network (CDN). Valid values:

  • false: The stream is relayed to a non-Alibaba Cloud CDN.

  • true: The stream is relayed to Content Delivery Network (CDN).

false

Region

string

The region where the requested stream mixing service resides. Valid values:

  • CN-Shanghai (default): Shanghai.

  • AP-Singapore: Singapore.

  • EMAA-Saudi: Saudi Arabia.

CN-Shanghai

MaxIdleTime

string

The idle timeout period. Unit: seconds.

Note

If this parameter is set, the task is automatically stopped when the task has been idle for a period longer than MaxIdleTime. If this parameter is not set, the task is stopped immediately after the channel is closed.

10

SingleSubParams

object

The single-stream relaying parameters.

SourceType

string

The video input stream type in single-stream relaying mode. This parameter is valid only when the stream type is video (StreamType=2). Valid values:

  • camera (default): camera.

  • shareScreen: screen sharing.

camera

StreamType

string

The stream type for relaying in single-stream relaying mode. Valid values:

  • 0 (default): relay the original stream.

  • 1: relay only the audio stream.

  • 2: relay only the video stream.

0

UserId

string

The user ID for relaying. Only one stream can be relayed at a time.

yourSubUserId

TranscodeParams

object

The stream mixing, transcoding, and relaying parameters.

Background

object

The global background image for stream mixing.

RenderMode

string

The display mode for the sub-image output. Valid values:

  • 0: scales the image and displays a black background.

  • 1 (default): crops the image.

1

URL

string

The URL of the global background image.

yourImageUrl

EncodeParams

object

The encoding parameters for the relayed output.

AudioOnly

string

Specifies whether the output is audio-only. Valid values:

  • true: audio-only.

  • false (default): not audio-only.

false

AudioBitrate

string

The audio bitrate. Unit: kbps.

128

AudioChannels

string

The number of audio channels. Valid values: 1, 2.

2

AudioSampleRate

string

The audio sample rate. Unit: Hz.

44100

VideoCodec

string

The video encoding format. Default value: H.264.

H.264

VideoBitrate

string

The video bitrate. Unit: kbps.

3500

VideoFramerate

string

The video frame rate. Unit: fps.

25

VideoGop

string

The video GOP.

20

VideoHeight

string

The video height. Unit: px.

1000

VideoWidth

string

The video width. Unit: px.

1920

EnhancedParam

string

The enhanced encoding parameters in JSON string format. The supported optional configurations include profile and preset.

  • profile: the encoding level. When the video encoding format is H.264, the supported values for profile include: "baseline", "main", "high".

  • preset: adjusts the balance between encoding speed and quality. The supported values for preset include: "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo". Each value represents a strategy for encoding speed versus output video quality, ranging from "ultrafast" (extremely fast, encoding speed prioritized) to "placebo" (pursuing ultimate quality, extremely slow encoding).

{"profile": "high", "preset": "veryfast"}

Layout

object

The video layout information.

Note

For video transcoding, the video layout information includes layout coordinates (X, Y), layout pane dimensions (Width, Height), and stacking order (ZOrder). For audio-only transcoding, no video layout information is included.

UserPanes

array<object>

The stream mixing user pane information.

array<object>

UserInfo

object

The stream mixing user information.

SourceType

string

The video input stream type in stream mixing and transcoding mode. This parameter is valid only for video streams (StreamType=2). Valid values:

  • camera (default): camera.

  • shareScreen: screen sharing.

camera

ChannelId

string

The channel ID where the stream mixing user resides.

yourChannelId

UserId

string

The stream mixing user ID.

yourSubUserId

Height

string

The pane height, as a normalized percentage.

0.2632

Width

string

The pane width, as a normalized percentage.

0.3564

X

string

The X coordinate, as a normalized percentage.

0.2456

Y

string

The Y coordinate, as a normalized percentage.

0.3789

ZOrder

string

The stacking order. 0 is the bottom layer, layer 1 is above layer 0, and so on.

0

BackgroundImageUrl

string

The background image URL of the sub-image. When the user turns off the camera or has not entered the channel, this image fills the layout position.

yourImageUrl

RenderMode

string

The display mode for the sub-image output. Valid values:

  • 0: scales the image and displays a black background.

  • 1 (default): crops the image.

1

UserInfos

array<object>

The stream mixing user information. If no user is specified, all users are mixed.

object

ChannelId

string

The channel ID where the stream mixing user resides.

yourChannelId

UserId

string

The stream mixing user ID.

yourSubUserId

SourceType

string

The video input stream type in stream mixing and transcoding mode. This parameter is valid only for video streams (StreamType=2). Valid values:

  • camera (default): camera.

  • shareScreen: screen sharing.

camera

StreamType

string

The stream type for relaying in stream mixing and transcoding mode. Valid values:

  • 0 (default): relay the original stream.

  • 1: relay only the audio stream.

  • 2: relay only the video stream.

0

SeiParams

object

The SEI configuration parameters.

LayoutVolume

object

The layout and volume SEI. If this parameter is empty, the default layout and volume SEI is carried.

FollowIdr

string

Specifies whether to ensure that SEI is carried when sending IDR keyframes. Valid values:

  • 0: does not ensure SEI is carried.

  • 1: ensures SEI is carried.

0

Interval

string

The SEI sending interval. Unit: milliseconds.

1000

PassThrough

object

The pass-through SEI.

FollowIdr

string

Specifies whether to ensure that SEI is carried when sending IDR keyframes. Valid values:

  • 0: does not ensure SEI is carried.

  • 1: ensures SEI is carried.

0

Interval

string

The SEI sending interval. Unit: milliseconds.

1000

PayloadContent

string

The payload content of the pass-through SEI.

yourPayloadContent

PayloadContentKey

string

The key value corresponding to the payload content of the pass-through SEI. If not set, the key defaults to udd.

yourPayloadContentKey

PayloadType

string

The custom payload_type of the SEI message. Valid values: 100 to 254. If not set, the SEI payload_type defaults to 5.

100

Examples

Success response

JSON format

{
  "RequestId": "******3B-0E1A-586A-AC29-742247******",
  "MPUTasks": [
    {
      "AppId": "yourAppId",
      "ChannelId": "yourChannelId",
      "TaskId": "yourTaskId",
      "MixMode": "0",
      "StreamURL": "rtmp://example.com/live/stream****",
      "MultiStreamURL": [
        {
          "URL": "rtmp://example.com/live/stream****",
          "IsAliCdn": false
        }
      ],
      "Region": "CN-Shanghai",
      "MaxIdleTime": "10",
      "SingleSubParams": {
        "SourceType": "camera",
        "StreamType": "0",
        "UserId": "yourSubUserId"
      },
      "TranscodeParams": {
        "Background": {
          "RenderMode": "1",
          "URL": "yourImageUrl"
        },
        "EncodeParams": {
          "AudioOnly": "false",
          "AudioBitrate": "128",
          "AudioChannels": "2",
          "AudioSampleRate": "44100",
          "VideoCodec": "H.264",
          "VideoBitrate": "3500",
          "VideoFramerate": "25",
          "VideoGop": "20",
          "VideoHeight": "1000",
          "VideoWidth": "1920",
          "EnhancedParam": "{\"profile\": \"high\", \"preset\": \"veryfast\"}"
        },
        "Layout": {
          "UserPanes": [
            {
              "UserInfo": {
                "SourceType": "camera",
                "ChannelId": "yourChannelId",
                "UserId": "yourSubUserId"
              },
              "Height": "0.2632",
              "Width": "0.3564",
              "X": "0.2456",
              "Y": "0.3789",
              "ZOrder": "0",
              "BackgroundImageUrl": "yourImageUrl",
              "RenderMode": "1"
            }
          ]
        },
        "UserInfos": [
          {
            "ChannelId": "yourChannelId",
            "UserId": "yourSubUserId",
            "SourceType": "camera",
            "StreamType": "0"
          }
        ]
      },
      "SeiParams": {
        "LayoutVolume": {
          "FollowIdr": "0",
          "Interval": "1000"
        },
        "PassThrough": {
          "FollowIdr": "0",
          "Interval": "1000",
          "PayloadContent": "yourPayloadContent",
          "PayloadContentKey": "yourPayloadContentKey"
        },
        "PayloadType": "100"
      }
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam %s. Parameter verification failed
400 InvalidAppId %s, please check and try again later. AppId is invalid, please check and try again.
400 MissingParam %s, please check and try again later. Parameter is missing, please check and try again.
500 InternalError %s, please try again later. Internal error, please try again later.
403 OperationDenied Your account has not enabled the Live service
403 Forbidden %s, please check and try again later. No permission, please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.