AWS Elemental MediaPackage v2

2024/11/20 - AWS Elemental MediaPackage v2 - 3 updated api methods

Changes  MediaPackage v2 now supports the Media Quality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.

CreateChannel (updated) Link ¶
Changes (both)
{'InputSwitchConfiguration': {'MQCSInputSwitching': 'boolean'},
 'OutputHeaderConfiguration': {'PublishMQCS': 'boolean'}}

Create a channel to start receiving content streams. The channel represents the input to MediaPackage for incoming live content from an encoder such as AWS Elemental MediaLive. The channel receives content, and after packaging it, outputs it through an origin endpoint to downstream devices (such as video players or CDNs) that request the content. You can create only one channel with each request. We recommend that you spread out channels between channel groups, such as putting redundant channels in the same AWS Region in different channel groups.

See also: AWS API Documentation

Request Syntax

client.create_channel(
    ChannelGroupName='string',
    ChannelName='string',
    ClientToken='string',
    InputType='HLS'|'CMAF',
    Description='string',
    InputSwitchConfiguration={
        'MQCSInputSwitching': True|False
    },
    OutputHeaderConfiguration={
        'PublishMQCS': True|False
    },
    Tags={
        'string': 'string'
    }
)
type ChannelGroupName:

string

param ChannelGroupName:

[REQUIRED]

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

type ChannelName:

string

param ChannelName:

[REQUIRED]

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.

type ClientToken:

string

param ClientToken:

A unique, case-sensitive token that you provide to ensure the idempotency of the request.

This field is autopopulated if not provided.

type InputType:

string

param InputType:

The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

The allowed values are:

  • HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments).

  • CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).

type Description:

string

param Description:

Enter any descriptive text that helps you to identify the channel.

type InputSwitchConfiguration:

dict

param InputSwitchConfiguration:

The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

  • MQCSInputSwitching (boolean) --

    When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when InputType is CMAF.

type OutputHeaderConfiguration:

dict

param OutputHeaderConfiguration:

The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

  • PublishMQCS (boolean) --

    When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when InputType is CMAF.

type Tags:

dict

param Tags:

A comma-separated list of tag key:value pairs that you define. For example:

"Key1": "Value1",

"Key2": "Value2"

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Arn': 'string',
    'ChannelName': 'string',
    'ChannelGroupName': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'ModifiedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'IngestEndpoints': [
        {
            'Id': 'string',
            'Url': 'string'
        },
    ],
    'InputType': 'HLS'|'CMAF',
    'ETag': 'string',
    'Tags': {
        'string': 'string'
    },
    'InputSwitchConfiguration': {
        'MQCSInputSwitching': True|False
    },
    'OutputHeaderConfiguration': {
        'PublishMQCS': True|False
    }
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) associated with the resource.

    • ChannelName (string) --

      The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

    • ChannelGroupName (string) --

      The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

    • CreatedAt (datetime) --

      The date and time the channel was created.

    • ModifiedAt (datetime) --

      The date and time the channel was modified.

    • Description (string) --

      The description for your channel.

    • IngestEndpoints (list) --

      The list of ingest endpoints.

      • (dict) --

        The ingest domain URL where the source stream should be sent.

        • Id (string) --

          The system-generated unique identifier for the IngestEndpoint.

        • Url (string) --

          The ingest domain URL where the source stream should be sent.

    • InputType (string) --

      The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

      The allowed values are:

      • HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments).

      • CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).

    • ETag (string) --

      The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.

    • Tags (dict) --

      The comma-separated list of tag key:value pairs assigned to the channel.

      • (string) --

        • (string) --

    • InputSwitchConfiguration (dict) --

      The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

      • MQCSInputSwitching (boolean) --

        When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when InputType is CMAF.

    • OutputHeaderConfiguration (dict) --

      The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

      • PublishMQCS (boolean) --

        When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when InputType is CMAF.

GetChannel (updated) Link ¶
Changes (response)
{'InputSwitchConfiguration': {'MQCSInputSwitching': 'boolean'},
 'OutputHeaderConfiguration': {'PublishMQCS': 'boolean'}}

Retrieves the specified channel that's configured in AWS Elemental MediaPackage, including the origin endpoints that are associated with it.

See also: AWS API Documentation

Request Syntax

client.get_channel(
    ChannelGroupName='string',
    ChannelName='string'
)
type ChannelGroupName:

string

param ChannelGroupName:

[REQUIRED]

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

type ChannelName:

string

param ChannelName:

[REQUIRED]

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

rtype:

dict

returns:

Response Syntax

