

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

# 影片
<a name="bda-ouput-video"></a>

BDA 提供一組標準輸出，用於處理和產生影片的洞見。以下詳細說明每種操作類型：

## 完整影片摘要
<a name="video-summarization"></a>

完整影片摘要會產生整個影片的整體摘要。其中會將影片中呈現的關鍵主題、事件和資訊歸納為簡潔摘要。系統會針對具有描述性對話的內容最佳化完整影片摘要，例如產品概觀、訓練、新聞播報、談話節目和紀錄片。BDA 會嘗試根據完整影片摘要和場景摘要中的音訊訊號 (例如，發言者自我介紹) 或視覺訊號 (例如，簡報投影片會顯示發言者的名稱)，為每個唯一發言者提供名稱。唯一發言者的名稱未經過解析時，將以唯一數字表示 (例如 speaker\$10)。

## 章節摘要
<a name="video-scene-summarization"></a>

影片章節摘要提供影片中個別場景的描述性摘要。影片章節是影片中一系列鏡頭組成的序列，這些鏡頭共同構成一個連貫的動作或敘述單元。此功能會根據視覺和音訊提示，將影片細分為有意義的區段、提供那些區段的時間戳記，以及為每個區段提供總結。

## IAB 分類法
<a name="video-iab-classification"></a>

互動廣告協會 (IAB) 分類會套用標準廣告分類法，根據視覺和音訊元素將影片場景分類。對於預覽版，BDA 將支援 24 個第一層 (L1) 類別和 85 個第二層 (L2) 類別。若要下載 BDA 支援的 IAB 類別清單，請按一下[這裡](samples/iab-taxonomy.zip)。

## 完整音訊轉錄
<a name="full-audio-transcript"></a>

完整的音訊轉錄功能提供音訊檔案中所有語音的完整文字表示。其使用進階語音辨識技術來準確轉錄對話、敘述和其他音訊元素。轉錄包含發言者識別，可讓您根據發言者輕鬆瀏覽和搜尋音訊內容。

## 影片中的文字
<a name="text-in-video"></a>

此功能會偵測與擷取影片中以視覺效果顯示的文字。其可以同時識別靜態文字 (例如標題或字幕) 和動態文字 (例如在圖形中移動文字)。內容審核與影像文字偵測類似，會為每個偵測到的文字元素提供週框方塊資訊，讓您在影片影格內進行精確的當地語系化。

## 標誌偵測
<a name="video-logo-detection"></a>

此功能可識別影片中的標誌並提供週框方塊資訊，指出影片影格中每個偵測到標誌的座標，以及可信度分數。此功能預設為不啟用。

## 內容審核
<a name="video-content-moderation"></a>

內容審核會偵測影片中不適當、不需要或令人反感的內容。BDA 支援 7 個審核類別：露骨與非露骨的私密部位裸體及接吻、泳裝或內衣、暴力、藥物和煙草、酒精、仇恨符號。影片中的露骨文字不會標記出來。

您可以針對文字偵測等相關功能啟用或停用週框方塊和相關聯的可信度分數，以在影片檔案中提供位置座標和時間戳記。預設會啟用完整影片摘要、場景摘要和影片文字偵測。

**注意**  
 每個影片僅支援一個音軌。不支援字幕檔案格式 (例如 SRT、VTT 等)。

## 影片標準輸出
<a name="video-standard-output"></a>

以下範例是透過 BDA 處理之影片的標準輸出：

```
{
"metadata": {
    "asset_id": "0",
    "semantic_modality": "VIDEO",
    "s3_bucket": "bedrock-data-automation-gamma-assets-us-east-1",
    "s3_key": "demo-assets/Video/MakingTheCut.mp4",
    "format": "QuickTime / MOV",
    "frame_rate": 30,
    "codec": "h264",
    "duration_millis": 378233,
    "frame_width": 852,
    "frame_height": 480
  },
```

