

# IVS 個別參與者錄製 \$1 即時串流
<a name="rt-individual-participant-recording"></a>

本文件說明如何搭配 IVS 即時串流使用個別參與者錄製功能。

會收取標準 S3 儲存空間和請求的成本。縮圖不會產生額外的 IVS 費用。如需詳細資訊，請參閱 [Amazon IVS 定價](https://aws.amazon.com/ivs/pricing/)。

## 簡介
<a name="ind-part-rec-introduction"></a>

個別參與者錄製允許 IVS 即時串流客戶，將 IVS 舞台發布者個別錄製到 S3 儲存貯體。啟用舞台的個別參與者錄製後，發布者開始向舞台發布內容後，就會錄製發布者內容。

**注意：**如果您要將所有舞台參與者混入一段影片中，則複合錄製功能會更為合適。如需錄製 IVS 即時串流內容的摘要，請參閱[錄製](rt-recording.md)。

![\[使用個別參與者錄製將每個發布者的媒體錄製到個別檔案。\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/images/Individual_Participant_Recording.png)


## 工作流程
<a name="ind-part-rec-workflow"></a>

![\[使用個別參與者錄製將每個發布者的媒體錄製到個別檔案的工作流程。\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/images/Workflow_Participant_Recording.png)


### 1. 建立 S3 儲存貯體
<a name="ind-part-rec-create-s3-bucket"></a>

您需要 S3 儲存貯體來寫入 VOD。如需詳細資訊，請參閱 S3 文件：[如何建立儲存貯體](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html)。請注意，對於個別參與者錄製，必須在與 IVS 舞台相同的 AWS 區域中建立 S3 儲存貯體。

**重要**：如果您使用現有的 S3 儲存貯體：
+ **物件擁有權**設定必須是**強制執行的儲存貯體擁有者**，或是**偏好的儲存貯體擁有者**。
+ **預設類型**設定必須是**使用 Amazon S3 受管金鑰進行伺服器端加密 (SSE-S3)**。

如需詳細資訊，請參閱 S3 文件：[controlling ownership of objects](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) 和 [protecting data with encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingEncryption.html)。

### 2. 建立 StorageConfiguration 物件
<a name="ind-part-rec-create-storageconfig-object"></a>

建立儲存貯體後呼叫 IVS 即時串流 API，以[建立 StorageConfiguration](https://docs.aws.amazon.com//ivs/latest/RealTimeAPIReference/API_CreateStorageConfiguration.html) 物件。成功建立儲存體組態後，IVS 將獲得許可，可寫入所提供 S3 儲存貯體。您可以將此 StorageConfiguration 物件重複用於多個舞台。

### 3. 建立具有參與者權杖的舞台
<a name="ind-part-rec-create-stage-with-part-tokens"></a>

現在，您需要[建立 IVS 舞台](https://docs.aws.amazon.com//ivs/latest/RealTimeAPIReference/API_CreateStage.html)，並為舞台啟用個別參與者錄製 (方式是設定 AutoParticipantRecordingConfiguration 物件)，同時為每個發布者建立參與者權杖。

以下請求會建立一個具有兩個參與者權杖並啟用個別參與者錄製的舞台。

```
POST /CreateStage HTTP/1.1
Content-type: application/json

{
   "autoParticipantRecordingConfiguration": { 
      "mediaTypes": ["AUDIO_VIDEO"],
      "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/AbCdef1G2hij",
      "thumbnailConfiguration": {
         "recordingMode": "INTERVAL",
         "storage": ["LATEST", "SEQUENTIAL"],
         "targetIntervalSeconds": 60
      }
   },
   "name": "TestStage",
   "participantTokenConfigurations": [ 
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "1"
      },
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "2"
      }
   ]
}
```

### 4. 以作用中發布者身分加入此舞台
<a name="ind-part-rec-join-stage-as-active-pub"></a>

將參與者權杖分發給發布者，讓他們加入此舞台並開始[向舞台發布內容](https://docs.aws.amazon.com//ivs/latest/RealTimeUserGuide/getting-started-pub-sub.html)。

發布者加入此舞台並開始使用其中一個 [IVS 即時串流廣播 SDK](https://docs.aws.amazon.com//ivs/latest/RealTimeUserGuide/broadcast.html) 向舞台發布內容時，參與者錄製程序會自動開始，並向您傳送 [EventBridge 事件](eventbridge.md)，指出錄製已開始。(此事件為「IVS 參與者錄製狀態變更 – 錄製開始」。) 同時，參與者錄製程序會開始將 VOD 和中繼資料檔案寫入設定的 S3 儲存貯體。注意：不保證會將連線持續時間極短 (少於 5 秒) 的參與者錄製下來。

有兩種方式可以取得每個錄製的 S3 字首：
+ 接聽 EventBridge 事件：

  ```
  {
     "version": "0",
     "id": "12345678-1a23-4567-a1bc-1a2b34567890",
     "detail-type": "IVS Participant Recording State Change",
     "source": "aws.ivs",
     "account": "123456789012",
     "time": "2024-03-13T22:19:04Z",
     "region": "us-east-1",
     "resources": ["arn:aws:ivs:us-west-2:123456789012:stage/AbCdef1G2hij"],
     "detail": {
        "session_id": "st-ZyXwvu1T2s",
        "event_name": "Recording Start",
        "participant_id": "xYz1c2d3e4f",
        "recording_s3_bucket_name": "ivs-recordings",
        "recording_s3_key_prefix": "<stage_id>/<session_id>/<participant_id>/2024-01-01T12-00-55Z"
     }
  }
  ```
+ 使用 [GetParticipant](https://docs.aws.amazon.com//ivs/latest/RealTimeAPIReference/API_GetParticipant.html) API 操作：此回應包含指向參與者錄製檔案位置的 S3 儲存貯體和字首。以下是請求內容：

  ```
  POST /GetParticipant HTTP/1.1
  Content-type: application/json
  {
     "participantID": "xYz1c2d3e4f",
     "sessionId": "st-ZyXwvu1T2s",
     "stageArn": "arn:aws:ivs:us-west-2:123456789012:stage/AbCdef1G2hij"
  }
  ```

  以下是回應內容：

  ```
  Content-type: application/json
  {
     "participant": {
        ...
        "recordingS3BucketName": "ivs-recordings",
        "recordingS3Prefix": "<stage_id>/<session_id>/<participant_id>",
        "recordingState": "ACTIVE",
        ...
     }
  }
  ```

### 5. 播放 VOD
<a name="ind-part-rec-play-back-vod"></a>

錄製結束後，您可以使用 [IVS 播放器](https://debug.ivsdemos.com/?p=ivs)觀看內容。如需有關如何設定 CloudFront 分佈以進行 VOD 播放的說明，請參閱[從私有儲存貯體播放錄製的內容](https://docs.aws.amazon.com//ivs/latest/RealTimeUserGuide/rt-composite-recording.html#comp-rec-playback)。

## 純音訊錄製
<a name="ind-part-rec-audio-only-recordings"></a>

設定個別參與者錄製時，可以選擇將純音訊 HLS 區段寫入 S3 儲存貯體。若要使用此功能，請在建立舞台時選擇 `AUDIO_ONLY mediaType`：

```
POST /CreateStage HTTP/1.1
Content-type: application/json

{
   "autoParticipantRecordingConfiguration": { 
      "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/AbCdef1G2hij",
      "mediaTypes": ["AUDIO_ONLY"],
      "thumbnailConfiguration": {
         "recordingMode": "DISABLED"
      }
   },
   "name": "TestStage",
   "participantTokenConfigurations": [ 
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "1"
      },
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "2"
      }
   ]
}
```

## 僅限縮圖錄製
<a name="ind-part-rec-recording-thumbnail-only"></a>

設定個別參與者錄製時，您可以選擇僅將縮圖寫入 S3 儲存貯體。若要使用此功能，請在建立階段時將 `mediaType` 設為 `NONE`。如此可確保不會有任何 HLS 區段產生；系統仍會建立縮圖並寫入您的 S3 儲存貯體。

```
POST /CreateStage HTTP/1.1
Content-type: application/json
{
   "autoParticipantRecordingConfiguration": { 
      "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/AbCdef1G2hij",
      "mediaTypes": ["NONE"],
      "thumbnailConfiguration": {
         "recordingMode": "INTERVAL",
         "storage": ["LATEST", "SEQUENTIAL"],
         "targetIntervalSeconds": 60
      }
   },
   "name": "TestStage",
   "participantTokenConfigurations": [ 
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "1"
      },
      { 
         "capabilities": ["PUBLISH", "SUBSCRIBE"],
         "duration": 20160,
         "userId": "2"
      }
   ]
}
```

## 錄製內容
<a name="ind-part-rec-recording-contents"></a>

當個別參與者錄製處於作用中狀態時，系統會開始將 HLS 影片區段、中繼資料檔案及縮圖寫入階段建立時所提供的 S3 儲存貯體。此內容可用於後續處理或作為隨需影片播放。

請注意，錄製結束後，「IVS 參與者錄製狀態會變更 – 錄製結束」事件會透過 EventBridge 傳送。建議您只在接收此事件之後播放或處理錄製的串流。如需詳細資訊，請參閱[搭配 IVS 即時串流使用 EventBridge](eventbridge.md)。

以下是即時 IVS 工作階段錄製的範例目錄結構和內容：

```
s3://mybucket/stageId/stageSessionId/participantId/timestamp
   events
      recording-started.json
      recording-ended.json
   media
      hls
	 multivariant.m3u8
         high
            playlist.m3u8
            1.mp4
      thumbnails
         high
            1.jpg
            2.jpg
      latest_thumbnail
         high
            thumb.jpg
```

`events` 資料夾包含對應於錄製事件的中繼資料檔案。JSON 中繼資料檔案會在錄製開始、成功結束或以失敗結束時產生：
+ `events/recording-started.json`
+ `events/recording-ended.json`
+ `events/recording-failed.json`

指定的 `events` 資料夾將包含 `recording-started.json` 以及 `recording-ended.json` 或 `recording-failed.json`。它們包含與錄製的工作階段及其輸出格式相關的中繼資料。JSON 的詳細資訊如下所示。

`media` 資料夾包含支援的媒體內容。`hls` 子資料夾包含錄製工作階段期間產生的所有媒體和資訊清單檔案，而且此子資料夾可以使用 IVS 播放器播放。如果已設定，`thumbnails` 和 `latest_thumbnail` 子資料夾會包含在錄製工作階段期間產生的 JPEG 縮圖媒體檔案。

## 合併分段的個別參與者錄製
<a name="ind-part-rec-merge-frag"></a>

錄製組態的 `recordingReconnectWindowSeconds` 屬性可讓您指定一段時間 (以秒計)，如果階段發布者中斷與階段之間的連線，接著重新連線，IVS 會嘗試錄製到與上一個串流工作階段相同的 S3 字首。換言之，如果發布者中斷連線後在指定的重新連線間隔內重新連線，則會將多個錄製視為單一錄製並合併在一起。

如果在 `SEQUENTIAL` 模式中啟用縮圖錄製，則縮圖也會合併在相同的 `recordingS3Prefix` 之下。合併錄製時，縮圖計數器會從先前的縮圖值 (為先前錄製寫入) 重新啟動。

**Amazon EventBridge 中的 IVS 錄製狀態變更事件：**由於 IVS 會稍待片刻以確保新的串流不啟動，所以錄製結束事件和錄製結束 JSON 中繼資料檔案至少會延遲 `recordingReconnectWindowSeconds`。

如需設定 merge-streams 功能的指示，請參閱《*開始使用 Amazon IVS 即時串流功能*》中的[步驟 2：建立具有選用參與者錄製的階段](getting-started-create-stage.md)。

### 資格
<a name="ind-part-rec-merge-frag-eligibility"></a>

若要使用相同的 S3 字首合併多個錄製，則所有錄製均必須符合特定條件：
+ 階段的 AutoParticipantRecordingConfiguration 之 `recordingReconnectWindowSeconds` 屬性值設定為大於 0。
+ 用於寫入 VOD 成品的 `StorageConfigurationArn`，對每一段錄製而言均相同。
+ 參與者離開和重新加入階段之間的秒數差異小於或等於 `recordingReconnectWindowSeconds`。

請注意，`recordingReconnectWindowSeconds` 的預設值為 0，這會停用合併。

## 同步多個參與者錄製
<a name="ind-part-rec-sync-multiple"></a>

個別參與者錄製在 HLS 播放清單中加入 `EXT-X-PROGRAM-DATE-TIME` 標籤，提供精確至毫秒的 UTC 時間戳記，可在後製處理期間同步多個參與者的錄製。

當您個別錄製多個參與者，並想建立同步合成 (例如並排或子母畫面版面配置) 時，您可以使用這些時間戳記來精準對齊錄製內容，即使參與者在不同時間加入舞台，或因網路中斷而可能畫面不連續。

每個參與者的 HLS 播放清單都包含標記下列項目的 `EXT-X-PROGRAM-DATE-TIME` 標籤：
+ 錄製的開頭 (第一個區段)。
+ 錄製期間的不連續點，例如拼接時。

這些時間戳記精確至毫秒，並使用相同時間參考在所有參與者間同步。

### 範例 HLS 播放清單
<a name="ind-part-rec-sync-multiple-hls-playlist"></a>

```
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:12
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="init-0.mp4"
#EXT-X-PROGRAM-DATE-TIME:2024-01-01T12:00:00.000Z
#EXTINF:3.30091,
0.mp4
#EXTINF:5.63794,
1.mp4
#EXTINF:2.74290,
2.mp4
#EXT-X-DISCONTINUITY
#EXT-X-MAP:URI="init-1.mp4"
#EXT-X-PROGRAM-DATE-TIME:2024-01-01T12:00:52.772Z
#EXTINF:2.54412,
3.mp4
#EXTINF:5.63649,
4.mp4
```

這些 `EXT-X-PROGRAM-DATE-TIME` 標籤提供第一個區段和每個不連續點的確切 UTC 時間，可與其他參與者的錄製精準同步。

### 同步工作流程
<a name="ind-part-rec-sync-multiple-workflow"></a>

若要同步多個參與者錄製，請從每個參與者的 HLS 播放清單中擷取 `EXT-X-PROGRAM-DATE-TIME` 時間戳記，並用來計算時間偏移。接著就可以使用 FFmpeg 等影片處理工具，在後製處理合成期間套用這些偏移。錄製出現不連續點時，那些時間點的時間戳記會提供必要的時間參考，在整個錄製期間持續準確同步。

注意：若為沒有後製處理的即時同步輸出，請考慮使用伺服器端合成，而不是個別參與者錄製。

## JSON 中繼資料檔案
<a name="ind-part-rec-json-metadata-files"></a>

此中繼資料為 JSON 格式。其中包含下列資訊：


| 欄位 | 類型 | 必要 | 描述 | 
| --- | --- | --- | --- | 
| `stage_arn` | string | 是 | 錄製來源舞台 ARN。 | 
| `session_id` | string | 是 | 字串，表示錄製的參與者所在舞台的 `session_id`。 | 
| `participant_id` | string | 是 | 字串，表示錄製的參與者識別碼。 | 
| `recording_started_at` | string | 有條件 | 錄製開始時，RFC 3339 UTC 時間戳記。如果 `recording_status` 為 `RECORDING_START_FAILED`，則無法使用此選項。此外，請參閱下文 `recording_ended_at` 中的備註。 | 
| `recording_ended_at` | string | 有條件 | 錄製結束時，RFC 3339 UTC 時間戳記。當 `recording_status` 為 `"RECORDING_ENDED"` 或 `"RECORDING_ENDED_WITH_FAILURE"` 時才可用。 **注意：**`recording_started_at` 和 `recording_ended_at` 是這些事件產生時的時間戳記，未必與 HLS 影片區段時間戳記完全一致。若要準確判斷錄製的持續時間，請使用 `duration_ms` 欄位。 | 
| `recording_status` | string | 是 | 錄製的狀態。有效值：`"RECORDING_STARTED"`、`"RECORDING_ENDED"`、`"RECORDING_START_FAILED"`、`"RECORDING_ENDED_WITH_FAILURE"`。 | 
| `recording_status_message` | string | 有條件 | 狀態的描述性資訊。當 `recording_status` 為 `"RECORDING_ENDED"` 或 `"RECORDING_ENDED_WITH_FAILURE"` 時才可用。 | 
| `media` | object | 是 | 包含此錄製可用媒體內容之列舉物件的物件。有效值：`"hls"`。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 是 | 說明 Apple HLS 格式輸出的列舉欄位。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | integer | 有條件 | 錄製的 HLS 內容的持續時間，以毫秒為單位。當 `recording_status` 為 `"RECORDING_ENDED"` 或 `"RECORDING_ENDED_WITH_FAILURE"` 時才可用。如果在任何錄製完成之前發生失敗，它為 0。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 儲存 HLS 內容之 S3 字首的相對路徑。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | HLS 主播放清單檔案的名稱。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 是 | 中繼資料物件的轉譯 (HLS 變體) 陣列。總是至少有一個轉譯。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 為此轉譯儲存 HLS 內容之 S3 字首的相對路徑。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 此轉譯的媒體播放清單檔案名稱。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 有條件 | 描述縮圖輸出的列舉欄位。僅當縮圖組態的 `storage` 欄位包括 `SEQUENTIAL` 時才可用 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 儲存循序縮圖內容之 S3 字首的相對路徑。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 是 | 中繼資料物件的轉譯 (縮圖變體) 陣列。總是至少有一個轉譯。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 為此轉譯儲存縮圖內容之 S3 字首的相對路徑。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 有條件 | 描述縮圖輸出的列舉欄位。僅當縮圖組態的 `storage` 欄位包括 `LATEST` 時才可用。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 儲存 `latest_thumbnail` 之 S3 字首的相對路徑。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | object | 是 | 中繼資料物件的轉譯 (縮圖變體) 陣列。總是至少有一個轉譯。 | 
|  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ivs/latest/RealTimeUserGuide/rt-individual-participant-recording.html)  | string | 是 | 針對此轉譯儲存最新縮圖之 S3 字首的相對路徑。 | 
| `version` | string | 是 | 中繼資料結構描述的版本。 | 

### 範例：recording-started.json
<a name="ind-part-rec-json-ex-rec-start"></a>

```
{
   "version": "v1",
   "stage_arn": "arn:aws:ivs:us-west-2:aws_account_id:stage/AbCdef1G2hij",
   "session_id": "st-ZyXwvu1T2s",
   "participant_id": "xYz1c2d3e4f",
   "recording_started_at": "2024-03-13T13:17:17Z",
   "recording_status": "RECORDING_STARTED",
   "media": {
      "hls": {
         "path": "media/hls",
         "playlist": "multivariant.m3u8",
         "renditions": [
            {
               "path": "high",
               "playlist": "playlist.m3u8"
            }
         ]
      },
      "thumbnails": {
         "path": "media/thumbnails",
         "renditions": [
            {
               "path": "high"
            }
         ]
      },
      "latest_thumbnail": {
         "path": "media/latest_thumbnail",
         "renditions": [
            {
               "path": "high"
            }
         ]
      }
   }
}
```

### 範例：recording-ended.json
<a name="ind-part-rec-json-ex-rec-end"></a>

```
{
   "version": "v1",
   "stage_arn": "arn:aws:ivs:us-west-2:aws_account_id:stage/AbCdef1G2hij",
   "session_id": "st-ZyXwvu1T2s",
   "participant_id": "xYz1c2d3e4f",
   "recording_started_at": "2024-03-13T19:44:19Z",
   "recording_ended_at": "2024-03-13T19:55:04Z",
   "recording_status": "RECORDING_ENDED",
   "media": {
      "hls": {
         "duration_ms": 645237,
         "path": "media/hls",
         "playlist": "multivariant.m3u8",
         "renditions": [
            {
               "path": "high",
               "playlist": "playlist.m3u8"
            }
         ]
      },
      "thumbnails": {
         "path": "media/thumbnails",
         "renditions": [
            {
               "path": "high"
            }
         ]
      },
      "latest_thumbnail": {
         "path": "media/latest_thumbnail",
         "renditions": [
            {
               "path": "high"
            }
         ]
      }
   }
}
```

### 範例：recording-failed.json
<a name="ind-part-rec-json-ex-rec-failed"></a>

```
{
   "version": "v1",
   "stage_arn": "arn:aws:ivs:us-west-2:aws_account_id:stage/AbCdef1G2hij",
   "session_id": "st-ZyXwvu1T2s",
   "participant_id": "xYz1c2d3e4f",
   "recording_started_at": "2024-03-13T19:44:19Z",
   "recording_ended_at": "2024-03-13T19:55:04Z",
   "recording_status": "RECORDING_ENDED_WITH_FAILURE",
   "media": {
      "hls": {
         "duration_ms": 645237,
         "path": "media/hls",
         "playlist": "multivariant.m3u8",
         "renditions": [
            {
               "path": "high",
               "playlist": "playlist.m3u8"
            }
         ]
      },
      "thumbnails": {
         "path": "media/thumbnails",
         "renditions": [
            {
               "path": "high"
            }
         ]
      },
      "latest_thumbnail": {
         "path": "media/latest_thumbnail",
         "renditions": [
            {
               "path": "high"
            }
         ]
      }
   }
}
```

## 將錄製轉換為 MP4
<a name="ind-part-rec-convert-rec-mp4"></a>

個別參與者錄製會以 HLS 格式儲存，包含播放清單和分段的 MP4 (fMP4) 區段。若要將 HLS 錄製轉換為單一 MP4 檔案，請安裝 FFmpeg 並執行下列命令：

```
ffmpeg -i /path/to/playlist.m3u8 -i /path/to/playlist.m3u8 -map 0:v -map 1:a -c copy output.mp4
```