Create YouTube videos

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.

A <video> tag provides metadata about a YouTube video. Whereas the subtags of the <asset> tag identify and describe an asset, the subtags of the <video> tag define data that affects the way the video is displayed on YouTube's website or the way that YouTube users can locate the video by browsing or searching for videos.

A video is associated with exactly one reference. However, a reference will only be associated with a video if you have elected to create a public or private YouTube video from the reference.

The most common use case is to have an asset that has exactly one reference that will also be a public YouTube video. The sample feed below illustrates how you might construct a feed for this use case. In this case, the parser requires you to claim the video that is being created since the reference is being linked to an asset at the same time that the video is being created. The example identifies the rights administrator for the asset as well as the policy that will be applied to the claimed video.


    <asset type="web" tag="foo.mpg">
      <title>Webisode of Foo, attempt II
      <custom_id>1234-abcde
      
    

    <file type="video" tag="foo.mpg">
      <filename>foo.mpg
    

    <ownership/>

    <relationship>
      <item path="/feed/asset[@tag='foo.mpg']"/>
      <related_item path="/feed/ownership[1]"/>
    

    <video tag="foo.mpg">
      <title>Webisode of Foo
      <description>Catch new recipes from Foo.
      <keyword>FooReality
      <keyword>FooCooking
      <genre>Comedy
      <allow_embedding>False
      <allow_comments>Approve
      <allow_ratings>True
      <public>True
    

    <relationship>
      <item path="/feed/file[@tag='foo.mpg']"/>
      <related_item path="/feed/asset[@tag='foo.mpg']"/>
      <related_item path="/feed/video[@tag='foo.mpg']"/>
    

    <rights_admin type="usage" owner="True"/>
    <rights_admin type="match" owner="True"/>

    
    <rights_policy>
      <rule action="monetize"/>
    

    
    <claim type="audiovisual"
           video="/feed/video[@tag='foo.mpg']"
           asset="/feed/asset[@tag='foo.mpg']"
           rights_admin="/feed/rights_admin[@type='usage']"
           rights_policy="/feed/rights_policy[1]"/>

    <relationship>
      <item path="/feed/rights_admin[@type='match']"/>
      <item path="/feed/rights_policy[1]"/>
      <related_item path="/feed/asset[@tag='foo.mpg']"/>
    

* Nguồn: Youtube