

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 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。一般而言，`GetMediaForFragmentList`呼叫前會先呼叫 [https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_ListFragments.html](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_reader_ListFragments.html) API。如需詳細資訊，請參閱 *Amazon Kinesis Video Streams FAQs*中的[從串流讀取資料](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 編碼。如需詳細資訊，請參閱《[Kinesis Video Streams 開發人員指南》中的 Kinesis Video Streams 資料模型](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-data.html)。 **