ci:CreateMediaTemplate permission is required. For details, see Cloud Infinite action.POST /template HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>Content-Type: application/xml<body>
<Request><Tag>Snapshot</Tag><Name>TemplateName</Name><Snapshot><Mode>Interval</Mode><Width>1280</Width><Height>960</Height><Start>0</Start><TimeInterval>0.5</TimeInterval><Count>10</Count><SnapshotOutMode>OnlySprite</SnapshotOutMode><SpriteSnapshotConfig><Color>Aquamarine</Color><Columns>3</Columns><Lines>3</Lines></SpriteSnapshotConfig></Snapshot></Request>
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Request | None. | Container for saving requests | Container | Yes |
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Tag | Request | Template type: Snapshot | String | Yes |
Name | Request | Template name, only supports Chinese, English, digits, _, -, and *, with length not exceeding 64. | String | Yes |
Snapshot | Request | Screenshot parameter | Container | Yes |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Mode | Request.Snapshot | Snapshot mode Value range: {Interval, Average, KeyFrame} Interval indicates interval mode. Start, TimeInterval, and Count parameters take effect. When Count is set and TimeInterval is not set, it means capturing all frames, totaling Count images. Average indicates average mode. Start and Count parameters take effect. It means capturing images at average intervals from Start to the end of the video, totaling Count images. KeyFrame indicates key frame mode | String | Interval | No |
Start | Request.Snapshot | Start Time video duration Unit: second Support float format, execution accuracy accurate to milliseconds | String | 0 | No |
TimeInterval | Request.Snapshot | Screenshot interval (0 3600] Unit: seconds support float format, with execution accuracy accurate to milliseconds | String | None. | No |
Count | Request.Snapshot | Number of screenshots, value range: (0, 10000] | String | None. | Yes |
Width | Request.Snapshot | Wide Value range: [128, 4096] unit: px If only Width is set, calculate Height based on the original aspect ratio of the video. | String | Original width of the video | No |
Height | Request.Snapshot | High Value range: [128, 4096] unit: px If only Height is set, calculate Width based on the original aspect ratio of the video. | String | Original height of the video | No |
CIParam | Request.Snapshot | String | None. | No | |
IsCheckCount | Request.Snapshot | Whether to force check the screenshot number. When using custom interval mode for screenshots and the video duration is insufficient to capture Count screenshots, it can be converted to average screenshot mode to capture Count screenshots. | String | false | No |
IsCheckBlack | Request.Snapshot | Enable black screen check, parameter value: true, false | String | false | No |
BlackLevel | Request.Snapshot | Screenshot black screen check parameter Valid when IsCheckBlack=true Value reference range [30, 100], indicates the proportion of black pixels, the smaller the value, the smaller the black proportion. Start > 0, parameter setting is invalid, no filtering applied, black screen Start = 0, parameter is valid, the start time for frame capture is the first non-black frame. | String | Null | No |
PixelBlackThreshold | Request.Snapshot | Screenshot black screen check parameter Valid when IsCheckBlack=true Threshold for judging whether a pixel is a black pixel, value range: [0, 255] | String | Null | No |
SnapshotOutMode | Request.Snapshot | Screenshot output mode parameter OnlySnapshot: snapshot mode only OnlySprite: Only output sprite mode SnapshotAndSprite: Output screenshots and sprite mode | String | OnlySnapshot | No |
SpriteSnapshotConfig | Request.Snapshot | Sprite sheet output configuration | Container | None. | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
CellWidth | Request.Snapshot.SpriteSnapshotConfig | Single image width Value range: [8, 4096] Unit: px | String | Screenshot width | No |
CellHeight | Request.Snapshot.SpriteSnapshotConfig | Single image height Value range: [8, 4096] unit: px | String | Screenshot height | No |
Padding | Request.Snapshot.SpriteSnapshotConfig | Sprite sheet inner padding size Value range: [0, 1024] Unit: px | String | 0 | No |
Margin | Request.Snapshot.SpriteSnapshotConfig | Sprite sheet outer margin size Value range: [0, 1024] unit: px | String | 0 | No |
Color | Request.Snapshot.SpriteSnapshotConfig | String | None. | Yes | |
Columns | Request.Snapshot.SpriteSnapshotConfig | Number of columns in the sprite sheet, value range: [1, 10000] | String | None. | Yes |
Lines | Request.Snapshot.SpriteSnapshotConfig | Number of rows in the sprite sheet, value range: [1, 10000] | String | None. | Yes |
ScaleMethod | Request.Snapshot.SpriteSnapshotConfig | Sprite sheet scaling mode DirectScale: specify width and height scaling MaxWHScaleAndPad: specify maximum width and height scaling and padding MaxWHScale: specify maximum width and height scaling Actively set CellWidth and CellHeight, this parameter is valid only when | String | DirectScale | No |
<Response><RequestId>NTk0MjdmODlfMjQ4OGY3XzYzYzhf****</RequestId><Template><Tag>Snapshot</Tag><Name>TemplateName</Name><TemplateId>t1f16e1dfbdc994105b31292d45710642a</TemplateId><BucketId>test-1234567890</BucketId><Category>Custom</Category><Snapshot><Mode>Interval</Mode><Width>1280</Width><Height>960</Height><Start>0</Start><TimeInterval>0.5</TimeInterval><Count>10</Count><SnapshotOutMode>OnlySprite</SnapshotOutMode><SpriteSnapshotConfig><Color>Aquamarine</Color><Columns>3</Columns><Lines>3</Lines></SpriteSnapshotConfig></Snapshot><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None. | Container for saving results | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Template | Response | Container for saving results | Container |
RequestId | Response | unique request ID | String |
Node Name (Keyword) | Parent Node | Description | Type |
Tag | Response | Template type: Snapshot | String |
Name | Response | Template name | String |
TemplateId | Response | template ID | String |
UpdateTime | Response | Update time | String |
CreateTime | Response | Creation time | String |
Snapshot | Response | Detailed template parameters, same as Request.Snapshot | Container |
POST /template HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************Host: test-1234567890.ci.ap-beijing.myqcloud.comContent-Length: 1666Content-Type: application/xml<Request><Tag>Snapshot</Tag><Name>TemplateName</Name><Snapshot><Mode>Interval</Mode><Width>1280</Width><Height>960</Height><Start>0</Start><TimeInterval>0.5</TimeInterval><Count>10</Count><SnapshotOutMode>OnlySprite</SnapshotOutMode><SpriteSnapshotConfig><Color>Aquamarine</Color><Columns>3</Columns><Lines>3</Lines></SpriteSnapshotConfig></Snapshot></Request>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 100Connection: keep-aliveDate: Thu, 14 Jul 2022 12:37:29 GMTServer: tencent-cix-ci-request-id: NjMxMDJhYTNfMThhYTk0MGFfYmU1OV8zZjc=<Response><RequestId>NjMxMDJhYTNfMThhYTk0MGFfYmU1OV8zZjc=</RequestId><Template><Tag>Snapshot</Tag><Name>TemplateName</Name><TemplateId>t1f16e1dfbdc994105b31292d45710642a</TemplateId><BucketId>test-1234567890</BucketId><Category>Custom</Category><Snapshot><Mode>Interval</Mode><Width>1280</Width><Height>960</Height><Start>0</Start><TimeInterval>0.5</TimeInterval><Count>10</Count><SnapshotOutMode>OnlySprite</SnapshotOutMode><SpriteSnapshotConfig><Color>Aquamarine</Color><Columns>3</Columns><Lines>3</Lines></SpriteSnapshotConfig></Snapshot><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
Feedback