Create assets
An asset is the representation of your intellectual property in the YouTube rights management system. An <asset> tag identifies and describes an asset. The tag’s type attribute indicates what kind of asset it is, such as a movie, music video, sound recording, or television episode. The other attributes provide various ways of identifying the asset when you need to refer to it later:
-
The id attribute is the unique identifier that YouTube assigns to the asset when you create it.
-
The tag attribute is a custom identifier that you assign to the asset. The tag should be unique for a given asset type, so that the combination of the type and tag attributes uniquely identifies one asset.
-
The path attribute enables you to identify an asset using an XPath.
You can use the tag and path attributes to refer to an asset defined in the current feed. The asset id doesn’t exist until you create the asset, so you can only use it when you update an existing asset.
The subtags of <asset> describe the asset. The available tags differ depending on the asset type. For example, a movie asset has a rating while a sound recording asset has an ISRC number. See Expected metadata fields for specific asset types for details about the tags for each asset type.
Examples
Television shows
The feed excerpts below demonstrate how to create show, season, and episode assets.
Note that you associate episodes and seasons with their show using the <show_custom_id> tag, not by defining a relationship between them.
-
Creating a show asset:
<asset type="show"> <title>Celebrities who like Peanut Butter a lot <description>This show profiles famous people who like peanut butter. <custom_id>2011-08-30-show1 <shows_and_movies_programming>True <genre>Comedy <actor>John Mary <actor>Mary John <keyword>comedy <url>http://peanutbutter.example.com <start_year>2009 <spoken_language>en
-
Creating a season asset:
<asset type="season"> <title>Celebrities who like Peanut Butter - Season 1 <custom_id>2011-08-30-season1 <show_custom_id>2011-08-30-show1 <shows_and_movies_programming>True <season>1 <season_name>The Legendary First Season
-
Creating an episode asset:
<asset type="episode"> <title>Sean Connery likes peanut butter <description>Sean Connery eats peanut butter on toast. <notes>Production code: NBBS096J; Length: 22:18 <custom_id>2011-08-30-episode1 <show_custom_id>2011-08-30-show1 <shows_and_movies_programming>True <season>1 <episode>1 <original_release_date>2009-01-21 <original_release_medium>Terrestrial TV <actor>John Mary <actor>Mary John <writer>Sally David <producer>David Sally <director>Monica Veronica <rating system="tvpg">TV-PG <content_type>Full Episode
Movies
The feed excerpt below demonstrates how to create a movie asset.
<asset type="movie">
<actor>Sarah Marshal
<content_type>Feature Film
<custom_id>BBEW-DW
<description>The Wiki is getting larger!
<director>Will Harper
<genre>Crime
<original_release_date>2010-01-01
<original_release_medium>Film
<producer>Griffin Harding
<producer>John Patterson
<title>Wiki Wiki Wiki II
<url>http://www.example.co.uk/wikiwikiwiki
<writer>Jack Sprat
Music
The XML excerpt below shows three assets. The first asset is a music video, the second is a sound recording, and the third is a composition.
<asset type="music_video">
<label>Windy Music
<title>Oboes are down on their luck
<genre>Blues
<isrc>US8970900486
<artist>Hot Dog McCarthy
<upc>00629217062280
<asset type="sound_recording" tag="ISRC">
<custom_id>YourID
<title>Foo Time
<album>We have all the Foo in the world
<artist>The Foos
<genre>Blues
<grid>
<isrc>
<label>Foo label
<asset type="composition" tag="T0913255414">
<title>Full-size Pickup Line
<notes>
<custom_id>764a8sx34
<iswc>T0913255414
<writer>Bridges,Ashley
<writer>House,Simon
Web video
The feed excerpt below demonstrates how to create a basic web video asset.
<asset type="web">
<custom_id>WEB-771
<description>Dave becomes a Web celebrity.
<notes>Production code: ABCDEFG; Length: 11'51"
<title>I am on the Internet
<url>http://hippydippy.example.com/seasons/one/ep001
* Nguồn: Youtube