{
    'Arn': 'string',
    'ChannelName': 'string',
    'ChannelGroupName': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'ModifiedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'IngestEndpoints': [
        {
            'Id': 'string',
            'Url': 'string'
        },
    ],
    'InputType': 'HLS'|'CMAF',
    'ETag': 'string',
    'Tags': {
        'string': 'string'
    },
    'InputSwitchConfiguration': {
        'MQCSInputSwitching': True|False
    },
    'OutputHeaderConfiguration': {
        'PublishMQCS': True|False
    }
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) associated with the resource.

    • ChannelName (string) --

      The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

    • ChannelGroupName (string) --

      The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

    • CreatedAt (datetime) --

      The date and time the channel was created.

    • ModifiedAt (datetime) --

      The date and time the channel was modified.

    • Description (string) --

      The description for your channel.

    • IngestEndpoints (list) --

      The list of ingest endpoints.

      • (dict) --

        The ingest domain URL where the source stream should be sent.

        • Id (string) --

          The system-generated unique identifier for the IngestEndpoint.

        • Url (string) --

          The ingest domain URL where the source stream should be sent.

    • InputType (string) --

      The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

      The allowed values are:

      • HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments).

      • CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).

    • ETag (string) --

      The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.

    • Tags (dict) --

      The comma-separated list of tag key:value pairs assigned to the channel.

      • (string) --

        • (string) --

    • InputSwitchConfiguration (dict) --

      The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

      • MQCSInputSwitching (boolean) --

        When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when InputType is CMAF.

    • OutputHeaderConfiguration (dict) --

      The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

      • PublishMQCS (boolean) --

        When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when InputType is CMAF.

UpdateChannel (updated) Link ¶
Changes (both)
{'InputSwitchConfiguration': {'MQCSInputSwitching': 'boolean'},
 'OutputHeaderConfiguration': {'PublishMQCS': 'boolean'}}

Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details.

Any edits you make that impact the video output may not be reflected for a few minutes.

See also: AWS API Documentation

Request Syntax

client.update_channel(
    ChannelGroupName='string',
    ChannelName='string',
    ETag='string',
    Description='string',
    InputSwitchConfiguration={
        'MQCSInputSwitching': True|False
    },
    OutputHeaderConfiguration={
        'PublishMQCS': True|False
    }
)
type ChannelGroupName:

string

param ChannelGroupName:

[REQUIRED]

The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

type ChannelName:

string

param ChannelName:

[REQUIRED]

The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

type ETag:

string

param ETag:

The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.

type Description:

string

param Description:

Any descriptive information that you want to add to the channel for future identification purposes.

type InputSwitchConfiguration:

dict

param InputSwitchConfiguration:

The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

  • MQCSInputSwitching (boolean) --

    When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when InputType is CMAF.

type OutputHeaderConfiguration:

dict

param OutputHeaderConfiguration:

The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

  • PublishMQCS (boolean) --

    When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when InputType is CMAF.

rtype:

dict

returns:

Response Syntax

{
    'Arn': 'string',
    'ChannelName': 'string',
    'ChannelGroupName': 'string',
    'CreatedAt': datetime(2015, 1, 1),
    'ModifiedAt': datetime(2015, 1, 1),
    'Description': 'string',
    'IngestEndpoints': [
        {
            'Id': 'string',
            'Url': 'string'
        },
    ],
    'InputType': 'HLS'|'CMAF',
    'ETag': 'string',
    'Tags': {
        'string': 'string'
    },
    'InputSwitchConfiguration': {
        'MQCSInputSwitching': True|False
    },
    'OutputHeaderConfiguration': {
        'PublishMQCS': True|False
    }
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) associated with the resource.

    • ChannelName (string) --

      The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

    • ChannelGroupName (string) --

      The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

    • CreatedAt (datetime) --

      The date and time the channel was created.

    • ModifiedAt (datetime) --

      The date and time the channel was modified.

    • Description (string) --

      The description for your channel.

    • IngestEndpoints (list) --

      The list of ingest endpoints.

      • (dict) --

        The ingest domain URL where the source stream should be sent.

        • Id (string) --

          The system-generated unique identifier for the IngestEndpoint.

        • Url (string) --

          The ingest domain URL where the source stream should be sent.

    • InputType (string) --

      The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.

      The allowed values are:

      • HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments).

      • CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).

    • ETag (string) --

      The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource.

    • Tags (dict) --

      The comma-separated list of tag key:value pairs assigned to the channel.

      • (string) --

        • (string) --

    • InputSwitchConfiguration (dict) --

      The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

      • MQCSInputSwitching (boolean) --

        When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when InputType is CMAF.

    • OutputHeaderConfiguration (dict) --

      The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

      • PublishMQCS (boolean) --

        When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when InputType is CMAF.