History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
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>Watermark</Tag><Name>TemplateName</Name><Watermark><Type>Text</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Text><Text>Watermark content</Text><FontSize>30</FontSize><FontType>simfang.ttf</FontType><FontColor>0x000000</FontColor><Transparency>30</Transparency></Text></Watermark></Request><Request><Tag>Watermark</Tag><Name>TemplateName</Name><Watermark><Type>Image</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Image><Url>http://test-1234567890.ci.ap-chongqing.myqcloud.com/shuiyin_2.png</Url><Mode>Proportion</Mode><Width>10</Width><Height></Height><Transparency>100</Transparency></Image></Watermark></Request>
Node Name (Keyword) | Parent Node | Description | Type |
Request | None. | Container for saving requests | Container |
Node Name (Keyword) | Parent Node | Description | Type | Required |
Tag | Request | Template type: Watermark | String | Yes |
Name | Request | Template name, only supports Chinese, English, digits, _, -, and *, with length not exceeding 64 | String | Yes |
Watermark | Request | Watermark information | Container | Yes |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Type | Request.Watermark | watermark type Text: text watermark Image: image watermark | String | None. | Yes |
Pos | Request.Watermark | reference position TopRight TopLeft BottomRight BottomLeft Left Right Top Bottom Center | String | None. | Yes |
LocMode | Request.Watermark | offset mode Relativity: proportion Absolute: fixed position | String | None. | Yes |
Dx | Request.Watermark | horizontal offset In image watermark, if Background is true: When locMode is Relativity, the unit is %, with a value range of [-300 0]; When locMode is Absolute, the unit is px, with a value range of [-4096 0]. In image watermark, if Background is false: When locMode is Relativity, the unit is %, with a value range of [0 100]; When locMode is Absolute, the unit is px, with a value range of [0 4096]. In text watermark, when locMode is Relativity, the unit is %, with a value range of [0 100]; when locMode is Absolute, the unit is px, with a value range of [0 4096]. When Pos is Top, Bottom, or Center, this parameter is invalid. | String | None. | Yes |
Dy | Request.Watermark | vertical offset In image watermark, if Background is true: When locMode is Relativity, the unit is %, with a value range of [-300 0]; When locMode is Absolute, the unit is px, with a value range of [-4096 0]. In image watermark, if Background is false: When locMode is Relativity, the unit is %, with a value range of [0 100]; When locMode is Absolute, the unit is px, with a value range of [0 4096]. In text watermark, when locMode is Relativity, the unit is %, with a value range of [0 100]; when locMode is Absolute, the unit is px, with a value range of [0 4096]. When Pos is Left, Right, or Center, this parameter is invalid. | String | None. | Yes |
StartTime | Request.Watermark | watermark start time [0, video duration] Unit: second Support float format, execution accuracy accurate to milliseconds | String | 0 | No |
EndTime | Request.Watermark | watermark end time [0, video duration] Unit: seconds Support float format, execution accuracy accurate to milliseconds | String | video end time | No |
SlideConfig | Request.Watermark | Watermark sliding configuration. After configuring this parameter, the watermark displacement setting does not take effect. Top Speed Codec/H265 transcoding currently does not support this parameter. | Container | None. | No |
Image | Request.Watermark | Image watermark node | Container | None. | No |
Text | Request.Watermark | Text watermark node | Container | None. | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
SlideMode | Request.Watermark.SlideConfig | Sliding mode Default: not enabled by default ScrollFromLeft: scroll from left to right If the ScrollFromLeft mode is set, the Watermark.Pos parameter does not take effect | String | None. | Yes |
XSlideSpeed | Request.Watermark.SlideConfig | Horizontal sliding speed, value ranges from 0 to 10 in integer | String | 0 | No |
YSlideSpeed | Request.Watermark.SlideConfig | Vertical sliding speed, value ranges from 0 to 10 in integer | String | 0 | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Url | Request.Watermark.Image | Watermark image address | String | None. | Yes |
Mode | Request.Watermark.Image | Size mode Original size Proportion: proportion Fixed size | String | None. | Yes |
Width | Request.Watermark.Image | Width When Mode is Original, watermark image width settings are not supported. When Mode is Proportion, unit is %, background image value range: [100 300]; foreground image value range: [1 100], relative to video width, maximum not exceeding 4096px. When Mode is Fixed, unit is px, value range: [8, 4096] If only Width is set, calculate Height based on the watermark image proportion. | String | None. | No |
Height | Request.Watermark.Image | High When Mode is Original, watermark image height settings are not supported. When Mode is Proportion, unit is %, background image value range: [100 300]; foreground image value range: [1 100], relative to video height, maximum not exceeding 4096px. When Mode is Fixed, unit is px, value range: [8, 4096] If only Height is set, calculate Width based on the watermark image proportion. | String | None. | No |
Transparency | Request.Watermark.Image | Transparency, value range: [1 100], unit % | String | None. | Yes |
Background | Request.Watermark.Image | Whether background image, value: true, false | String | false | No |

Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
FontSize | Request.Watermark.Text | Font size, value range: [5 100], unit px | String | None. | Yes |
FontType | Request.Watermark.Text | Font type, refer to the table below | String | None. | Yes |
FontColor | Request.Watermark.Text | Text color, format: 0xRRGGBB | String | None. | Yes |
Transparency | Request.Watermark.Text | Transparency, value range: [1 100], unit % | String | None. | Yes |
Text | Request.Watermark.Text | Watermark content, length not exceeding 64 characters, only supports Chinese, English, digits, _, -, and * | String | None. | Yes |
Font Name | Supported Languages | Description |
simfang.ttf | Chinese/English | FangSong |
simhei.ttf | Chinese/English | Blackbody |
simkai.ttf | Chinese/English | KaiTi |
simsun.ttc | Chinese/English | Song Typeface |
STHeiti-Light.ttc | Chinese/English | STHeiti |
STHeiti-Medium.ttc | Chinese/English | STHeiti |
youyuan.TTF | Chinese/English | YouYuan |
ariblk.ttf | Create and bind a policy Query an instance Reset the access password of an instance | None. |
arial.ttf | Create and bind a policy Query an instance Reset the access password of an instance | None. |
ahronbd.ttf | Create and bind a policy Query an instance Reset the access password of an instance | None. |
Helvetica.dfont | Create and bind a policy Query an instance Reset the access password of an instance | None. |
HelveticaNeue.dfont | Create and bind a policy Query an instance Reset the access password of an instance | None. |
<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><Template><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Tag>Watermark</Tag><Name>TemplateName</Name><BucketId>test-1234567890</BucketId><Category>Custom</Category><Watermark><Type>Text</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Text><Text>Watermark content</Text><FontSize>30</FontSize><FontType>simfang.ttf</FontType><FontColor>0x000000</FontColor><Transparency>30</Transparency></Text></Watermark><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 template details | Container |
RequestId | Response | unique request ID | String |
Node Name (Keyword) | Parent Node | Description | Type |
TemplateId | Response.Template | template ID | String |
Name | Response.Template | Template Name | String |
BucketId | Response.Template | Template's bucket | String |
Category | Response.Template | Template Properties, Custom or Official | String |
Tag | Response.Template | Template type, VideoProcess | String |
UpdateTime | Response.Template | Update time | String |
CreateTime | Response.Template | Creation time | String |
Watermark | Response.Template | Request.Watermark in the request body | 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-chongqing.myqcloud.comContent-Length: 1666Content-Type: application/xml<Request><Tag>Watermark</Tag><Name>TemplateName</Name><Watermark><Type>Text</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Text><Text>Watermark content</Text><FontSize>30</FontSize><FontType>simfang.ttf</FontType><FontColor>0x000000</FontColor><Transparency>30</Transparency></Text></Watermark></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: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><Template><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Tag>Watermark</Tag><Name>TemplateName</Name><BucketId>test-1234567890</BucketId><Category>Custom</Category><Watermark><Type>Text</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Text><Text>Watermark content</Text><FontSize>30</FontSize><FontType>simfang.ttf</FontType><FontColor>0x000000</FontColor><Transparency>30</Transparency></Text></Watermark><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
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-chongqing.myqcloud.comContent-Length: 1666Content-Type: application/xml<Request><Tag>Watermark</Tag><Name>TemplateName</Name><Watermark><Type>Image</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Image><Url>http://test-1234567890.ci.ap-chongqing.myqcloud.com/shuiyin_2.png</Url><Mode>Proportion</Mode><Width>10</Width><Height>10</Height><Transparency>30</Transparency></Image></Watermark></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: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><Template><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Tag>Watermark</Tag><Name>TemplateName</Name><BucketId>test-1234567890</BucketId><Category>Custom</Category><Watermark><Type>Image</Type><LocMode>Absolute</LocMode><Dx>128</Dx><Dy>128</Dy><Pos>TopRight</Pos><StartTime>0</StartTime><EndTime>100.5</EndTime><Image><Url>http://test-1234567890.ci.ap-chongqing.myqcloud.com/shuiyin_2.png</Url><Mode>Proportion</Mode><Width>10</Width><Height>10</Height><Transparency>30</Transparency></Image></Watermark><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários