All Products
Search
Document Center

ApsaraVideo Live:ListRtcMPUTaskDetail

Last Updated:Nov 14, 2024

Queries the parameters of mixed-stream relay tasks.

Operation description

Usage notes

  • You can call the ListRtcMPUTaskDetail operation to query the parameters of mixed-stream relay tasks created by calling the StartLiveMPUTask operation.
  • By default, the query results are sorted in reverse chronological order based on the task update time.

QPS limit

You can call this operation up to 50 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the application.

Note The ID can be up to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-).
yourAppId
TaskIdstringNo

The ID of the stream relay task.

Note
  • The ID can be up to 55 characters in length and can contain letters, digits, underscores (_), and hyphens (-).

  • If you specify TaskId, the parameters of the specified task are returned.

yourTaskId
PageSizelongNo

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

Note If you do not specify TaskId, you must specify PageSize and PageNo. Then, the parameters of all stream relay tasks for the specified application are returned in pages.
10
PageNolongNo

The page number.

20

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

******3B-0E1A-586A-AC29-742247******
MPUTasksarray<object>

The parameters that you configured when you called the StartLiveMPUTask operation to create the tasks.

mpuTaskobject
AppIdstring

The ID of the application.

yourAppId
ChannelIdstring

The ID of the channel.

yourChannelId
TaskIdstring

The ID of the stream relay task.

yourTaskId
MixModestring

The stream mixing mode. Valid values:

  • 0: relays the original single stream without mixing streams. If the value of this parameter is 0, the TranscodeParams parameter is empty.
  • 1 (default): mixes multiple streams into a single stream and relays the mixed stream.
0
StreamURLstring

The ingest URL.

rtmp://example.com/live/stream****
MultiStreamURLarray<object>

The multiple ingest URLs relayed.

MultiStreamURLobject
URLstring

The ingest URL.

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

The region in which the streams are mixed. Valid values:

  • CN-shanghai
  • AP-Singapore (default)
  • EMAA-Saudi
CN-Shanghai
SingleSubParamsobject

The parameters of the single-stream relay task.

SourceTypestring

The source of the video. This parameter is valid only if you set StreamType to 2. Valid values:

  • camera (default): captures the video by using a camera.
  • shareScreen: captures the content displayed on a screen.
camera
StreamTypestring

The type of the stream that is relayed. Valid values:

  • 0 (default): the original stream.
  • 1: the audio-only stream.
  • 2: the video-only stream.
0
UserIdstring

The ID of the user whose stream is relayed. In single-stream relay mode, you can relay only one stream in a request.

yourSubUserId
TranscodeParamsobject

The mixed-stream relay parameters.

Backgroundobject

The global background image.

RenderModestring

The display mode. Valid values:

  • 0: proportionally scales the video or background image to fit the pane. Black bars are added to fill the extra space.
  • 1 (default): crops the video or background image to fit the pane.
1
URLstring

The URL of the global background image.

yourImageUrl
EncodeParamsobject

The encoding parameters of the output stream.

AudioOnlystring

Indicates whether the output stream is an audio-only stream. Valid values:

  • true
  • false (default)
false
AudioBitratestring

The bitrate of the audio. Unit: Kbit/s.

128
AudioChannelsstring

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

2
AudioSampleRatestring

The audio sampling rate. Unit: Hz.

44100
VideoCodecstring

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

H.264
VideoBitratestring

The bitrate of the video. Unit: Kbit/s.

3500
VideoFrameratestring

The frame rate of the video. Unit: frames per second (FPS).

25
VideoGopstring

The group of pictures (GOP) size of the video.

20
VideoHeightstring

The height of the video. Unit: pixels.

1000
VideoWidthstring

The width of the video. Unit: pixels.

1920
EnhancedParamstring

