ApsaraVideo VOD allows you to categorize media assets including audio, video, image, and short video materials to facilitate the retrieval and management of media assets.
Limits
You can create a maximum of 3 levels of categories for audio, video, and image files and 2 levels of categories for short video materials. Each category level can contain a maximum of 100 subcategories.
Procedure
Step 1: Create a category
Create a category by using the ApsaraVideo VOD console
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Configuration Management > Media Management > Categories.
Create a category.
Audio, video and image category
ImportantYou can create a maximum of 3 levels of categories for audio, video, and image files and each category level can contain a maximum of 100 subcategories.
On the Audio and Video / Image Category tab, click Add Level 1 Category, specify a category name, and then press Enter to add a category in the same level.
By default, the category tree is empty. You can build category trees based on your business requirements.
You can also use keyboard shortcuts to add or delete a parent category or subcategory.
Enter: adds a same-level category.
Alt+Enter: adds a subcategory. A maximum of three levels are supported.
Delete: deletes a category.
Short video material category
ImportantYou can create a maximum of 2 levels of categories for short video materials and each category level can contain a maximum of 100 subcategories.
On the Short Video Material Category tab, click the icon displayed on a level 1 category, specify a category name, and then press Enter to add a category in the same level.
MV, Face Sticker, Dynamic Sticker, Subtitle, and Font are built-in level 1 categories. These categories cannot be modified. You can create a category tree for each level 1 category.
You can also use keyboard shortcuts to add or delete a parent category or subcategory.
Enter: adds a same-level category.
Alt+Enter: adds a subcategory. A maximum of two levels are supported.
Delete: deletes a category.
Create a category by using the ApsaraVideo VOD API
Call the AddCategory operation to create a category or subcategory.
Step 2: Category media assets
Category media assets by using the ApsaraVideo VOD console
This section demostrates how to category a video. You can use similar methods to categorize audio, image, and short video materials.
Categorize a video during upload
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Media Files > Audio/Video.
On the Audio/Video page, click Upload.
On the Upload Media page, click Add Media. In the Add Media dialog box, specify parameters such as the upload method and bucket.
After you add the video that you want to upload, select a category from the Uncategorized drop-down list.
Click Upload.
After the video is uploaded, you can view the video and its category on the Audio/Video page.
Categorize an existing video
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Media Files > Audio/Video.
Click Manage in the Actions column of the video that you want to categorize.
On the Basic Information tab, click Editing Video Information.
Select a category from the Category drop-down list.
Click Save.
You can view the category of the video on the Audio/Video page.
Category media assets by using the ApsaraVideo VOD API
Categorize a video during upload
Specify the CateId
or CateIds
parameter when you call the following API operations to obtain upload credentials or upload media files:
Categorize an existing video
Specify the CateId
or CateIds
parameter when you call the following API operations to modify the information of media assets:
Step 3: Query media assets based on categories
Query media assets by using the ApsaraVideo VOD console
This section demostrates how to query videos. You can use similar methods to query audio, image, and short video materials.
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Media Files > Audio/Video.
Click the icon in the Category column, select a category, and then click OK.
Only audio and video files that are labeled with the specified category are displayed on the Audio/Video tab.
Query media assets by using the ApsaraVideo VOD API
Call the SearchMedia operation and specify filter conditions for the Match
parameter to query media assets based on the category name (CateName
) or category ID (CateId
).
What to do next: Manage categories
After you create a category, you can query, delete, and modify the category.
When you delete a category, all its sub-categories are deleted at the same time. Exercise caution when you delete a category.
Manage categories by using the ApsaraVideo VOD console
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Configuration Management > Media Management > Categories.
Perform the following operations in the ApsaraVideo VOD console: modify categories, add subcategories, delete categories, and use keyboard shortcuts to manage categories.
Manage categories by using the ApsaraVideo VOD API
You can call the following API operations to modify, query, and delete categories: