Genres and categories
The following sections describe the schemes for categorizing different types of assets:
Movie genres
You must specify at least one genre for movie assets using the <genre> tag that is a subtag of <asset>. (You can specify more than one.) The movie genre also appears as the <movie_genre> on the associated video.
The genres listed below are valid for movies and trailers.
|
|
* Only valid in Japan.
† Also valid for Google Play Japan.
‡ Only valid in Australia.
Music genres
You must specify at least one genre for sound recordings that are included in the AudioSwap program. You can also specify genres for music video assets. If you specify an invalid genre for an AudioSwap recording, YouTube uses the default genre Other instead of the invalid genre. Valid genres for AudioSwap are:
|
|
Television genres
You must specify at least one genre for television show assets (you can specify more than one.) The genres listed below are valid for all TV show assets.
|
|
* Also valid for Google Play.
† Also valid for Google Play Japan.
Web video categories
Whereas the previous sections explained how to specify the genre of an asset, this section explains how to specify the category for a video. This value is specified in the <genre> tag that is a subtag of <video>.
The YouTube category document, which can be downloaded from http://gdata.youtube.com/schemas/2007/categories.cat, identifies the categories that you can use to classify web video content. The category document is an XML file that identifies the categories and indicates whether new videos can be assigned to each category. The document also identifies the countries where each category is browsable on YouTube.
The excerpt below shows the entries for the "Entertainment" and "Nonprofit & Activism" categories as they appear in the YouTube category document as of August 13, 2008. Please note that videos could be assigned to both categories. In addition, the document lists many countries where the "Entertainment" category is browsable but indicates that the "Nonprofit & Activism" category was only browsable in the United States at that time.
As shown in the example, the presence of the <yt:assignable> tag indicates that new videos may be assigned to that category. (New videos cannot be assigned to categories that are not marked as assignable using the <yt:assignable> tag.) In addition, the presence of the <yt:browsable> tag indicates that the corresponding category is browsable on YouTube in one or more countries. The <yt:browsable> tag's regions attribute contains a space-delimited list of two-letter region IDs that identify the particular countries where the category is browsable. Categories that are neither assignable or browsable are deprecated and are identified as such using the <yt:deprecated> tag.
If you have retrieved the default category list, then you can set the <genre> tag's value to either the term or the label attribute value. For example, both of the following values are valid ways of identifying the same video genre:
<genre>Film
<genre>Film & Animation
Localized category lists for web videos
You can also retrieve localized category lists that specify category labels for classifying video content in particular languages. You can download these lists from http://gdata.youtube.com/schemas/2007/categories.cat?hl=
Language/Locale | hl Parameter Value |
---|---|
Chinese (Traditional) | zh-TW |
Czech | cs-CZ |
Dutch | nl-NL |
English (Great Britain, Ireland, Australia and New Zealand) | en-GB |
English (United States and Canada) * default value |
en-US |
French | fr-FR |
German | de-DE |
Italian | it-IT |
Japanese | ja-JP |
Korean | ko-KR |
Polish | pl-PL |
Portuguese (Brazil) | pt-BR |
Russian | ru-RU |
Spanish (Spain) | es-ES |
Spanish (Mexico) | es-MX |
Swedish | sv-SE |
The XML excerpt below shows the entries for the "Entertainment" and "Nonprofit & Activism" categories as they appear in the YouTube category document for the French language as of May 5, 2008:
Set the <genre> tag's value to the term attribute value for the category. Note that the only label attribute values that are valid values for the <genre> tag are those from the default category document (hl=en-US).
* Nguồn: Youtube