The parameter for advanced video encoding. The value is a JSON string. Optional fields:

  • profile: the encoding level. If the video encoding format is set to H.264, the valid values of this field are baseline, main, and high.
  • preset: adjusts the trade-off between encoding speed and video quality. Valid values: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, and placebo. Each value specifies a level of trade-off between encoding speed and video quality. For example, the ultrafast preset has the fastest encoding speed but the lowest video quality, while the placebo preset sacrifices the encoding speed for the best video quality.
{"profile": "high", "preset": "veryfast"}
Layoutobject

The video layout information.

Note The video layout information includes the x-coordinate, y-coordinate, width, height, and layer of the pane. For audio-only transcoding, no video layout information is returned.
UserPanesarray<object>

The information about the panes.

UserPaneobject
UserInfoobject

The information about the user whose stream is played in the pane.

SourceTypestring

The source of the video. This parameter is valid only if you set StreamType to 2. Valid values:

  • camera (default): captures the video by using a camera.
  • shareScreen: captures the content displayed on a screen.
camera
ChannelIdstring

The ID of the channel where the user is.

yourChannelId
UserIdstring

The ID of the user.

yourSubUserId
Heightstring

The height of the pane. The value is normalized.

0.2632
Widthstring

The width of the pane. The value is normalized.

0.3564
Xstring

The x-coordinate of the pane. The value is normalized.

0.2456
Ystring

The y-coordinate of the pane. The value is normalized.

0.3789
ZOrderstring

The layer of the pane. A value of 0 indicates that the pane is placed at the bottom layer. A larger value indicates a higher layer.

0
BackgroundImageUrlstring

The URL of the background image of the pane. This image is displayed if the user turns off the camera or is not present in the channel.

yourImageUrl
RenderModestring

The display mode. Valid values:

  • 0: proportionally scales the video or background image to fit the pane. Black bars are added to fill the extra space.
  • 1 (default): crops the video or background image to fit the pane.
1
UserInfosarray<object>

The information about the user whose stream is mixed. If an empty value is returned, streams from all users are mixed.

UserInfoobject
ChannelIdstring

The ID of the channel where the user is.

yourChannelId
UserIdstring

The ID of the user.

yourSubUserId
SourceTypestring

The source of the video. This parameter is valid only if you set StreamType to 2. Valid values:

  • camera (default): captures the video by using a camera.
  • shareScreen: captures the content displayed on a screen.
camera
StreamTypestring

The type of the stream that is relayed. Valid values:

  • 0 (default): the original stream.
  • 1: the audio-only stream.
  • 2: the video-only stream.
0
SeiParamsobject

The supplemental enhancement information (SEI) parameters.

LayoutVolumeobject

The layout and volume SEI. If the return value is an empty string, the default layout and volume SEI is used.

FollowIdrstring

Indicates whether to add SEI messages to Instantaneous Decoder Refresh (IDR) frames. Valid values:

  • 0: does not add SEI messages.
  • 1: adds SEI messages.
0
Intervalstring

The interval at which the SEI messages are added. Unit: milliseconds.

1000
PassThroughobject

The custom SEI.

FollowIdrstring

Indicates whether to add SEI messages to Instantaneous Decoder Refresh (IDR) frames. Valid values:

  • 0: does not add SEI messages.
  • 1: adds SEI messages.
0
Intervalstring

The interval at which the SEI messages are added. Unit: milliseconds.

1000
PayloadContentstring

The payload content of the custom SEI.

yourPayloadContent
PayloadContentKeystring

The key of the payload content. Default value: udd.

yourPayloadContentKey
PayloadTypestring

The custom payload type. Valid values: 100 to 254. Default value: 5.

100

Examples

Sample success responses

JSONformat

{
  "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",
      "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 codeError codeError message
400InvalidParam%s
400InvalidAppId%s
403OperationDeniedYour account has not enabled the Live service
403Forbidden%s
404MissingParam%s
500InternalErrorInternalError

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-14The Error code has changed. The response structure of the API has changedView Change Details
2024-10-30The Error code has changed. The response structure of the API has changedView Change Details
2024-08-13The Error code has changed. The response structure of the API has changedView Change Details
2024-08-06The Error code has changed. The response structure of the API has changedView Change Details
2024-07-04The Error code has changedView Change Details