此初始區段說明有關影片的中繼資料資訊。其中包括儲存貯體位置、格式、影格率和其他關鍵資訊。

```
"shots": [ ...

    {
      "shot_index": 3,
      "start_timecode_smpte": "00:00:08:19",
      "end_timecode_smpte": "00:00:09:25",
      "start_timestamp_millis": 8633,
      "end_timestamp_millis": 9833,
      "start_frame_index": 259,
      "end_frame_index": 295,
      "duration_smpte": "00:00:01:06",
      "duration_millis": 1200,
      "duration_frames": 36,
      "confidence": 0.9956437242589935,
      "chapter_indices": [
        1
      ]
    },
```

這是回應中鏡頭元素的範例。鏡頭代表影片的一小部分，通常與影片中的剪輯相關聯。鏡頭包含開始和結束元素，還有 chapter\$1indicies 元素。此元素指出鏡頭所屬之影片較大區段 (稱為章節)。

```
"chapters": [
    {
      "start_timecode_smpte": "00:00:00:00",
      "end_timecode_smpte": "00:00:08:18",
      "start_timestamp_millis": 0,
      "end_timestamp_millis": 8600,
      "start_frame_index": 0,
      "end_frame_index": 258,
      "duration_millis": 8600,
      "shot_indices": [
        0,
        1,
        2
      ],
      "summary": "At an elegant outdoor venue, a man in a suit and a woman in a patterned dress stand on a raised platform overlooking a reflective pool. The setting is adorned with palm trees and lush greenery, creating a tropical atmosphere. The man initiates the event by asking if they should begin, to which the woman responds affirmatively. As the scene progresses, the focus shifts to a woman wearing a distinctive black and white patterned coat, her hair styled in a bun. She stands alone in a dimly lit room, facing away from the camera. The narrative then moves to a formal setting where a man in a dark suit stands before a curtain backdrop, suggesting he may be about to address an audience or perform. The scene concludes with a view of the entire venue, showcasing its tropical charm with a swimming pool surrounded by palm trees and decorative lighting, indicating it's prepared for a special occasion.",
```

章節是影片的較大片段。然後包含開始和結束資訊 (例如鏡頭)，以及 shot\$1indicies 元素。shot\$1indicies 會告訴您哪些鏡頭屬於某個章節。最後，摘要元素會提供章節內容的產生摘要。

```
 "frames": [...
         {
          "timecode_smpte": "00:00:03:15",
          "timestamp_millis": 3500,
          "frame_index": 105,
          "content_moderation": [],
          "text_words": [
            {
              "id": "266db64a-a7dc-463c-b710-7a178a2cc4cc",
              "type": "TEXT_WORD",
              "confidence": 0.99844897,
              "text": "ANDREA",
              "locations": [
                {
                  "bounding_box": {
                    "left": 0.1056338,
                    "top": 0.7363281,
                    "width": 0.19806337,
                    "height": 0.068359375
                  },
                  "polygon": [
                    {
                      "x": 0.1056338,
                      "y": 0.7363281
                    },
                    {
                      "x": 0.30369717,
                      "y": 0.7363281
                    },
                    {
                      "x": 0.30369717,
                      "y": 0.8046875
                    },
                    {
                      "x": 0.1056338,
                      "y": 0.8046875
                    }
                  ]
                }
              ],
              "line_id": "57b760fc-c410-418e-aee3-7c7ba58a71c2"
            },
```

影片的最小精細程度是影格，代表影片中的單一影像。影格有兩個值得注意的回應元素：content\$1moderation 和 text\$1words。第一個元素 content\$1moderation 會根據偵測到影格內容的內容審核類別，為您提供相關資訊。第二個元素 text\$1words 會提供影片中出現任何文字的位置和資訊，例如隱藏式字幕。

```
    "statistics": {
    "shot_count": 148,
    "chapter_count": 11,
    "speaker_count": 11
  }
}
```

最後，統計資料會提供與偵測資訊有關的明細，例如特定影片中有多少鏡頭、發言者和章節。