When you upload a video in the ApsaraVideo VOD console, you can specify a thumbnail for the video. If you do not specify a thumbnail for the video, ApsaraVideo VOD randomly selects one of the snapshots of the video as the thumbnail. You can change the thumbnail after the video is uploaded.
Background information
Each video that you upload to ApsaraVideo VOD has a thumbnail. ApsaraVideo VOD provides multiple methods for you to change the thumbnail. If you specify an image when you upload a video, the specified image is used as the thumbnail. Otherwise, ApsaraVideo VOD takes snapshots of the video and randomly selects one of the snapshots as the thumbnail. You can change the thumbnail after the video is uploaded.
Preparations
An Alibaba Cloud account is created and real-name verification is complete. To create an Alibaba Cloud account, visit the Alibaba Cloud official website. For more information about how to create an Alibaba Cloud account, see Create an Alibaba Cloud account.
Obtain an AccessKey pair to complete identity verification so that you can call server API operations. For more information about how to obtain an AccessKey pair, see Obtain an AccessKey pair.
- If a domain name is bound to a service region, you must configure a certificate for the domain name before you set the thumbnail. For more information about how to configure a certificate for a domain name, see Enable HTTPS secure acceleration. If no domain name is bound to a service region, you can directly specify the thumbnail.
Set the thumbnail in the ApsaraVideo VOD console
- Log on to the ApsaraVideo VOD console.
- In the left-side navigation pane, choose Media Files > Audio/Video.
- Find the video for which you want to change the thumbnail and click Manage in the Actions column. Note
After a video is uploaded, ApsaraVideo VOD selects one of the snapshots of the video as the thumbnail.
- Click Editing Video Information and select one of the snapshots that are automatically taken to use as the thumbnail. You can also click Upload and select a local image to upload it as the thumbnail. Note The uploaded image must be in the PNG or JPG format. The maximum size is 1 MB, and the maximum resolution is 1920 × 1080 pixels.
Set the thumbnail by using the API or SDK
ApsaraVideo VOD provides various methods to upload videos. You can specify the thumbnail when you upload a video. If you do not specify a thumbnail, ApsaraVideo VOD takes snapshots of the video and randomly selects one of the snapshots as the thumbnail. You can call the following operations to set the thumbnail:
- When you call the CreateUploadVideo operation, you can set the CoverURL parameter to the URL of the thumbnail that you want to specify.
- When you call the UploadMediaByURL operation, you can set the CoverURL field in the UploadMetadata parameter to the URL of the thumbnail that you want to specify.
- If a video file is stored in Object Storage Service (OSS), you can call the RegisterMedia operation to register the video file in ApsaraVideo VOD. When you call this operation, you can set the CoverURL field in the RegisterMetadata parameter to the URL of the thumbnail that you want to specify.
- If the video file is uploaded, you can call the UpdateVideoInfo or UpdateVideoInfos operation to set the CoverURL parameter to the URL of the thumbnail that you want to specify.