Create assets

30/11/2019
The YouTube XML format is being replaced by DDEX (music only) and CSV templates (all industries). YouTube strongly discourages any new implementations of the YouTube XML format. This page should be used solely as reference material for existing implementations. Visit Using the YouTube DDEX feed for more information about the new format.
The features described in this article are available only to partners who use YouTube's Content Manager to manage their copyrighted content.

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.

A show must exist before you can add a season to that show, and the show and season must both exist before you can add an episode. Therefore, you can’t create a show, season, and episodes in the same content feed. Submit a feed creating the show asset. After YouTube has processed the feed, submit a second feed to create the season asset, then a third feed to add episode to that season.

Note that you associate episodes and seasons with their show using the <show_custom_id> tag, not by defining a relationship between them.

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