Membuat Template watermark image atau teks. ApsaraVideo VOD memungkinkan Anda membuat Template watermark untuk menggunakan kembali konfigurasi parameter seperti posisi, ukuran, font, dan warna watermark. Setiap Template watermark diberi ID unik. Hal ini menyederhanakan pemrosesan tugas watermark.
Deskripsi operasi
You can call this operation to create an
Imagewatermark template or aTextwatermark template. You can use static images in the PNG format or dynamic images in the GIF, APNG, and MOV formats as image watermarks.After you call this operation to create a watermark template, you must call the AddTranscodeTemplateGroup or UpdateTranscodeTemplateGroup operation to associate the watermark template with a transcoding template group. This way, you can add watermarks to videos during transcoding.
For more information, see Video watermarks.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:AddWatermark |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Type |
string |
Yes |
Tipe Template watermark. Nilai valid:
|
Text |
| Name |
string |
Yes |
Nama Template watermark.
|
watermark |
| WatermarkConfig |
string |
Yes |
Informasi konfigurasi watermark seperti posisi tampilan dan efek khusus. Nilai harus berupa string dalam format JSON. Parameter konfigurasi untuk watermark image dan teks berbeda. Untuk informasi selengkapnya tentang struktur parameter, lihat WatermarkConfig. |
{"Width":"55","Height":"55","Dx":"9","Dy":"9","ReferPos":"BottonLeft"} |
| FileUrl |
string |
No |
URL file watermark. URL harus berupa URL Object Storage Service (OSS) dalam format yang tidak boleh berisi informasi yang digunakan untuk Penandatanganan URL. Catatan
|
http://outin-326268*****63e1403e7.oss-cn-shanghai.aliyuncs.com/image/cover/C99345*****E7FDEC-6-2.png |
| AppId |
string |
No |
ID aplikasi dalam format. Nilai default: app-1000000. Jika Anda telah mengaktifkan layanan multi-aplikasi, tentukan ID aplikasi untuk menambahkan Template watermark di aplikasi yang ditentukan. Untuk informasi selengkapnya, lihat Ikhtisar. |
app-**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
25818875-5F78-4A*****F6-D7393642CA58 |
| WatermarkInfo |
object |
The information about the watermark template. |
|
| CreationTime |
string |
The time when the watermark template was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2018-11-07T09:05:52Z |
| Type |
string |
The type of the watermark template.
|
Text |
| IsDefault |
string |
Indicates whether the watermark template is the default one. Valid values:
|
NotDefault |
| FileUrl |
string |
The URL of the watermark file. The URL is an Object Storage Service (OSS) URL or an Alibaba Cloud CDN URL. Catatan
This parameter is returned only for image watermark templates. |
https://outin-3262*****9f4b3e7.oss-cn-shanghai.aliyuncs.com/image/cover/E6C3448CC8B715E6F8A72EC6B-6-2.png?Expires=1541600583&OSSAccessKeyId=****&Signature=gmf1eYMoDVg%2BHQCb4UGozBW**** |
| WatermarkConfig |
string |
The configuration information of the watermark such as the display position and special effects. The value is a JSON string. The configuration parameters for image and text watermarks are different. For more information about the parameter structure, see WatermarkConfig. |
{"FontColor": "Blue","FontSize": 80, "Content": "watermark test" } |
| Name |
string |
The name of the watermark template. |
text watermark test |
| WatermarkId |
string |
The ID of the watermark template. |
9bcc8bfadb84*****109a2671d0df97 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "25818875-5F78-4A*****F6-D7393642CA58",
"WatermarkInfo": {
"CreationTime": "2018-11-07T09:05:52Z",
"Type": "Text",
"IsDefault": "NotDefault",
"FileUrl": "https://outin-3262*****9f4b3e7.oss-cn-shanghai.aliyuncs.com/image/cover/E6C3448CC8B715E6F8A72EC6B-6-2.png?Expires=1541600583&OSSAccessKeyId=****&Signature=gmf1eYMoDVg%2BHQCb4UGozBW****",
"WatermarkConfig": "{\"FontColor\": \"Blue\",\"FontSize\": 80, \"Content\": \"watermark test\" }",
"Name": " text watermark test",
"WatermarkId": "9bcc8bfadb84*****109a2671d0df97"
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.