Help Center/ Video On Demand/ User Guide/ Appendix/ JSON Message Body/ Thumbnail Generation Message Body
Updated on 2024-12-27 GMT+08:00

Thumbnail Generation Message Body

The condition for triggering thumbnail generation is to use the first frame of a video.

Successful Thumbnail Generation (Using the First Frame of a Video)

{
	"event_type": "coverComplete",
	"cover_info": {
		"status": "FAILED",
		"title": "XC1",
		"asset_id": "13d570ca574035a3efd7014689c34507",
		"error_code": "VOD.10013",
		"error_msg": "null",
		"cover_type": "HEAD_FRAME_COVER",
		"cover_urls": [{
			"offset": 0,
			"url": "https://651.cdn-vod.huaweicloud.com/asset/10757496f83e0eef6b8593be4eee1175/cover/Cover0.jpg"
		}]
	}
}

Message Body Description

Table 1 Cover_Info structure

Parameter

Description

status

Event status.

  • SUCCEED: Thumbnail generated.
  • FAILED: Thumbnail generation failed.

title

Media asset name.

asset_id

Media asset ID.

cover_type

Generated thumbnail type.

  • HEAD_FRAME_COVER: First frame as the thumbnail.

error_code

Error code. This parameter is available only when status is FAILED.

error_msg

Error description. This parameter is available only when status is FAILED.

cover_urls

URL of the thumbnail image. This parameter is available only when the thumbnail is generated.