選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

Enabling and retrieving thumbnails programmatically

焦點模式
Enabling and retrieving thumbnails programmatically - AWS Elemental MediaConnect
此頁面尚未翻譯為您的語言。 請求翻譯

You can use the AWS CLI to work with thumbnails programmatically. The following information assumes that you are familiar with the basics of using the AWS CLI. For information about the basics, see the AWS CLI Command Reference.

You enable thumbnails separately in each flow. You can enable thumbnails when you first create a flow or you can enable them in an existing flow.

After thumbnails are active, MediaConnect automatically starts to generate them whenever the flow is active. It generates one thumbnail at most once every second. (For more information about the generation rate, see How thumbnails are generated.) You can retrieve the most recently generated thumbnail.

Enabling thumbnails

Use the CreateFlow or UpdateFlow command. This command is represented differently in different interfaces:

  • In the AWS CLI, the commands are create-flow or update-flow.

  • In the API, the command is an HTTP POST on CreateFlow or by an HTTP PUT on UpdateFlow.

  • In the AWS SDKs, the command is represented by constructs that are suitable to that SDK language.

To enable thumbnails using the AWS CLI

Enter the create-flow or update-flow command. This example illustrates the update-flow command. Replace the ARN with your ARN.

aws mediaconnect update-flow --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:AwardsShow --source-monitoring-config ThumbnailState=ENABLED

Retrieving thumbnails

To retrieve thumbnails with the AWS CLI, use the DescribeFlowSourceThumbnail command. This command is represented differently in different interfaces:

  • In the AWS CLI, the command is describe-flow-source-thumbnail.

  • In the API, the command is an HTTP GET on Source-thumbnail.

  • In the AWS SDKs, the command is represented by constructs that are suitable to that SDK language.

To retrieve thumbnails using the AWS CLI

Enter the describe-flow-source-thumbnail command. Replace the ARN with your ARN.

aws mediaconnect describe-flow-source-thumbnail --flow-arn arn:aws:mediaconnect:us-east-1:111122223333:flow:1-23aBC45dEF67hiJ8-12AbC34DE5fG:AwardsShow

The response

The request results in a status code and a response.

  • Status code 200: The request was processed successfully. This typically means that the response includes the flow source thumbnail in base64 encoding.

    However, in some cases, MediaConnect might return a 200 status code even when a thumbnail couldn't be retrieved. In these situations, the response includes an error message explaining why the thumbnail couldn't be generated:

    • ThumbnailDecodeError: The video source doesn't meet the requirements, or there is no ingress traffic on the flow. Therefore, MediaConnect can't generate a thumbnail.

    • ThumbnailGenerationInProgress: The thumbnail is still being generated. Wait a few seconds and try again.

    • ThumbnailSuppressed: Typically this error occurs because the CPU and memory required to process the flow is currently high. If MediaConnect generated thumbnails now, the flow handling would slow down. Try again after a few seconds. If the problem persists, see the information in Requirements for the flow.

  • Status code 202: The request is valid, but MediaConnect is still preparing the flow. As a result, a thumbnail can't be generated yet. Wait a few seconds and try again.

  • Status code 4xx: The request isn't valid.

  • Status code 5xx: The request is valid but MediaConnect couldn't fulfill the request.

在本頁面

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。