AWS Elemental MediaPackage 事件 - AWS Elemental MediaPackage

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWS Elemental MediaPackage 事件

AWS Elemental MediaPackage 与 Amazon CloudWatch Events 集成,以通知您影响通道和终端节点的特定事件。每个事件以 JSON(JavaScript 对象表示法)格式表示,包含事件名称、事件发生的日期和时间、受影响的通道或终端节点等等。 MediaPackage 尽最大效能发出事件。您可以使用 Events 收集这些 CloudWatch 事件,并设置将事件路由到一个或多个目标(如AWS Lambda函数、Amazon SNS 主题、Amazon SKINESIS 主题、Amazon SKinesis Data Streams 主题、Amazon SKinesis Data Streams 主题、Amazon SKin

有关将事件与其他类型 CloudWatch 的事件一起使用的更多信息,请参阅 Amazon Ev CloudWatch ents 用户指南

以下主题介绍 AWS Elemental MediaPackage 创建 CloudWatch 的事件。

输入通知事件

您可以获取实时内容和视频点播 (VOD) 内容的输入通知事件。当 MediaPackage 采集出现问题时,这些事件会通知你。下面是您可能会收到的输入通知事件:

  • 已超出最大输入流

  • 输入切换

  • VOD 提取状态更改

  • VOD 播放就绪性

以下各部分介绍了这些事件中的每个事件。

“已超出最大输入流”事件

对于直播内容,频道输入 MediaPackage 超过输入流数量的配额。有关配额的信息,请参阅AWS Elemental 中的配额 MediaPackage

{ "id": "7bf73129-1428-4cd3-a780-95db273d1602", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2015-11-11T21:29:54Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage:us-west-2:aws_account_id:channels/262ff182d46d4b399fcabea1364df682" ], "detail":{ "event": "MaxIngestStreamsError", "message": "Parent Manifest [%s] has [23] streams, more than [20] allowed: (index_1.m3u8,index_2.m3u8,index_3.m3u8,index_4.m3u8,index_5.m3u8,index_6.m3u8,index_7.m3u8,index_8.m3u8,index_9.m3u8,index_10.m3u8,index_11.m3u8,index_12.m3u8,index_13.m3u8,index_14.m3u8,index_15.m3u8,index_16.m3u8,index_17.m3u8,index_18.m3u8,index_19.m3u8,index_20.m3u8,index_21.m3u8,index_22.m3u8,index_23.m3u8)" } }
输入切换事件

对于直播内容, MediaPackage 切换其中一个端点的输入。

每五分钟发送一个事件。如果输入在五分钟内多次切换(例如,如果 MediaPackage 切换到一个输入,然后切换回另一个输入),则您只会收到一个事件。

有关输入冗余以及什么导致切换输入的信息,请参阅实时输入冗余 AWS Elemental MediaPackage 处理流程

{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2018-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:origin_endpoints/82d6b9bc04cb4612b487963d6c8d0f1a" ], "detail":{ "event": "InputSwitchEvent", "message": "Origin endpoint experienced an Input Switch Event", "EventDetails": { "Channel": "channel name", "PreviousIngestEndpoint": "endpoint uuid before input switch", "CurrentIngestEndpoint": "endpoint uuid after input switch", } } }
VOD 提取状态事件

对于点播视频 (VOD) 内容,中的资源 MediaPackage 会更改收录状态。您将收到以下事件的通知:

  • IngestStart

  • IngestError

  • IngestComplete

{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-05-03T17:29:36Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_name" ], "detail":{ "event": "IngestComplete", "message": "message text" } }
VOD 播放事件

对于 VOD 内容,中的资源 MediaPackage 可供播放。从资产提取完成到可播放资产之间,会有一段时间。该事件VodAssetPlayable意味着现在 MediaPackage 可以满足资产的播放请求。

您将获得打包组中每个打包配置的单独VodAssetPlayable事件。例如,如果您的打包组包含一个 DASH 和一个 HLS 打包配置,则您将收到两个VodAssetPlayable事件——一个用于您的 DASH 打包配置,另一个用于 HLS 打包配置。

{ "id": "81e896e4-d9e5-ec79-f82a-b4cf3246c567", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-11-03T21:46:00Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_id", "arn:aws:mediapackage-vod:us-west-2:aws_account_id:packaging_configuration/packaging_configuration_id" ], "detail":{ "event": "VodAssetPlayable", "message": "Asset 'asset_id' is now playable for PackagingConfiguration 'packaging_configuration_id'", "packaging_configuration_id": "packaging_configuration_id", "manifest_urls":[ "https://555555555555.egress.mediapackage-vod.us-west-2.amazonaws.com/out/v1/b9cc115bf7f1a/b848dfb116920772aa69ba/a3c74b1cae6a451c/index.m3u8" ] } } { "id": "91e896e4-d9e5-ab80-f82a-b4cf3246c568", "detail-type": "MediaPackage Input Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-11-03T21:47:00Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage-vod:us-west-2:aws_account_id:assets/asset_id", "arn:aws:mediapackage-vod:us-west-2:aws_account_id:packaging_configuration/packaging_configuration_id" ], "detail":{ "event": "VodAssetPlayable", "message": "Asset 'asset_id' is now playable for PackagingConfiguration 'packaging_configuration_id'", "packaging_configuration_id": "packaging_configuration_id", "manifest_urls":[ "https://111122223333.egress.mediapackage-vod.us-west-2.amazonaws.com/out/v1/1234567890abc/021345abcdef6789012345/abcdef0123456789/index.mpd" ] } }

密钥提供商通知事件

当您在终端节点上使用内容加密且无法访问密钥提供商时,您 MediaPackage 会收到密钥提供商通知事件。有关 DRM 和加密的信息,请参阅 https://docs.aws.amazon.com/speke/latest/documentation/

{ "id": "7bf73129-1428-4cd3-a780-98ds273d1602", "detail-type": "MediaPackage Key Provider Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2015-11-11T21:29:54Z", "region": "us-west-2", "resources":[ "arn:aws:mediapackage:us-west-2:aws_account_id:origin_endpoints/70b44e2e666c4bdc9e5f4488e1f1aa99" ], "detail":{ "event": "KeyProviderError", "message": "message-text" } }

收获工作通知活动

当您从直播中导出片段以创建直播到视频点播的资产时,会收到收获任务状态事件。 MediaPackage 在采集任务成功或失败时创建通知。有关采集作业和直播转点播资产的信息,请参阅 使用 AWS Elemental 创建直播转点播资产 MediaPackage

例 成功的收获工作活动

{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage HarvestJob Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:harvest_jobs/harvest_job_id" ], "detail":{ "harvest_job": { "id": "harvest_job_id", "arn": "arn:aws:mediapackage-vod:us-east-1:aws_account_id:harvest_jobs/harvest_job_id", "status": "SUCCEEDED", "origin_endpoint_id": "endpoint_id", "start_time": "2019-06-26T20:30:00-08:00", "end_time": "2019-06-26T21:00:00-08:00", "s3_destination": { "bucket_name": "s3_bucket_name", "manifest_key": "path/and/manifest_name/index.m3u8", "role_arn": "arn:aws:iam::aws_account_id:role/S3Access_role", }, "created_at": "2019-06-26T21:03:12-08:00" } } }

例 收获作业事件失败

{ "id": "8f9b8e72-0b31-e883-f19c-aec84742f3ce", "detail-type": "MediaPackage HarvestJob Notification", "source": "aws.mediapackage", "account": "aws_account_id", "time": "2019-07-16T17:29:36Z", "region": "us-east-1", "resources":[ "arn:aws:mediapackage:us-east-1:aws_account_id:harvest_jobs/harvest_job_id" ], "detail":{ "harvest_job": { "id": "harvest_job_id", "arn": "arn:aws:mediapackage-vod:us-east-1:aws_account_id:harvest_jobs/harvest_job_id", "status": "FAILED", "origin_endpoint_id": "endpoint_id", "start_time": "2019-06-26T20:30:00-08:00", "end_time": "2019-06-26T21:00:00-08:00", "s3_destination": { "bucket_name": "s3_bucket_name", "manifest_key": "path/and/manifest_name/index.m3u8", "role_arn": "arn:aws:iam::aws_account_id:role/S3Access_role", }, "created_at": "2019-06-26T21:03:12-08:00" }, "message": "Message text" } }