

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

# 使用 Amazon Chime SDK 媒体流管道数据
<a name="media-stream-tips-tricks"></a>

您可以使用通知中的元数据获取 KVS ARNs、片段编号和片段时间戳。这些信息可以帮助您处理 KVS 流中的音频数据。

此外，您还可以将 KVS ARNs 与 KVS 配合使用 APIs ，从流中读取数据。根据用例，您可以调用[https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_GetMedia.html](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_GetMedia.html)和[https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_GetMediaForFragmentList.html](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_GetMediaForFragmentList.html) APIs。通常，在调用 [https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_ListFragments.html](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_ListFragments.html) 之前会先调用 `GetMediaForFragmentList` API。有关更多信息，请参阅 *Amazon Kinesis Vid FAQs eo Streams* 中的 “[从直播中读取数据](https://aws.amazon.com/kinesis/video-streams/faqs/)”。

根据使用案例，生成器可以使用 Kinesis Video Streams 解析器库，而该库反过来又使用 KVS [https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_GetMedia.html](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_GetMedia.html) API。

媒体流管道会将以下会议和与会者元数据添加到每个片段。

```
"meetingId"
"externalMeetingId"
"attendeeId"
"externalUserId"
"sampleRate"
"channels"
```

媒体数据以 MKV 格式存储。所有 MKV 音频数据均采用 AAC 编码。有关更多信息，请参阅《Amazon Kinesis Video Streams 开发人员指南》**中的 [Kinesis Video Streams 数据模型](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-data.html)。