GetMediaLiveChannel

更新时间:
复制 MD 格式

Queries a MediaLive channel.

Operation description

QPS limit

You can call this operation up to 50 times per second per Alibaba Cloud account. Requests that exceed this limit are dropped, which may cause service interruptions.

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

ice:GetMediaLiveChannel

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ChannelId

string

Yes

The ID of the channel.

SEGK5KA6KYKAWQQH

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

******11-DB8D-4A9A-875B-275798******

Channel

object

The channel information.

ChannelId

string

The ID of the channel.

SEGK5KA6KYKAWQQH

Name

string

The channel name.

mych

State

string

The state of the channel. Valid values: IDLE, STARTING, RUNNING, RECOVERING, and STOPPING.

IDLE

InputAttachments

array<object>

The inputs associated with the channel.

array<object>

InputId

string

The ID of the associated input.

SEGK5KA6KYKAWQQH

InputName

string

The name of the input.

myinput

LanguageName

string

The language name.

eng

AudioSelectors

array<object>

The audio selectors.

array<object>

Name

string

The name of the audio selector.

myselector

AudioLanguageSelection

object

The audio language selection.

LanguageCode

string

A three-letter ISO 639-2 language code from within an audio source.

eng

AudioPidSelection

object

The audio PID selection.

Pid

integer

A PID from within a source.

123

AudioTrackSelection

array<object>

The audio track selection.

object

TrackId

integer

The track ID from within a source.

1

OutputGroups

array<object>

The output groups.

array<object>

Name

string

The name of the output group.

group1

Type

string

The output group type.

MediaPackage

Outputs

array<object>

The outputs in the output group.

array<object>

Name

string

The name of the output.

output1

MediaType

integer

The media type of the output.

0

MediaPackageOutputSetting

object

The settings of the output delivered to MediaPackage.

NameModifier

string

The manifest name modifier. The child manifests include this modifier in their M3U8 file names.

480p

AudioGroupId

string

The manifest audio group ID.

audiogroup

VideoSettingName

string

The name of the referenced VideoSettings.

myVideo1

AudioSettingNames

array

The referenced AudioSettings.

string

The name of the referenced AudioSettings.

myAudio1

MediaPackageGroupSetting

object

The MediaPackage destination.

GroupName

string

GroupName in MediaPackage.

myPackageGroup

ChannelName

string

ChannelName in MediaPackage.

myPackageChannel

MonitorUrl

string

The URL for monitoring the output group. This parameter is returned only when the output group type is MediaPackage.

rtmp://xxx

AudioSettings

array<object>

The audio settings.

array<object>

Name

string

The name of the audio settings.

zhuanfengzhuang

AudioSelectorName

string

The name of the audio selector.

myselector

LanguageCode

string

A three-letter ISO 639-2 language code.

eng

LanguageName

string

The name of the language.

English

AudioCodec

string

The audio codec.

aac

AudioCodecSetting

object

The audio encoding settings.

Profile

string

The audio codec profile.

AAC-LOW

Bitrate

integer

The audio bitrate. Unit: bit/s.

200000

SampleRate

integer

The audio sample rate. Unit: Hz.

44100

VideoSettings

array<object>

The video settings.

array<object>

Name

string

The name of the video settings.

video1

Width

integer

The width of the video in pixels.

1280

Height

integer

The height of the video in pixels.

720

VideoCodec

string

The video codec.

H264

VideoCodecSetting

object

The video encoding settings.

Rate

object

The video encoding rate.

Bitrate

integer

The video bitrate. Unit: bit/s.

2500000

RateControlMode

string

The bitrate control mode.

ABR

MaxBitrate

integer

The maximum bitrate. Unit: bit/s.

6000000

BufferSize

integer

The video buffer size. Unit: bit/s.

6000000

Framerate

object

The frame rate.

FramerateControl

string

The frame rate mode.

SPECIFIED

FramerateNumerator

integer

The numerator of the fixed frame rate.

25

FramerateDenominator

integer

The denominator of the fixed frame rate.

1

Gop

object

The GOP setting.

GopSizeUnits

string

The GOP size unit.

FRAMES

GopSize

integer

The GOP size.

90

BframesNum

integer

The number of B frames.

3

CodecDetail

object

The video encoding settings.

Profile

string

The H.264 profile.

MAIN

Level

string

The video encoding level. It is not supported yet.

H264_LEVEL_AUTO

VideoCodecType

string

The video transcoding method. Valid values: NORMAL (regular transcoding) and NBHD (Narrowband HD™ transcoding).

NORMAL

CreateTime

string

The time when the channel was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2024-12-03T06:56:42Z

LastStartTime

string

The time when the channel was last started. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. If the channel has never been started since it was created, an empty string is returned.

2024-12-03T06:56:42Z

LastStopTime

string

The time when the channel was last stopped. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. If the channel has never stopped since it was created, an empty string is returned.

2024-12-03T06:56:42Z

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "Channel": {
    "ChannelId": "SEGK5KA6KYKAWQQH",
    "Name": "mych",
    "State": "IDLE",
    "InputAttachments": [
      {
        "InputId": "SEGK5KA6KYKAWQQH",
        "InputName": "myinput",
        "LanguageName": "eng",
        "AudioSelectors": [
          {
            "Name": "myselector",
            "AudioLanguageSelection": {
              "LanguageCode": "eng"
            },
            "AudioPidSelection": {
              "Pid": 123
            },
            "AudioTrackSelection": [
              {
                "TrackId": 1
              }
            ]
          }
        ]
      }
    ],
    "OutputGroups": [
      {
        "Name": "group1",
        "Type": "MediaPackage",
        "Outputs": [
          {
            "Name": "output1",
            "MediaType": 0,
            "MediaPackageOutputSetting": {
              "NameModifier": "480p",
              "AudioGroupId": "audiogroup"
            },
            "VideoSettingName": "myVideo1",
            "AudioSettingNames": [
              "myAudio1"
            ]
          }
        ],
        "MediaPackageGroupSetting": {
          "GroupName": "myPackageGroup",
          "ChannelName": "myPackageChannel"
        },
        "MonitorUrl": "rtmp://xxx"
      }
    ],
    "AudioSettings": [
      {
        "Name": "zhuanfengzhuang",
        "AudioSelectorName": "myselector",
        "LanguageCode": "eng",
        "LanguageName": "English",
        "AudioCodec": "aac",
        "AudioCodecSetting": {
          "Profile": "AAC-LOW",
          "Bitrate": 200000,
          "SampleRate": 44100
        }
      }
    ],
    "VideoSettings": [
      {
        "Name": "video1",
        "Width": 1280,
        "Height": 720,
        "VideoCodec": "H264",
        "VideoCodecSetting": {
          "Rate": {
            "Bitrate": 2500000,
            "RateControlMode": "ABR",
            "MaxBitrate": 6000000,
            "BufferSize": 6000000
          },
          "Framerate": {
            "FramerateControl": "SPECIFIED",
            "FramerateNumerator": 25,
            "FramerateDenominator": 1
          },
          "Gop": {
            "GopSizeUnits": "FRAMES",
            "GopSize": 90,
            "BframesNum": 3
          },
          "CodecDetail": {
            "Profile": "MAIN",
            "Level": "H264_LEVEL_AUTO"
          }
        },
        "VideoCodecType": "NORMAL"
      }
    ],
    "CreateTime": "2024-12-03T06:56:42Z",
    "LastStartTime": "2024-12-03T06:56:42Z",
    "LastStopTime": "2024-12-03T06:56:42Z"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.