You are on page 1of 92

YouTube Content Feed Specification

Revised: September 18, 2009

Table of Contents

Overview
Delivering content feeds to YouTube
Video specifications
Providing information about your assets
Setting content policies
Applying saved policies
Showing Ads on a Video
In-stream ads
InVideo ads
AdSense ads
Specifying category metadata
Managing playlists and playlist content
Providing captions for a video
Sample XML feed
XML tag definitions for content feeds
RSS tags
Media RSS tags
YouTube XML schema tags
Status reports
XML Structure for Status Reports
Sample XML for status reports
XML tag definitions for status reports
Appendixes
Appendix A - Valid categories for video content
Localized category lists
Appendix B - Protecting video content on YouTube
Appendix C - Validating a feed with the YouTube XML Validator
Appendix D - Additional XML feed examples for TV videos
Appendix E - Generating an SSH key
Appendix F - Posting a file to an SFTP server
Revision History

Overview

This documentation defines an XML feed format that allows you to provide metadata about your
video content to YouTube. Content feeds allow you to insert, update, replace or delete videos in
YouTube's video library. YouTube uses this library to create video ID files to block, promote or
track your videos. If you choose, you can also make your videos publicly available on YouTube's
website.

YouTube content feeds allow you to associate several types of information with each of your
videos:

Google proprietary and confidential. The features described in this document are subject to change. 1 of 92
• An indication of whether you want to make the video publicly available on YouTube for
promotional purposes or under a revenue-sharing agreement, or if you want to keep the
video private/secure and have YouTube use it solely to create an ID file for blocking
purposes.

• Policy information that determines how YouTube uses the video. Some policies are only
relevant to videos that are publicly visible on YouTube's website. For example, you can
include those videos in your revenue-sharing agreement with YouTube.

• Information about the video, including its title, description, recording date and language.
If the video is publicly available on YouTube, this information might be displayed to
people who view your video. If the video is not publicly available, this information could
still be used to help identify user-uploaded content that matches your video.

• Values that uniquely identify the video, such as ISRCs, GRIDs, or other custom IDs.

• A pointer to the file that contains the actual video content.

• Other information that will help YouTube provide correct attribution for any videos that
you choose to make publicly available on YouTube's website.

Note: In your content feed, you can specify policy information on a video-by-video basis. As such,
you have the option of providing some videos that are publicly visible to YouTube users while
providing other videos that YouTube uses solely to prevent other users from uploading
unauthorized uses of your work.

About this Document

This document contains the following sections:

• The Delivering content feeds to YouTube section explains steps that you need to
complete to be able to deliver content feeds to YouTube. It also explains formatting
requirements for your XML feeds. Finally, this section describes the process by which
YouTube retrieves and processes your files.

• The Video specifications section explains encoding specifications for your uploaded
videos.

• The Providing information about your assets section explains how to construct your
metadata feeds. This section begins by defining the different operations that you can
perform via your content feeds. The following subsections then explain how to include
other information about your videos:

◦ The Setting content policies section explains different policies that you can set
on a video-by-video basis for each video in your feed. For example, this section
explains exactly what you need to do to indicate that a video should not be
publicly visible on YouTube.
◦ The Showing ads on a video section describes different advertising options
available to partners that want to monetize their videos. It explains each option
and how to enable or disable particular types of ads for a video.
◦ The Specifying category metadata section explains the category-specific
attributes that can be specified for movie, TV and web videos.

Google proprietary and confidential. The features described in this document are subject to change. 2 of 92
◦ The Managing playlists and playlist content section explains how to add videos
to playlists, update the order of playlist videos, or remove videos from playlists.
◦ The Providing captions for a video section explains how to specify the location
of caption file(s) for a video. This section also discusses supported formats for
caption files and explains how YouTube handles captions when you update or
replace a video.

• The Sample XML feed section demonstrates how a content feed would request different
types of operations.

• The XML tag definitions section defines each XML tag that may appear in a YouTube
content feed. Content feeds are based on the RSS feed format and use several RSS
tags. Feeds also incorporate elements defined in both the YouTube content schema and
the Media RSS module.

• The Status reports section discusses the reports that YouTube will post after processing
your content feeds. These reports specify each action that YouTube takes on your
videos. Reports also indicate whether each action is successful. This section explains
the file naming conventions for status reports, provides a sample report, and defines the
XML elements that appear in status reports.

• The Appendixes provide additional information to help you to create your content feeds.

◦ Appendix A - Valid categories for video content defines the values that you may
use for the <media:category> tag in your content feeds.
◦ Appendix B - Protecting video content on YouTube briefly explains some of the
mechanisms that YouTube uses to ensure that user-submitted content does not
infringe on our content partners' copyrights.
◦ Appendix C - Validating a feed with the YouTube XML Validator explains how to
use a YouTube Content Manager tool to verify that your feed is valid.
◦ Appendix D - Additional XML feed examples provides additional examples that
demonstrate usage of all of the XML tags that may appear in your content
feeds.
◦ Appendix E - Generating an SSH key explains how to generate an SSH key in
a Linux, Windows or Mac environment. You need to provide your SSH public
key information before you can upload your content and content feeds to
YouTube.
◦ Appendix F - Posting a file to an SFTP server discusses the steps for
connecting to your SFTP dropbox account and posting files to that account.

Delivering content feeds to YouTube

This section explains the steps that you need to complete to be able to deliver videos and XML
content feeds to YouTube via an SFTP dropbox account. If you enroll in YouTube's Video
Identification system, then by delivering your videos and feed(s), you will enable YouTube to use
its Content ID technology to identify instances when YouTube users upload videos that contain
your content, in whole or in part. Your content feeds specify the policies that dictate how YouTube
uses your videos and how YouTube handles user-uploaded videos that match your videos. As
discussed in the Setting content policies section, regardless of whether you want YouTube to
monetize, block or track user-uploaded videos that match your videos, you can specify different
policies for each video that you provide to YouTube. Note that you only need to set up your
account once.

Google proprietary and confidential. The features described in this document are subject to change. 3 of 92
1. Create a YouTube account that will function as your default account. You will specify this
account in your feed, which will enable the account to update, replace or delete any
videos that you own or are authorized to administer. The content that you upload will be
associated with your default account unless you specify a different account in your
content feed. You can specify a different owner for all items in a feed or for individual
items in a feed.

2. Log in to your YouTube Content Manager account.

3. Click the Account Settings link at the top of the page.

4. Click the SFTP Dropbox Account link to manage your SFTP dropbox settings.

5. On the Manage SFTP Dropbox Account page, enter the following information:

◦ In the Upload Notification Emails field, enter any email addresses to which
YouTube should send status reports for your uploaded content feeds. Separate
multiple email addresses with a space.

◦ In the Default YouTube User field, select the YouTube user account that will,
by default, be designated as the owner of the content described in your content
feeds. The <yt:account> tag definition explains how to override this default
setting.

◦ In the Permitted IPs field, enter a list of IP addresses from which you will
connect to the SFTP dropbox. You must enter exact IP addresses.

◦ Enter your SSH public keys in the SSH Public Keys field or upload an SSH
public key file in the SSH Public Key File field. The file can contain multiple
SSH public keys. Mouse over the help link next to the SSH Public Keys field
for instructions on how to format your public key information. See Appendix E
for instructions for generating an SSH key.

◦ If you changed the Permitted IPs field or one of the SSH public key fields,
enter a description of your changes in the Comments field.

◦ Click the Edit Dropbox Account button when you have finished updating your
account settings.

6. Contact your Technical Account Manager when you have finished updating the SFTP
Dropbox information for your account.

After completing these steps, you can begin delivering content feeds to YouTube. You will need to
prepare original video files as well as an XML feed containing metadata and policy options for
each video. The following guidelines explain file formatting requirements for both your video files
and your XML feed. The Providing information about your assets, Sample XML feed and XML tag
definitions sections explain the XML feed structure and define each of the elements that may
appear in your feeds.

Google proprietary and confidential. The features described in this document are subject to change. 4 of 92
Formatting Requirements for XML Feeds

• Certain characters must be escaped when included as values in XML tags. Please
ensure that your XML processer converts these characters into the appropriate escaped
entity. If you do not escape these characters correctly, your feed may not be valid. The
XML Standard documents these characters, which are reproduced in the table below:

Escaped Forms
Character Character
Entity
Code
Ampersand & &amp; &#38;
Single Quote ' &apos; &#39;
Double Quote " &quot; &#34;
Greater Than > &gt; &#62;
Less Than < &lt; &#60;

• We recommend that you include a timestamp in each XML filename that identifies the
date and time that the feed was created. Please use the format YYYY-MM-DD-HHMM
for these timestamps – e.g. yt_metadata_2006-12-30-1500.xml.

• You can compress XML feeds using the .zip format. You can also include multiple XML
feeds in a .zip file.

YouTube's feed-handling process

When you are ready for YouTube to process your video files and your XML feeds, create a file
named delivery.complete in the SFTP directory where those files are located. YouTube will then
process files from that directory and any of its subdirectories.

After posting the delivery.complete file in a directory, you may not post new feeds in that
directory or any of its subdirectories until YouTube has ingested the content in the directory (and
its subdirectories). After ingesting the content in a directory, YouTube will remove the content
from that directory and post a status report to signal the completion of the ingestion process. To
avoid any possible conflicts, we recommend that you create a new directory each time you post
feeds for YouTube and that you name each directory using a timestamp or incremental ID.

The following steps explain how YouTube processes your files:

1. You create and post your XML feeds and also post your video files in your SFTP
dropbox.

2. You place a delivery.complete in the SFTP directory or directories where you have
uploaded those files.

3. YouTube processes your files in its staging environment.

a. YouTube creates file hashes and content ID files (also known as fingerprints)
for each of your commercially licensed videos. This information is then stored in

Google proprietary and confidential. The features described in this document are subject to change. 5 of 92
YouTube's reference databases. When other users upload new videos, the ID
files created from their videos will be compared to the hashes and ID files for
your videos. The content feed format is designed to try to provide you with a full
range of options over how YouTube handles your content. For example, you
can block unauthorized copies of your work from appearing on YouTube,
promote your videos through channels other than YouTube, or monetize
videos by allowing YouTube to show in-video ads in your video. You can
specify policies on a video-by-video basis to tailor policy preferences for each
individual video.

b. YouTube pushes to its production servers any video files that you have elected
to make visible on YouTube. YouTube also pushes the metadata for those
videos. Each video will be made available based on the start time you have
designated for that video in your XML feed. If you have not specified a starting
time for the video, the video will remain private in your account. You must
provide a start time for a video to be publicly visible. To make a video public as
soon as possible, use a date in the past as the start time for the video.

4. After processing each XML feed, YouTube will post a status report detailing the actions
taken for each item in that feed. The report will be named status-xml-filename, where
xml-filename is the filename of your XML feed. The status report will be placed on
YouTube's SFTP server in the same directory as the feed.

The diagram below illustrates this process. The numbers in the diagram correspond to the
numbered steps in the list above.

Google proprietary and confidential. The features described in this document are subject to change. 6 of 92
Video specifications

Important: You must be either the copyright holder or the authorized representative of
the copyright owner for all video files that you deliver to YouTube.

Best practice: We recommend that you upload a sample video and mark it as a private
video. Then log in to your YouTube account and verify the video display quality before
uploading all of your videos and making them publicly visible on YouTube.

The following guidelines are for videos that you plan to make publicly visible on YouTube. They
describe the formatting specifications that yield the highest quality for playing videos on YouTube.
YouTube encourages partners to upload videos that are as close to the original, high quality
source format as possible to increase the likelihood that your videos will play in higher quality
(HQ). Note that YouTube will always re-encode videos to optimize their playback quality. You can
use YouTube's Content Manager system to manage your uploaded videos.

• File format: YouTube prefers the original, 1080p HD broadcast format that you have in
your digital content library, as well as DVD-compliant MPEG-2 program streams saved
with a .MPG extension. If you cannot submit videos in MPEG-2 format, then MPEG-4 is

Google proprietary and confidential. The features described in this document are subject to change. 7 of 92
the preferred format. The following specifications provide optimal playback of MPEG-2
and MPEG-4 videos:

◦ MPEG-2

▪ Audio codec: MPEG Layer II or Dolby AC-3


▪ Audio bitrate: 128 kbps or better

◦ MPEG-4

▪ Video codec: H.264


▪ Audio codec: AAC
▪ Audio bitrate: 128 kbps or better

• Framerate: Videos should be in their native frame rates without resampling. For film
sources, a 24fps or 25fps progressive master yields the best results. Typically, frame
rates are set at 24, 25 or 30 frames per second. Please do not use resampling
techniques since they can cause images to shudder and often result in lower quality
video. Examples of undesirable techniques include upsampling and transfer processes
such as Telecine pulldown.

• Aspect ratio: Videos should be in their native aspect ratios, and uploaded videos should
never include letterboxing or pillarboxing bars. The YouTube player automatically frames
videos to ensure that they are displayed correctly, without cropping or stretching,
regardless of the size of the video or player. For example, the player frames 4:3 videos
with vertical bars (pillarboxing) when those videos are played in a widescreen (16:9)
player. Similarly, the player frames 16:9 videos with horizontal bars (letterboxing) if those
videos are played in a standard (4:3) player.

Images 1-3 below show how the YouTube player uses letterboxing and pillarboxing to
frame videos:

Google proprietary and confidential. The features described in this document are subject to change. 8 of 92
Similarly, the player automatically letterboxes anamorphic videos when they are shown
in either 16:9 or 4:3 sized players. The player can only do this if the native aspect ratio of
the video is maintained. If an uploaded video already has been letterboxed – for
example, to create a 4:3 video from a 16:9 master – the player will then add pillarbox
bars when the video plays in a widescreen player, resulting in bars completely framing
the video (windowboxing) and a bad viewing experience as shown in image 4 below.

• Video resolution: YouTube prefers high-definition videos and, in general, you should
provide videos in the highest resolution available to provide the maximum degree of
flexibility in the encoding and playback processes. YouTube does not set a minimum
resolution but recommends a resolution of at least 1280x720 for video that has a 16:9
aspect ratio and a resolution of at least 640x480 for video that has a 4:3 aspect ratio.

• Video bitrate: Since bitrate is highly dependent on codec, there is no recommended


minimum value. Videos should be optimized for frame rate, aspect ratio and resolution
rather than bitrate.

Google proprietary and confidential. The features described in this document are subject to change. 9 of 92
If you are unable to encode your videos using the preferred specifications, you can still submit
your video in .WMV, .AVI, .MOV and .FLV formats. In this case, we recommend that you upload
the highest quality video possible. YouTube will still accept your video content and then re-encode
your video files as necessary. However, the quality of your videos may not be optimal and could
make your videos ineligible for HQ encoding. If you are not able to encode your videos using the
preferred specifications, we recommend that you upload a few test videos online to ensure that
you are satisfied with the playback quality on YouTube.

In addition, the following guidelines apply to the files that contain your video content:

• Video files uploaded via SFTP must be 20GB or smaller. Files uploaded online must be
2GB or smaller.
• You must follow a recognizable naming convention for individual video files. You will
need to reference video file names in your XML feeds.

Additional Guidelines for YouTube's Video Identification System

If you are using YouTube's Video Identification system to match user-uploaded videos to your
content, YouTube will generate video ID reference files from your videos. The following
supplemental guidelines will help to ensure the best matching results:

• Video aspect ratios

◦ Theatrical and widescreen videos should remain in their native aspect ratios.
◦ In addition, if theatrical releases have a "pan-and-scan" version as well as the
original 16:9 version, both versions must be uploaded separately.

• Cropping

◦ If the video's native aspect ratio is 1.77:1 and the total frame size also has a
1.77:1 aspect ratio, use 16:9 matting with square pixels and no border.
◦ If the video's native aspect ratio is 1.77:1 and the total frame size does not have
a 1.77:1 aspect ratio, use 16:9 matting with square pixels and a single-color
border with no variations over time.
◦ If the video's native aspect ratio is 1.33:1 and the total frame size also has a
1.33:1 aspect ratio, use 4:3 matting with square pixels and no border.
◦ If the video's native aspect ratio is 1.33:1 and the total frame size does not have
a 1.33:1 aspect ratio, use 4:3 matting with square pixels and a single-color
border with no variations over time.

• Resolution*

◦ You may consider providing reduced quality videos if those videos will not be
publicly visible on YouTube and are only being uploaded to serve as reference
material for YouTube's Video Identification System. These videos can be a
typical "one quarter" resolution – i.e. 320x240. However, the videos must be
greater than 200 lines to yield effective ID reference files.

*Note: This guideline only applies to reference-only material that will not be
publicly visible on YouTube.

Google proprietary and confidential. The features described in this document are subject to change. 10 of 92
Providing information about your assets

Your content feeds can instruct YouTube to execute any of the following operations for each video
included in the feed. In your feed, the <yt:action> tag specifies the type of action that YouTube
should take for each video.

• The Insert action indicates that you are providing metadata for a new video. If you have
enrolled in YouTube's Video Identification system, then when you insert a video,
YouTube will create a new video resource and assign a fingerprint_id to that resource.
The status report that YouTube posts for your feed will specify this new fingerprint_id. If
you are also uploading a video so that it is publicly visible on YouTube's website – i.e.
the <yt:target> tag's value includes the upload action – YouTube will also assign a
video_id to the video.

• The Update action indicates that you are modifying the metadata for a video but that you
are not changing the actual video content. For each update action, your feed will identify
the id of the content for which you are updating metadata as well as all of the metadata
for that content. Note: If an update includes the <media:content> tag, the value of that
tag's attributes will be ignored.

• The Delete action removes an existing video from YouTube's website if the video is
publicly visible. This action also removes the video from YouTube's content reference
library unless you use the <yt:keep_fingerprint> tag to explicitly denote in your feed that
you want the ID file for the deleted video to remain active. For each delete action, your
feed will identify the id for the video that you are deleting.

• The Replace action deletes an existing video and inserts a different video in its place.
This action allows you to update the metadata and the content for a video. Please note
that statistics, such as views, and user-supplied information, such as comments and
ratings, that are attached to the deleted content will be deleted during this process.

Setting content policies

YouTube recognizes that different video rights owners want to apply different policies to their
content. In addition, a single rights owner may even want to apply different policies to different
videos. For example, a filmmaker may choose to send YouTube two videos, one for a movie
trailer and another for the full-length feature. The filmmaker could choose to make the trailer
publicly visible and to let YouTube use the full-length feature only to prevent unauthorized uses of
the film on YouTube. Conversely, another filmmaker might adopt a different stance for its films
and choose to make both videos publicly available and to display in-video ads in the full-length
film.

For this reason, YouTube content feeds let you specify policies on a video-by-video basis. You
can define policies in your content feeds. You can also create saved policies using YouTube
Content Manager and then apply those saved policies to the videos identified in your feeds. The
following lists discuss the policies that you can set for each video and identify the XML tags that
define policies for your videos. The Applying saved policies section at the end of this section
explains how to apply saved policies to items in your feed.

Google proprietary and confidential. The features described in this document are subject to change. 11 of 92
Policies that are applicable to all videos

The policies in this list apply to all videos that are included in YouTube's Video Identification
system. These policies apply regardless of whether videos are publicly visible on YouTube's
website. If you are not using YouTube's Video Identification system to match user-uploaded
videos to your content, you do not need to include the tags described in this section in your
content feed.

• The <yt:target> specifies whether a video will be publicly visible on YouTube's website. It
also specifies that YouTube should claim the video for your account, thereby identifying
you as the owner of that content. Finally, this tag specifies whether YouTube should
create an ID file for the video. The ID file is a frame-by-frame signature that YouTube
uses to match user-uploaded content to your video. Appendix B - Protecting video
content on YouTube discusses ID files in more detail.

Important: YouTube's default policy is to upload your video so that it is publicly visible to
YouTube website users, claim the video for your account and generate an ID file for the
video. The default behavior is shown in the first example below. If you want the video to
be publicly visible on YouTube but you do not want YouTube to generate an ID file for
the video, you must set the <yt:target> tag for that video to upload,claim as shown in
the second example below. Similarly, if you do not want your video to be publicly visible
on YouTube's website, you must include the <yt:target> tag for that video and set the
tag's value to claim,fingerprint as shown in the third example below.

Example 1: Make a video publicly available on YouTube, claim the video for
your account and create an ID file::
<yt:target>upload,claim,fingerprint</yt:target>

Example 2: Make a video publicly available on YouTube and claim the video
for your account, but do not create an ID file:
<yt:target>upload,claim</yt:target>

Example 3: Claim a video and create an ID file but do not make the video
publicly available on YouTube:
<yt:target>claim,fingerprint</yt:target>

• The <yt:keep_fingerprint> tag determines whether YouTube will continue to compare


user-uploaded content to a video if you delete that video. Please note that this tag's
value is only considered if the value of the <yt:action> tag is Delete, meaning you are
deleting the video. In effect, this tag indicates whether your deletion of a video is an
indication that you do not claim ownership of the content in the video.

As noted in the discussion of the <yt:target> tag above, YouTube creates a video ID file
for each video that you provide unless you set the value of the <yt:target> tag to
upload,claim. The <yt:keep_fingerprint> specifies whether that video ID file will remain
active when you delete your video. YouTube's default policy is that a video ID file will not
remain active if you delete the corresponding video. As such, if you delete a video and
then a YouTube user uploads the same video, YouTube will not try to match the user-
uploaded video to your deleted video. (YouTube will try to match the user-uploaded
video to all videos that you have not deleted.)

Google proprietary and confidential. The features described in this document are subject to change. 12 of 92
If you want the video ID file for a video to remain active if you delete that video, you must
set the value of the <yt:keep_fingerprint> tag to yes at the time that you delete the video
as shown in the following example:

<item>
<yt:action>Delete</yt:action>
<yt:id type="video_id">VIDEO_ID</yt:id>
<yt:keep_fingerprint>yes</yt:keep_fingerprint>
</item>

• The <yt:ugc> tag specifies the action that YouTube will take if a YouTube user uploads a
video that includes your content. You can specify that the user-uploaded video should be
included in your revenue-sharing agreement with YouTube, blocked for certain territories
on YouTube's public website or tracked. Please note that you must specify a value for
this tag any time you provide a new video to YouTube or replace a video in the YouTube
library. If you want user-uploaded content that matches your content to automatically be
blocked on YouTube's public website, you must set the value of the <yt:ugc> tag to
block. The following XML examples demonstrate possible values of the <yt:ugc> tag:

Example 1: YouTube will include the user-uploaded video in your revenue-


sharing agreement:
<yt:ugc>share</yt:ugc>

Example 2: YouTube will block the user-uploaded video for the specified
territories:
<yt:ugc>block</yt:ugc>

Example 3: YouTube will track the user-uploaded video:


<yt:ugc>research</yt:ugc>

• The <yt:territories> tag identifies one or more countries where the policies that you set
for a video will be applied. To specify a policy that should be applied worldwide, omit the
<yt:territories> tag from that policy.

If you do specify a value for the <yt:territories> tag, then if the value of the rule attribute
is include, the policies will be applied in the specified countries. If the value of the rule
attribute is exclude, then the policies will not be applied in the specified countries. If you
do not provide this tag, then the policies that you set for a video will apply worldwide.

The following XML examples demonstrate usage of the <yt:territories> tag:

Example 1: YouTube will apply the policies for a video in the United States and
Canada:
<yt:territories rule="include">US CA</yt:territories>

Example 2: YouTube will not apply the policies for a video in Japan:
<yt:territories rule="exclude">JP</yt:territories>

Defining policies in all territories

Google proprietary and confidential. The features described in this document are subject to change. 13 of 92
If you do not specify policies for a video for a particular territory, then the video will be
treated like a user-submitted video in those territories. The video will not display ads and
user-submitted content matching the video will not be blocked or tracked.

The first example above shows how to format the <yt:territories> tag so that YouTube
will apply the corresponding policies in the United States and Canada. In this case,
YouTube would not apply any policies to the video in territories other than the United
States and Canada. To apply policies in those other territories, the feed would need to
specify an additional policy that applied everywhere except the United States and
Canada.

The example below shows how to use multiple <yt:policy> tags to specify policies for all
territories:

<yt:policies>
<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US</yt:territories>
</yt:policy>
<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>research</yt:ugc>
<yt:territories rule="include">CA</yt:territories>
</yt:policy>
<yt:policy>
<yt:commercial>free</yt:commercial>
<yt:ugc>block</yt:ugc>
<yt:territories rule="exclude">US
CA</yt:territories>
</yt:policy>
</yt:policies>

This example contains three policies:

1. The first policy indicates that in the United States, YouTube can use ads to
generate revenue for the video and that user-submitted content matching the
video will be included in the partner's revenue-sharing agreement.

2. The second policy indicates that in Canada, YouTube can use ads to generate
revenue for the video while user-submitted content matching the video will be
tracked.

3. The third policy indicates that everywhere besides the United States and
Canada, YouTube cannot use ads to generate revenue for the video while user-
submitted content matching the video will be blocked on YouTube's public
website.

Google proprietary and confidential. The features described in this document are subject to change. 14 of 92
Policies that are applicable to videos visible on YouTube

The policies in the following list are only relevant for videos that are publicly visible on
YouTube's website.

• The <yt:commercial> tag defines two licensing policies for a video:

1. The tag indicates whether a video can be played in the territories specified for
the policy. For YouTube to play a video in a particular territory, the value of the
<yt:commercial> tag must be either share or free. For YouTube to block a
video from being played back in a particular territory, the value of the
<yt:commercial> tag must be block.

2. If the video may be played back within a particular territory, the tag's value also
indicates whether YouTube may use ads to generate revenue for a video. (Any
revenue that is generated would be shared with you as discussed in your
partner agreement.) The default value for this tag is share, which means that
YouTube can use ads to generate revenue for a video.

Since the <yt:commercial> tag appears within the <yt:policy> tag, the policies will apply
to any territories specified for the policy. By including multiple <yt:policy> tags for a
video, you can specify different policies for the same video in different territories. For
example, you could allow YouTube to play a video and use ads to generate revenue for
the video in some countries while blocking YouTube from playing the video in other
countries. The following XML examples demonstrate possible values of the
<yt:commercial> tag:

Example 1: YouTube may play a video and use ads to generate revenue for the
video:
<yt:commercial>share</yt:commercial>

Example 2: YouTube may play a video but may not use ads to generate
revenue for a video:
<yt:commercial>free</yt:commercial>

Example 3: YouTube may not play a video or use ads to generate revenue for
the video:
<yt:commercial>block</yt:commercial>

• The <yt:advertising> tag encapsulates information about the types of ad formats and
features that YouTube can use for a video. The Showing ads on a video section provides
a detailed explanation of the different types of ads that YouTube can display and how to
enable those ads to display for a video.

• The <yt:allow_comments> tag indicates whether YouTube users will be allowed to post
comments about a video. YouTube's default policy is to allow all users to post comments
about a video. You can also specify that YouTube users are not allowed to post
comments about a video or that users may post comments but that you will have an
opportunity to approve comments before those comments are displayed to other users.
The following XML examples demonstrate possible values of the <allow_comments> tag:

Example 1: All users may post comments about a video. (This is the default
policy.)

Google proprietary and confidential. The features described in this document are subject to change. 15 of 92
<yt:allow_comments>Always</yt:allow_comments>

Example 2: The content owner has the opportunity to approve comments


before YouTube displays them.
<yt:allow_comments>Approve</yt:allow_comments>

Example 3: Users are not allowed to post comments about a video.


<yt:allow_comments>Never</yt:allow_comments>

• The <yt:allow_responses> tag indicates whether YouTube users will be allowed to post
video responses to a video. YouTube's default policy is to provide you with an
opportunity to approve video responses before YouTube displays them to other users. all
users to post video responses to a video. You can also specify that all YouTube users
may post video responses to a video or that YouTube users are not allowed to post
video responses to that video. The following XML examples demonstrate possible values
of the <allow_responses> tag:

Example 1: All users may post video responses to a video.


<yt:allow_responses>Always</yt:allow_responses>

Example 2: The content owner has the opportunity to approve video


responses before YouTube displays them. (This is the default policy.)
<yt:allow_responses>Approve</yt:allow_responses>

Example 3: Users are not allowed to post video responses to a video.


<yt:allow_responses>Never</yt:allow_responses>

• The <yt:allow_ratings> tag indicates whether YouTube users can rate a video.
YouTube's default policy is to allow users to rate videos. If you do not want users to be
allowed to rate a video, you must set the value of the <yt:allow_ratings> tag to false as
shown in the following XML example:

<yt:allow_ratings>false</yt:allow_ratings>

• The <yt:allow_embedding> tag indicates whether YouTube users can include a video on
their own web pages. YouTube's default policy is to allow users to embed videos on their
own web pages. If you do not want users to be allowed to embed a video on their own
web pages, you must set the value of the <yt:allow_embedding> tag to false as shown in
the following XML example:

<yt:allow_embedding>false</yt:allow_embedding>

• The <yt:distribution_rule> tag indicates whether YouTube can distribute a video through
offline distribution channels, which might include mobile channels, IPTV, video on
demand (VOD) and consumer devices. YouTube's default policy is to allow a video to be
distributed through channels other than the websites. If you only want a video to be
visible on YouTube (or other websites), you must set the value of the
<yt:distribution_rule> tag to Deny.

<yt:distribution_rule>Deny</yt:distribution_rule>

Google proprietary and confidential. The features described in this document are subject to change. 16 of 92
Please note that the <yt:allow_embedding> tag determines whether a video may be
shown on websites other than YouTube.

Applying saved policies

As an alternative to defining policies in your content feed, you can save policies in YouTube
Content Manager (CMS) and then apply those policies to your content. Saved policies identify one
or more if-then rules that collectively form the policy. A rule identifies the territory where a policy
applies as well as the action that YouTube should take for users located in those territories. As
such, a rule defines the policy information found in the <yt:territories> tag as well as the
information defined in either the <yt:ugc> tag or the <yt:commercial> tag. (A <yt:policy> tag also
contains territory information and one of those two tags.)

For example, a saved policy that lets you monetize views in France and block content everywhere
else would need to define two rules. The first rule would specify that if the user's location is
France, then YouTube should monetize the content. The second rule would specify that if the
user's location is not France, then YouTube should block the content.

Applying a saved policy can help you to ensure that you are consistently applying the same
policies to your assets. In addition, if you decide to change a saved policy in CMS, those changes
will automatically affect any assets to which that policy is applied. For example, suppose that after
applying the saved policy described in the last paragraph to a number of assets, you began
monetizing those assets in Germany. In that case, you could update the saved policy to reflect the
policy change, and all of the assets to which the policy had been applied would reflect the new
rule as well. If you had not used saved policies, then you would need to update each individual
asset to allow it to also be monetized in Germany.

In your content feed, you can use the <yt:saved_policies> tag to identify saved policies for your
content. You can specify either or both of the following policies for videos:

• You can specify a policy that will apply to user-uploaded videos that match your content.
Identifying this saved policy eliminates the need to define a policy that contains the
<yt:ugc> tag.
• You can specify a policy for videos that are publicly visible on YouTube's website.
Identifying this saved policy eliminates the need to define a policy that contains the
<yt:commercial> tag.

The following example demonstrates how to apply saved policies. The example links two saved
policies to a video:

• The first policy identifies the territories where the video can be played back as well as
territories where the video will be blocked. It also determines whether YouTube can
monetize the partner's content in territories where that content can be played.
• The second policy defines territories and the corresponding actions that YouTube will
take for user-uploaded videos that match the partner video.

<item>
...
<yt:saved_policies>
<yt:saved_policy>

Google proprietary and confidential. The features described in this document are subject to change. 17 of 92
<yt:content_type>commercial</yt:content_type>
<yt:saved_policy_id type="name">Monetize in all
countries</yt:saved_policy_id>
</yt:saved_policy>
<yt:saved_policy>
<yt:content_type>ugc</yt:content_type>
<yt:saved_policy_id
type="name">Takedown</yt:saved_policy_id>
</yt:saved_policy>
</yt:saved_policies>
</item>

In this example, the partner has elected to monetize its original content (usage policy) while
blocking user-uploaded videos that match that content (match policy). However, you can choose
whether to set the same usage and match policies for a video, or to set different policies. (Learn
more about usage and match policies.)

Please note the following rules for specifying saved policies in your content feed:

• A single item in your content feed can contain both the <yt:policies> tag and the
<yt:saved_policies tag. If you specify a policy and a saved policy for the same content
type – e.g. for the same item, you specify a <yt:policy> tag that contains the <yt:ugc> tag
and a <yt:saved_policy> tag for which the <yt:content_type> tag value is ugc – the
saved policy will be applied and the other policy will be ignored.

• Use the <yt:saved_policy_id> tag to identify the saved policy that you want to apply. As
explained in the tag's definition, you can identify a policy by name or unique ID.

◦ Since partners define their own policies in Content Manager, policy names may
vary. Please refer to the Manage Policies page in your YouTube Content
Manager account for a list of your policies.
◦ Policy names are case-insensitive.

• The following cases will cause feed parsing errors:

◦ Specifying a name or unique ID that does not uniquely match a saved policy.
◦ Specifying more than one saved policy with the same <yt:content_type> value.

Please refer to the YouTube Content Manager Help Center for more information about creating
saved policies.

Showing Ads on a Video

YouTube offers several advertising options for partners who want to monetize their videos. The
following sections explain each ad option and how to enable or disable each ad type for a
particular video.

You should enable every ad option that you are willing to display for a video. YouTube will
algorithmically select the best ad option for any given video playback.

Google proprietary and confidential. The features described in this document are subject to change. 18 of 92
In-stream ads

InVideo ads

AdSense ads

In-stream ads

In-stream ads play within the video player and, while playing, in-stream ads are the only content
displayed in the player. In that sense, they are analagous to television commercials. In-stream
ads can play either before a video (pre-roll), during a video at specific times that you have
designated (mid-roll), or at the end of a video (post-roll).

Content feeds use the following XML tags to indicate whether in-stream ads may be shown for a
video:

• The <yt:instream_ads> tag indicates whether a video can show in-stream ads. If the tag
value is Allow, which means a video can show in-stream ads, then the remaining tags in
this list identify the times that the ads can run.

• The <yt:ad_slots> tag encapsulates information about the times when in-stream ads are
allowed to run for a particular video.

• The <yt:has_pre_roll> tag indicates whether YouTube can show an in-stream ad prior to
the start of the video. The default tag value is false, which indicates that YouTube will
not show an ad.

• The <yt:has_post_roll> tag indicates whether YouTube can show an in-stream ad after
the end of the video. The default tag value is false, which indicates that YouTube will not
show an ad.

• The <yt:mid_roll_slots> specifies the times of natural breaks in a video when mid-roll, in-
stream ads could be shown. YouTube uses the times that you specify to determine the
appropriate timing for mid-roll ad breaks while ensuring that ad breaks do not occur too
closely to one another. You should specify the times of all natural breaks in a video.

Timing for mid-roll ad breaks

The timing of ad breaks depends on the length and type of video, which means that movies,
shows and other videos could all have different ad-timing policies. Ad breaks are typically spaced
to be seven to 12 minutes apart. By specifying the times of all natural breaks in a video, you
ensure that ad breaks are still optimally spaced even if YouTube changes an ad-timing policy,
such as the minimum amount of time between a pre-roll ad and the first mid-roll ad break.

The following rules explain the general process for selecting the times for mid-roll ad breaks:

• YouTube ensures that a minimum amount of time elapses between a pre-roll ad and the
first mid-roll ad break that occurs in a video. For example, if your video shows a pre-roll
ad, then the first mid-roll ad break could not occur until after the video's 10-minute mark.
• YouTube ensures that a minimum amount of time elapses between mid-roll ads. For
example, YouTube might ensure that at least seven minutes of video run between mid-
roll ad breaks in a show and that at least 10 minutes of video run between mid-roll ad
breaks in a movie.

Google proprietary and confidential. The features described in this document are subject to change. 19 of 92
• If a video does not show a pre-roll ad, then YouTube does not restrict the timing of the
first mid-roll ad that runs for the video.
• YouTube does not require a specific amount of time to elapse between the last mid-roll
ad in a video and a post-roll ad for that video.

Sample XML that enables in-stream ads

The XML example below demonstrates how you would enable a video to display in-stream ads.
This example indicates that a video can show a pre-roll ad as well as a post-roll ad. It also
indicates that natural breaks in the video occur at the 8-minute, 15-minute and 22-minute marks of
the video.

<item>
...
<yt:advertising>
<yt:instream_ads>Allow</yt:instream_ads>
<yt:ad_slots>
<yt:has_pre_roll>true</yt:has_pre_roll>
<yt:has_post_roll>true</yt:has_post_roll>
<yt:mid_roll_slots>480 900 1320</yt:mid_roll_slots>
</yt:ad_slots>
</yt:advertising>
</item>

InVideo ads

InVideo Ads have up to three components:

• A transparent Flash overlay can occupy the bottom 20 percent of the video player. (In
the standard 640px by 360px player, the overlay is 640px by 72px.) The video that the
user is watching continues playing while the overlay displays.
• A 300px by 250px companion ad displays to the right of the video player.

If you enable a video to show InVideo Ads, then the video could show either the Flash overlay or
the companion ad or both. If a Flash overlay and companion ad both display, then both ads will be
from the same ad campaign. Similarly, if a post-roll ad runs, it will be from the same campaign as
the overlay and/or companion ad.

When a user clicks on either an InVideo overlay or companion ad, one of the following three
actions will occur:

• Another YouTube video will open and play inside the player. For some advertising
campaigns, the other YouTube video will play automatically as a post-roll ad after the
main video has ended.
• An interactive Flash unit will open inside the video player.
• A new browser window will open the advertiser's website.

To enable InVideo ads to display for a video, set the <yt:invideo> tag to Allow. To disable InVideo
ads, set the tag's value to Deny. The tag's default value is Allow.

Google proprietary and confidential. The features described in this document are subject to change. 20 of 92
InVideo ads could display on claimed, user-uploaded videos that you are monetizing and,
therefore, including in your revenue-sharing agreement with YouTube. To monetize user-
uploaded videos that match a video, set the <yt:ugc> tag to share.

AdSense ads

AdSense ads can be overlay ads, 300px by 250px Flash or image ads, or text ads displayed in a
300px by 250px area. In addition, the overlay ads themselves could also be text, image or Flash
ads. Like an InVideo overlay, the AFV overlay occupies the bottom 20 percent of the video player.

If you enable AdSense ads for a video, then YouTube handles the 300px by 250px ad slot
differently depending on whether the video is playing on a channel page or on its video watch
page:

• When the video plays on a channel page, the page could also display a 300px by 250px
AdSense for Content (AFC) Flash or image ad to the right of the channel's video player.
• When the video plays on its video watch page, the page could also display AFC Flash,
image or text ads in the 300px by 250px space to the right of the video player.

To enable AdSense ads to display for a video, set the <yt:adsense_for_video> tag's value to
Allow. To disable AdSense ads, set the tag's value to Deny. The tag's default value is Allow.

AdSense ads could display on claimed, user-uploaded videos that you are monetizing. To
monetize user-uploaded videos that match an asset, set the <yt:ugc> tag for that asset to share
in your XML feed.

Specifying category metadata

You can specify category-specific metadata for each video in your feed. This section describes
the different metadata fields that you can specify and also identifies the required metadata fields
for your content.

Depending on the type of video you are providing, this information will be encapsulated by either
the <yt:movie_metadata>, <yt:tv_metadata> or <yt:web_metadata> tag. The following sections
explain the different metadata fields that you can provide for different types of videos:

Metadata fields for movie videos

Metadata fields for TV videos

Metadata fields for web videos

Metadata fields for movie videos

The <yt:movie_metadata> tag encapsulates metadata fields about movie videos. Required
metadata tags are marked with an asterisk (*) in the list below.

• The <yt:custom_id>* tag contains a value that you use to uniquely identify a video. The
field has a maximum length of 64 characters.

Google proprietary and confidential. The features described in this document are subject to change. 21 of 92
• The <yt:director> tag identifies the director(s) of the movie featured in the video.

• The <yt:title>* tag specifies the title of the movie featured in the video. The title will not
be displayed to users on YouTube.com but may be displayed in the YouTube Content
Manager system. This tag may have the same value as the <media:title> tag.

• The <yt:tms_id> tag specifies a 14-character Tribune Media Systems (TMS) ID value
that uniquely identifies a movie.

• The <yt:notes> tag contains additional information that does not map directly to one of
the other metadata elements.

Metadata fields for TV videos

The <yt:tv_metadata> tag encapsulates metadata fields about TV videos. This tag contains the
following fields. Required metadata fields are marked with an asterisk in the list below.

• The <yt:custom_id>* tag contains a value that you use to uniquely identify a video. The
field has a maximum length of 64 characters.

• The <yt:show_title> tag specifies the name of the TV show featured in a video.

• The <yt:season> tag specifies the season number associated with a television program.

• The <yt:episode> and <yt:episode_title> tags specify the episode number associated
with a TV program and the title of that episode, respectively.

• The <yt:tms_id> tag specifies a 14-character Tribune Media Systems (TMS) ID value
that uniquely identifies a television program.

• The <yt:notes> tag contains additional information that does not map directly to one of
the other metadata elements.

Metadata fields for web videos

The <yt:web_metadata> tag encapsulates metadata fields about web videos. This tag contains
the following metadata fields:

• The <yt:custom_id> tag contains a value that you use to uniquely identify a video.
Although this tag is required for movie and TV videos, it is optional for web videos and is
used only for tracking and reporting purposes.

• The <yt:notes> tag contains additional information that does not map directly to one of
the other metadata elements.

Managing playlists and playlist content

A playlist is a collection of videos that can be viewed sequentially and shared with other users. By
adding your videos to playlists, you can sort videos for users and create a structure within which
users can watch your videos. Playlists can contain up to 200 videos, and YouTube does not limit

Google proprietary and confidential. The features described in this document are subject to change. 22 of 92
the number of playlists that you create or the number of playlists that a particular video can be
included in. For example, you could create a playlist of videos featuring a particular character.

This section explains how to add a video to a playlist or remove a video from a playlist. When you
associate a video with a playlist, that playlist will be owned by the same YouTube account that
owns the playlist. If you try to associate a video with a playlist that does not already exist,
YouTube will automatically create the playlist in the appropriate account. Please see the
<yt:account> tag definition for more information about associating a video with a particular
YouTube account.

The following steps explain how to update the playlist information for a video:

1. Include the playlist action in the <yt:target> tag's value.

2. Specify the playlist information for the video by adding the <yt:playlists> tag (and its
subtags) to the <item> tag for that video. The <yt:playlists> tag can contain one or more
<yt:playlist> tags, each of which identifies a playlist that the video will be added to or
removed from. The <yt:playlist> tag has the following subtags:

◦ The <yt:action> tag indicates whether you are adding the video to a playlist or
removing it from a playlist. Set the tag's value to Insert to add the video to a
playlist. Set the tag's value to Delete to remove the video from a playlist.

◦ The <yt:name> tag specifies the name of the playlist. Each playlist is identified
by its name and user account, which means that one account cannot have two
playlists with the same name, but two different accounts can each have a
playlist with the same name.

◦ The optional <yt:position> tag specifies the order in which a video should
appear in a playlist. If you do not specify a value for this tag when adding a
video to a playlist, the video will be added to the end of the playlist.

◦ The optional <yt:is_icon> tag indicates whether the corresponding video's icon
should be set as the playlist icon. Set the tag's value to true to set the video
icon as the playlist icon. If you do set the tag's value to true, the video will
automatically be moved to be the first video in the playlist. The default value for
this tag is false.

The following sample feed demonstrates how to specify playlist information in a content feed. The
feed specifies the following information:

• The first <yt:account> tag in the feed, which is a subtag of <channel>, indicates that all
items in the feed will be associated with the "greatgreatfilms" account.

• The first video in the feed contains three <yt:playlist> tags.

◦ The first <yt:playlist> tag adds the video to a playlist named "Playlist 1" and sets
the video's icon as the icon for that playlist. As a result, the video will also be
moved to be the first video in the playlist.
◦ The second <yt:playlist> tag adds the video to a playlist named "Playlist 2" and
makes the video the fourth video in that playlist.
◦ The third <yt:playlist> tag removes the video from the playlist named "Bad
playlist."

Google proprietary and confidential. The features described in this document are subject to change. 23 of 92
• The second video in the feed contains a <yt:account> tag that specifies that the item will
be associated with the "reallygreatfilms" account instead of the "greatgreatfilms" account.
The feed also specifies that the video will be added to the playlist named "Playlist 1".
Note that even though both videos are being added to a playlist named "Playlist 1," since
the videos are owned by different YouTube accounts, the playlists are different as well.

<channel>
<yt:account>
<yt:username>greatgreatfilms</yt:username>
<yt:password>thec0wg0esm00</yt:password>
</yt:account>

<item>
<yt:action>Insert</yt:action>
<media:title>Covert Operations II</media:title>
...
<yt:target>upload,claim,fingerprint,playlist</yt:target>

<yt:playlists>
<yt:playlist>
<yt:action>Insert</yt:action>
<yt:name>Playlist 1</yt:name>
<yt:is_icon>true</yt:is_icon>
</yt:playlist>
<yt:playlist>
<yt:action>Insert</yt:action>
<yt:name>Playlist 2</yt:name>
<yt:position>4</yt:position>
</yt:playlist>
<yt:playlist>
<yt:action>Delete</yt:action>
<yt:name>Bad playlist</yt:name>
</yt:playlist>
</yt:playlists>
</item>

<item>
<yt:account>
<yt:username>reallygreatfilms</yt:username>
<yt:password>yrdnual</yt:password>
</yt:account>
<yt:action>Insert</yt:action>
<media:title>Covert Operations II</media:title>
...
<yt:target>upload,claim,fingerprint,playlist</yt:target>

Google proprietary and confidential. The features described in this document are subject to change. 24 of 92
<yt:playlists>
<yt:playlist>
<yt:action>Insert</yt:action>
<yt:name>Playlist 1</yt:name>
</yt:playlist>
</yt:playlists>
</item>
</channel>

Providing captions for a video

Adding captions to your video files can help users to locate and understand your videos. To
provide captions for a video, you need to post a file that contains the captions in your SFTP
dropbox. You also need to modify your feed so that the video entry references the file(s)
containing captions for the video.

The XML example below demonstrates how you would specify the caption file(s) for a video. In
this example, the video specifies one file that contains Spanish captions and two files that contain
English captions. Note that each <yt:track> tag contains information about one captions file, and
each file can only contain captions in one language.

<item>
<yt:action>Update</yt:action>
<yt:id type="video_id">A61qCLGaKsc</yt:id>
<media:title type="plain">Songs to live by</media:title>
<media:content url="file://water.mpeg">
...
</media:content>
<yt:music:metadata>
...
</yt:music_metadata>
<yt:captions>
<yt:tracks>
<yt:track language="es">
<yt:track_name>Spanish Captions for ID
2351</yt:track_name>

<yt:track_filename>captions_ID2351_EN1.txt</yt:track_filename>
</yt:track>
<yt:track language="en">
<yt:track_name>English Captions file 1 for ID
2351</yt:track_name>

Google proprietary and confidential. The features described in this document are subject to change. 25 of 92
<yt:track_filename>captions_ID2351_EN1.txt</yt:track_filename>
</yt:track>
<yt:track language="en">
<yt:track_name>English Captions file 2 for ID
2351</yt:track_name>

<yt:track_filename>captions_ID2351_EN2.txt</yt:track_filename>
</yt:track>
</yt:tracks>
</yt:captions>
</item>

Supported formats for caption files

YouTube supports many different formats for caption files, including RealText (.rt), SAMI (.smi)
and Media RSS. If you already have captions available, we recommend that you upload them in
their original format, whatever that may be. If you do not have formatted caption data, such as a
transcript that does not have timing data, we recommend using SubRip (*.SRT) or SubViewer
(*.SUB) for generating formatted captions.

YouTube also supports a simple format that is compatible with both the SubRip and SubViewer
formats. In this simple format, each caption is divided into three segments that appear in the
following order:

1. Timecodes specify the time and duration that YouTube should display a caption in
HH:MM:SS.FS format. Timecodes, which are measured from the beginning of the video,
contain the following units

◦ HH – Hours (00, 01, etc.)


◦ MM – Minutes (00-59)
◦ SS – Seconds (00-59)
◦ FS – Fractional seconds (.000-.999)

YouTube supports the following time constructs:

◦ HH:MM:SS.FS,HH:MM:SS.FS – A caption appears at the first time offset and


stops displaying at the second time offset. This format is compatible with the
SubViewer format.
◦ HH:MM:SS.FS --> HH:MM:SS.FS – A caption appears at the first time offset
and stops displaying at the second time offset. To make this format completely
compatible with the SubRip format, you can insert a "subtitle number" before
the timecodes.
◦ HH:MM:SS.FS – A caption appears at the designated time offset. Since no stop
time is specified, YouTube will try to determine an appropriate stop time. For
example, the caption might stop displaying just before the next caption is
scheduled to appear.

Google proprietary and confidential. The features described in this document are subject to change. 26 of 92
2. The caption text consists of one or more lines of text that will be displayed on the
screen during the time offsets. You must use UTF-8 encoding for the caption text.

3. A blank line marks the end of each caption.

The following example demonstrates this simple caption format:

0:01:23.000,0:01:25.000
This text displays for two seconds starting
1 minute and 23 seconds into the video.

0:02:20.250,0:02:23.8
This text displays from 2 minutes and 20.25 seconds after
the start
of the video until 2 minutes and 23.8 seconds after the
start of the video.

0:03:14.159
This text displays beginning 3 minutes and 14.159 seconds
after the start of the video for an undefined length of
time.

Updating and deleting caption tracks

When you update or replace a video, YouTube will only update the caption tracks associated with
the video if your feed contains a <yt:captions> tag for that video. In that case, any caption tracks
that you provide for the video will replace any existing caption tracks already associated with that
video.

For example, if you insert a video for which captions are available in English and Japanese, your
feed will specify two caption tracks for that video. If captions for the video later become available
in Korean, then you would submit a feed updating the video, and the feed would specify three
caption tracks (English, Japanese, Korean) for the video. Finally, if you wanted to remove the
English captions, you would submit another update that specified two caption tracks (Japanese,
Korean).

In addition, each time you insert, update or replace a video, YouTube will also reprocess all of the
caption files for that video. As such, if you have updated the captions within a caption track,
submit a feed to update the video. The feed should list all of the caption tracks for the video.
YouTube will then fetch each track and update all of the captions for the video.

To delete all of the caption tracks associated with a video, submit an update for the video that
contains an empty <yt:tracks> element for that video. If the feed does not contain the
<yt:captions> and <yt:tracks> elements for the video, YouTube will not update (or delete) any of
the tracks already associated with the video.

Google proprietary and confidential. The features described in this document are subject to change. 27 of 92
<yt:captions>
<yt:tracks/>
</yt:captions>

Sample XML feed

The XML sample below demonstrates how you would insert, update, replace or delete videos in
YouTube content feeds. The feed contains four items. Each item demonstrates the XML structure
for a different feed action.

Note: The XML samples below are all for movie videos. Appendix D contains additional XML
samples for TV videos.

<?xml version="1.0" encoding="UTF-8"?>


<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss"
xmlns:yt="http://www.youtube.com/schemas/yt/0.2">
<channel>
<yt:notification_email>sandy@example.com,
ben@example.com</yt:notification_email>
<yt:account>
<yt:username>happypartner</yt:username>
<yt:password>thec0wg0esm00</yt:password>
</yt:account>
<yt:owner_name>Example.com TV</yt:owner_name>

<item>
<yt:action>Insert</yt:action>

<yt:account>
<yt:username>little6pac</yt:username>
<yt:password>yrdnual</yt:password>
</yt:account>

<media:title>Covert Operations II</media:title>


<media:thumbnail url="file://custom_thumbnail.jpg"
fileSize="349016"/>
<media:content url="file://co2_file.mov" >
<media:description type="plain">
Ms. World reveals world domination plans.
</media:description>
<media:keywords>covert, operations, spy,
pagent</media:keywords>
<media:category>Entertainment</media:category>

Google proprietary and confidential. The features described in this document are subject to change. 28 of 92
<media:rating
scheme="urn:simple">nonadult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2005-08-01</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

<yt:start_time>2007-07-07T07:07:07</yt:start_time>
<yt:end_time>2007-12-31T00:00:00</yt:end_time>

<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:movie_metadata>
<yt:custom_id>000ABC123XYZ</yt:custom_id>
<yt:title>Covert Operations II (Deluxe extended
director's cut)</yt:title>
<yt:director>Lucas Spielberg</yt:director>
</yt:movie_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

<yt:advertising>
<yt:adsense_for_video>Allow</yt:adsense_for_video>

Google proprietary and confidential. The features described in this document are subject to change. 29 of 92
<yt:invideo>Allow</yt:invideo>
<yt:instream_ads>Allow</yt:instream_ads>
<yt:ad_slots>
<yt:has_pre_roll>true</yt:has_pre_roll>
<yt:has_post_roll>true</yt:has_post_roll>
<yt:mid_roll_slots>480 900 1320</yt:mid_roll_slots>
</yt:ad_slots>
</yt:advertising>

<yt:target>upload,claim,fingerprint</yt:target>
</item>

<item>
<yt:action>Update</yt:action>
<yt:id type="video_id">asd92n30</yt:id>
<media:title>Under the Rainbow</media:title>
<media:thumbnail url="file://custom_thumbnail2.jpg"
fileSize="349016"/>
<media:content url="">
<media:description type="plain">
Documentary of the Wizard's iron-fisted rule in
Oz.
</media:description>
<media:keywords>oz, wizard, regime,
oppression</media:keywords>
<media:category>Entertainment</media:category>
<media:rating scheme="urn:simple">adult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2004-03-15</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

Google proprietary and confidential. The features described in this document are subject to change. 30 of 92
<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:movie_metadata>
<yt:custom_id>000ABC123XYZ</yt:custom_id>
<yt:title>Under the Rainbow</yt:title>
<yt:director>Lucas Spielberg</yt:director>
</yt:movie_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

</item>

<item>
<yt:action>Replace</yt:action>
<yt:id type="video_id">g92df3km2</yt:id>
<media:title>Alpha Squad 7: Lady Nocturne: A Tek Jansen
Adventure</media:title>
<media:content url="file://tek_jansen_updated.mp2" >
<media:description type="plain">
The original Tek Jansen Adventure.
</media:description>
<media:keywords>tek, jansen, lady,
nocturne</media:keywords>
<media:category>Entertainment</media:category>
<media:rating
scheme="urn:simple">nonadult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2004-10-18</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

Google proprietary and confidential. The features described in this document are subject to change. 31 of 92
<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:movie_metadata>
<yt:title>Alpha Squad 7: Lady Nocturne: A Tek
Jansen Adventure</yt:title>
<yt:director>Lucas Spielberg</yt:director>
</yt:movie_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

</item>

<item>
<yt:action>Delete</yt:action>
<yt:id type="video_id">z84kf03j5g</yt:id>
<yt:keep_fingerprint>no</yt:keep_fingerprint>
<yt:keep_claims>no</yt:keep_claims>
</item>
</channel>
</rss>

XML tag definitions for content feeds

YouTube content feeds use tags from multiple XML schemas. The table below identifies the
different schemas used in YouTube feeds, the namespace prefix associated with each schema,
and the namespace URL for each schema.

Google proprietary and confidential. The features described in this document are subject to change. 32 of 92
Namespace
Schema Schema URL
Prefix
RSS [None] - this is None
the default
namespace
Media RSS media http://search.yahoo.com/mrss/
YouTube yt http://www.youtube.com/schemas/yt/0.2
XML Schema

The following sections define the XML tags that appear in YouTube content feeds. Each of the
following sections corresponds to an XML schema, and the tags in that section are listed
alphabetically.

RSS tags

Media RSS tags

YouTube XML schema tags

Certain symbols may be displayed next to some subtags in the definitions below. These symbols,
and their meanings, are:

? = optional subtag
* = zero or more instances of the subtag
+ = one or more instances of the subtag
| = Boolean OR

RSS tags

rss
Definition Required. The <rss> tag is the root element in an RSS file and
encapsulates all data in a YouTube content feed.
Attributes Name Format Description
version Text The version attribute specifies the RSS
version to which the document conforms.

Example <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss"


xmlns:yt="http://www.youtube.com/schemas/yt/0.2">
Subtags channel

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 33 of 92
channel
Definition Required. The <channel> tag encapsulates information about the feed
owner, followed by a series of items. Each item corresponds to a particular
action that you are performing on a particular video.
Example <channel>
Subtags yt:notification_email, yt:owner_name, yt:account, item*

Subtag of rss

Content Format Container

item
Definition Required. The <item> element encapsulates information about an action
that should be performed for a particular video.
Subtags media:content, media:thumbnail?, media:title, yt:account?, yt:action, yt:advertising?,
yt:captions?, yt:community, yt:date_recorded?, yt:end_time?, yt:id?, yt:keep_claims?,
yt:keep_fingerprint?, yt:language?, yt:location?,
yt:movie_metadata | yt:tv_metadata | yt:web_metadata, yt:playlists?, yt:policies?,
yt:saved_policies?, yt:start_time?, yt:target?, yt:urgent_reference_file?

Subtag of channel

Content Format Container

Media RSS tags

media:category
Definition
Required. The <media:category> tag specifies a genre that describes a
video resource. See Appendix A - Valid categories for video content for
more information about valid values for this tag.

Attributes Name Format Description


label Text The entity escaped name of the YouTube
GData category the video belongs to.
scheme Text This attribute specifies a URI that identifies
the categorization scheme used to classify
videos.

Example <media:category label="Nonprofit &amp; Activism"


scheme="http://gdata.youtube.com/schemas/2007/
categories.cat">Nonprofit</media:category>
Subtag of media:content

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 34 of 92
media:content
Definition Required for insert and replace actions. The <media:content> tag
provides a URL and various other types of information about a video.
Attributes Name Format Description
url String Required. The url attribute specifies the
location of the video content. The url
attribute value is specified relative to the
location of the XML feed within your SFTP
dropbox account.

For example, suppose you create a


directory named uploads under the root
directory of your dropbox account. You
place the XML feed, the video content and a
thumbnail image in that directory:
• uploads/feed.xml
• uploads/video.mpg
• uploads/thumb.jpg
In this example, the url attribute value will
be file://video.mpg. However, if the same
file is placed in the videos subdirectory
(uploads/videos/video.mpg), then the url
attribute value will be file://videos/
video.mpg.

Example <media:content url="file://video/987654321.avi">


Subtags media:category, media:description, media:keywords, media:rating?

Subtag of item

Content Format Empty

Google proprietary and confidential. The features described in this document are subject to change. 35 of 92
media:description
Definition
Required. The <media:description> tag contains a summary or description
of a video. This value will be used to index your video in YouTube's search
engine and will also appear both in search results and on the page where
users watch your video. The description should be sentence-based, rather
than a list of keywords. The description has a maximum length of 715
characters.

Attributes Name Format Description


type String
The type attribute indicates the type of text
provided in the tag value. YouTube content
feeds always use plain text.

Example <media:description type="plain">This video shows clips of the best goals


from 50 years of professional football.</media:description>
Subtag of media:content

Content Format Complex

media:keywords
Definition
Required. The <media:keywords> tag contains a comma-separated list of
words associated with a video. Keywords are used to index your video in
YouTube's search engine and will also appear on the page where users
watch your video. You must provide at least one keyword for each video in
your feed.

Please note that this field has a maximum length of 300 characters including
commas and spaces. Keywords must be at least two characters long and
may not be longer than 25 characters. Keywords are not case-sensitive. In
addition, individual keywords may not contain spaces, though you can use
spaces after the commas that separate keywords. For example,
crazy,surfing,stunts and crazy, surfing, stunts are both valid values for
this tag. However, crazy, surfing stunts is not valid since it does not
contain a comma between "surfing" and "stunts".

Example <media:keywords>football, sports, goals</media:keywords>


Subtag of media:content

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 36 of 92
media:rating
Definition
Optional. The <media:rating> tag specifies the audience for which the
video is appropriate. This value may be used to identify content that should
not be shown to minors. The default content rating is nonadult.

Attributes Name Format Description


scheme String
The scheme attribute identifies the rating
schema used to classify the video. YouTube
currently only supports the default scheme
for this tag, which allows for differentiation
between adult content and nonadult
content.

Example <media:rating scheme="urn:simple">nonadult</media:rating>


Subtag of media:content

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 37 of 92
media:thumbnail
Definition
Optional. The <media:thumbnail> tag specifies the location of a custom
thumbnail image that can be used to represent a video in a list of search
results. By default, YouTube generates several thumbnail images using
frames from your video and sets one of the images as the default image.
However, if you provide a custom image, YouTube will set that as the default
thumbnail image for the video instead.

The following list provides specifications for custom thumbnail images:

• Dimensions:
◦ Minimum size of 480px by 360px for content with a 4:3
aspect ratio
◦ Minimum size of 480px by 270px for content with a 16:9
aspect ratio
• File Format: .jpg (preferred), .gif, or .png
• File Size: 256KB maximum

You can specify information for a custom thumbnail image when inserting,
updating or replacing a video.

Attributes Name Format Description


url String Required. The url attribute specifies the
location of the thumbnail image. The url
attribute value is specified relative to the
location of the XML feed within your SFTP
dropbox account.

For example, suppose you create a


directory named uploads under the root
directory of your dropbox account. You
place the XML feed, the video content and
the thumbnail in that directory:
• uploads/feed.xml
• uploads/video.mpg
• uploads/thumb.jpg
In this example, the url attribute value will
be file://thumb.jpg. However, if the same
file is placed in the thumbs subdirectory
(uploads/thumbs/thumb.jpg), then the url
attribute value will be file://thumbs/
thumb.jpg.
fileSize Positive Optional. The fileSize attribute specifies
integer the size, in bytes, of the thumbnail image.

Example <media:thumbnail url="file://custom_thumbnail.jpg" fileSize="359116"/>


Subtag of item

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 38 of 92
media:title
Definition
Required. The <media:title> tag identifies the display title of the video. This
field has a maximum length of 60 characters.

Attributes Name Format Description


type Text The type parameter specifies the type of
text provided in the <media:title> tag's
value. YouTube content feeds require plain
text format.

Example <media:title type="plain">Top 50 Football Goals</media:title>


Subtag of item

Content Format Complex

YouTube XML schema tags

yt:account
Definition
Optional. The <yt:account> tag identifies the YouTube user account, or
channel, to which you are uploading a video file.

By default, all of the content in your feed will be uploaded to the default
YouTube user account identified in your YouTube Content Manager
account. See the Delivering content feeds to YouTube section for more
information about managing your SFTP dropbox account, including setting
the default user account to which your content will be uploaded.

• As a subtag of <channel>, the <yt:account> tag contains the


username and password for the YouTube user account to which
you are uploading the videos in your feed.

• As a subtag of <item>, the <yt:account> tag specifies the


YouTube user account to which you are uploading that item. The
<yt:account> tag is only a valid subtag of <item> if the value of the
<yt:action> tag for that item is Insert.

Example <yt:account>
Subtags yt:username, yt:password?

Subtag of channel, item

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 39 of 92
yt:action
Definition
Required. The <yt:action> tag indicates whether you are inserting,
updating, replacing or deleting a video file. The <yt:action> tag can also
indicate that you are adding a video to a playlist or removing a video from a
playlist. The following list specifies valid values for this tag:

• Insert - This value indicates that you are providing metadata for a
new video. It can also indicate that you are adding a video to a
playlist.

• Update - This value indicates that you are modifying the metadata
associated with a video without changing the video itself. When you
update a video, you must include a complete set of metadata for
the content that you are updating.

• Replace - This value indicates that you are deleting an existing


video and all of its metadata and inserting a new video in its place.
You must provide a complete set of metadata for the new video.

• Delete - This value indicates that you are removing an existing


video from YouTube's reference database. If you delete a video,
you will also delete all video statistics, such as the number of times
the video has been viewed, and user comments associated with
the video.

When the Delete action applies to a playlist, it indicates that you


are removing a video from a playlist.

Example <yt:action>Insert<yt:action>
Subtag of item

Content Format Text

yt:ad_slots
Definition
Optional. The <yt:ad_slots> tag encaspulates information about the times
when in-stream ads should run for a particular video.

Example <yt:ad_slots>
Subtags yt:has_pre_roll?, yt:has_post_roll?, yt:mid_roll_slots?

Subtag of yt:advertising

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 40 of 92
yt:adsense_for_video
Definition Optional. The <yt:adsense_for_video> flag indicates whether an uploaded
video can display AdSense ads, including remnant in-video ads and
contextual AdSense ads. Valid values for this tag are "Allow" and "Deny".
The default value is "Allow."
Example <yt:adsense_for_video>Allow</yt:adsense_for_video>
Subtag of yt:advertising

Content Format Text. Valid values are "Allow" and "Deny".

yt:advertising
Definition Optional. The <yt:advertising> tag encapsulates information about
allowable ad formats and features that may be applied to a video.
Example <yt:advertising>
Subtags yt:adsense_for_video?, yt:invideo?, yt:instream_ads?, yt:ad_slots?

Subtag of item

Content Format Container

yt:allow_comments
Definition
Optional. The <yt:allow_comments> tag indicates whether YouTube will
allow viewers to post comments about a video. The following list identifies
valid values for this tag:

• Always* - Anyone may post comments that will be visible to other


YouTube users.
• Approve - Anyone may post comments about a video, but the
content partner will use an approval process to determine which
comments will be displayed to other YouTube users.
• Never - Users are not allowed to post comments about the video.

* Note: YouTube's default policy is to allow all users to post comments


about a video.

Example <yt:allow_comments>Approve</allow_comments>
Subtag of yt:community

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 41 of 92
yt:allow_embedding
Definition
Optional. The <yt:allow_embedding> tag indicates whether other
YouTube users can include a particular video on their own web pages. Valid
values for this field are true and false. The default value for this tag is true,
which indicates that other users may embed the video on their own web
pages.

Example <yt:allow_embedding>true<yt:allow_embedding>
Subtag of yt:community

Content Format Boolean

yt:allow_ratings
Definition
Optional. The <yt:allow_ratings> tag indicates whether other YouTube
users can rate a particular video. Valid values for this field are true and
false. The default value for this tag is true, which indicates that users can
rate the video.

Example <yt:allow_ratings>true</allow_ratings>
Subtag of yt:community

Content Format Boolean

yt:allow_responses
Definition
Optional. The <yt:allow_responses> tag indicates whether YouTube will
allow viewers to post video responses to a video. Whereas the comments let
other users provide textual feedback about a video, video responses allow
other users to provide video feedback for the video. The following list
identifies valid values for this tag:

• Always - Anyone may post video responses that will be visible to


other YouTube users.
• Approve* - Anyone may post video responses about a video, but
the content partner will use an approval process to determine which
video responses will be displayed to other YouTube users.
• Never - Users are not allowed to post video responses to the video.

* Note: YouTube's default policy is to only make approved video responses


visible to other YouTube users.

Example <yt:allow_responses>always<yt:allow_responses>
Subtag of yt:community

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 42 of 92
yt:captions
Definition
The <yt:captions> tag encapsulates a list of caption tracks. Each track in
the list contains information about captions for a particular language.

Example <yt:captions>
Subtags yt:tracks

Subtag of item

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 43 of 92
yt:commercial
Definition
Optional. The <yt:commercial> tag defines two licensing policies for a
video:

1. The tag indicates whether a video can be played in the territories


specified for the policy. For YouTube to play a video in a particular
territory, the value of the <yt:commercial> tag must be either
share or free. For YouTube to block a video from being played back
in a particular territory, the value of the <yt:commercial> tag must
be block.

2. If the video may be played back within a particular territory, the


tag's value also indicates whether YouTube may use ads to
generate revenue for a video. (Any revenue that is generated would
be shared with you as discussed in your partner agreement.) The
default value for this tag is share, which means that YouTube can
use ads to generate revenue for a video.

This tag has three valid values:

• share* - YouTube may play the video in the specified territory and
use ads to generate revenue for the video. That revenue would be
shared with the partner according to the partner agreement.
• free - YouTube may play the video in the specified territory but may
not use ads to generate revenue for the video.
• block - YouTube may not play the video in the specified territory.

Since the <yt:commercial> tag appears within the <yt:policy> tag, the
policies will apply to any territories specified for the policy. By including
multiple <yt:policy> tags for a video, you can specify different policies for the
same video in different territories.

If your feed includes a <policy> tag that does not contain a


<yt:commercial> tag, the default value of the <yt:commercial> tag for that
policy will be share. If you do not specify any policies for a video, then
YouTube will allow your video to be played in all territories but will not track
the video or use ads to generate revenue for the video. Similarly, if you
specify a policy for one territory but not for other territories, YouTube will
allow your video to be played in all territories for which you did not specify a
policy but will not track the video in those territories or use ads to generate
revenue for the video in those territories.

Example <yt:commercial>share</commercial>
Subtag of yt:policy

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 44 of 92
yt:community
Definition
Required. The <yt:community> tag encapsulates information about how
other YouTube users can provide feedback about a video. This tag contains
subtags that indicate whether users may submit comments, ratings or video
responses for a video. Another subtag indicates whether the video may be
embedded on other web pages.

Example <yt:community>
Subtags yt:allow_comments?, yt:allow_embedding?, yt:allow_ratings?, yt:allow_responses?

Subtag of item

Content Format Container

yt:content_type
Definition
The <yt:content_type> tag indicates when the saved policy that you are
applying to a video will actually be applied. For videos, the tag can have
either of the following values:

• If the tag value is ugc, then the saved policy will apply to user-
uploaded videos that match your video.

• If the tag value is commercial, then the saved policy will apply to
your actual video. Note that this value is only relevant for videos
that are publicly visible on YouTube's website. If your video is not
publicly visible on YouTube's website (as specified using the
<yt:target> tag), then YouTube will not have any occasion to apply
this saved policy.

Example <yt:content_type>ugc</yt:content_type>
Subtag of yt:saved_policy

Content Format Text. Valid values for this tag are ugc and commercial.

Google proprietary and confidential. The features described in this document are subject to change. 45 of 92
yt:country
Definition
Optional. The <yt:country> tag specifies the country where a video was
recorded. This tag's value should be a two-letter ISO 3166 country code.
This value may be displayed in YouTube's Content Manager system and, if
the video is publicly visible on YouTube, may also be displayed on the watch
page for the video.

Example <yt:country>DE</yt:country>
Subtag of yt:location

Content Format Text

yt:custom_id
Definition
Required for movie and TV videos*. The <yt:custom_id> tag contains a
unique value that you use to identify a video. For example the
<yt:custom_id> tag value could be an ISAN (International Standard
Audiovisual Number) or a unique ID that you created for the video. This field
has a maximum length of 64 characters.

* The <yt:custom_id> tag is required for movie and TV videos. If you do not
provide an identifier for a video, the status report for your feed will contain
InvalidClaim as the status_detail for that video. This status means that the
video has been uploaded to your account but will remain private until you
manually provide an identifier or send an Update action for the video that
contains the proper unique identifier.

Example <yt:custom_id>000ABC123XYZ</yt:custom_id>
Subtag of yt:movie_metadata, yt:tv_metadata, yt:web_metadata

Content Format Text

yt:date_recorded
Definition
Optional. The <yt:date_recorded> tag specifies the date that a video was
recorded. This value may be displayed in YouTube's Content Manager
system and, if the video is publicly visible on YouTube, may also be
displayed on the watch page for the video.

Example <yt:date_recorded>2006-12-25</yt:date_recorded>
Subtag of item

Content Format Date (YYYY-MM-DD)

Google proprietary and confidential. The features described in this document are subject to change. 46 of 92
yt:director
Definition
Optional. The <yt:director> tag identifies the director(s) associated with a
movie video. If the tag contains multiple names, please separate the names
with a comma and a space (", ").

Example <yt:director>Stanley Donen, Gene Kelly</yt:director>


Subtag of yt:movie_metadata

Content Format Text

yt:distribution_restriction
Definition Optional. The <yt:distribution_restriction> tag encapsulates information
about where YouTube videos can be distributed outside of the YouTube
website and associated web page embeds. For instance, videos might be
distributed to mobile phones or over broadcast television.
Example <yt:distribution_restriction>
Subtags yt:distribution_rule

Subtag of item

Content Format Container

yt:distribution_rule
Definition
Optional. The <yt:distribution_rule> tag indicates whether YouTube can
distribute a video through distribution channels other than YouTube's
website or other websites that show YouTube videos. Such distribution
channels might include mobile channels, IPTV, video on demand (VOD) and
consumer devices. YouTube's default policy is to allow a video to be
distributed through these other distribution channels.

Valid values are "Allow" and "Deny". The default value is "Allow." If you only
want a video to be visible on YouTube or other websites, you must set the
value of the <yt:distribution_rule> tag to Deny.

Also note that the yt:allow_embedding tag determines whether a video may
be shown on websites other than YouTube.

Example <yt:distribution_rule>Allow</yt: distribution_rule>


Subtag of yt:distribution_restriction

Content Format Boolean

Google proprietary and confidential. The features described in this document are subject to change. 47 of 92
yt:end_time
Definition
Optional. The <yt:end_time> tag specifies the date and time after which a
video will not be available on YouTube. This tag's value contains a date and
time in ISO 8601 format. The value must express times in UTC (Coordinated
Universal Time).

Example <yt:end_time>2007-12-31T14:25:00Z</yt:end_time>
Subtag of item

Content Format Date (YYYY-MM-DDThh:mm:ssZ)

yt:episode
Definition
Optional. The <yt:episode> tag specifies the episode number associated
with a TV video. YouTube recommends that you include this information if it
is available for a video. This field has a maximum length of 16 characters.

Example <yt:episode>60</yt:episode>
Subtag of yt:tv_metadata

Content Format Text

yt:episode_title
Definition
Optional. The <yt:episode_title> tag specifies the title of the episode
associated with a TV video. YouTube recommends that you include this
information if it is available for a video. This field has a maximum length of
64 characters.

Example <yt:episode_title>The Junior Mint</yt:episode_title>


Subtag of yt:tv_metadata

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 48 of 92
yt:has_post_roll
Definition
Optional. The <yt:has_post_roll> tag indicates whether YouTube should
show an in-stream ad after the end of a video. The default value for this tag
is false, which indicates that YouTube will not show an ad.

Example <yt:has_post_roll>true</has_post_roll>
Subtag of yt:ad_slots

Content Format Boolean. Valid values are "true" and "false".

yt:has_pre_roll
Definition
Optional. The <yt:has_pre_roll> tag indicates whether YouTube should
show an in-stream ad prior to the start of a video. The default value for this
tag is false, which indicates that YouTube will not show an ad.

Example <yt:has_pre_roll>true</has_pre_roll>
Subtag of yt:ad_slots

Content Format Boolean. Valid values are "true" and "false".

yt:id
Definition Required for update, replace and delete actions. The <yt:id> tag
contains a value that YouTube uses to uniquely identify a video resource.
Attributes Name Format Description
type Text
The type parameter specifies the type of
identifier contained in the tag's value. Valid
values for this attribute are video_id and
fingerprint_id.

• A video_id is a value that uniquely


identifies a video that is publicly
visible on YouTube's website.
• A fingerprint_id is an
algorithmically generated value
that uniquely identifies an ID file for
a video.

Example <yt:id type="video_id">abcxyz</yt:id>


Subtag of item

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 49 of 92
yt:instream_ads
Definition
Optional. The <yt:instream_ads> tag indicates whether a video is eligible
to show in-stream ads. An in-stream ad can play either before a video (pre-
roll), during a video at specific times that you designate (mid-roll), or at the
end of a video (post-roll).

Note: If you choose to show in-stream ads for a video, you also need to use
the <yt:ad_slots> tag and its subtags to specify the times when YouTube
should run the ads.

For more information about in-stream ads, please see the description,
examples and specifications at http://www.youtube.com/t/ads_instream.

Example <yt:instream_ads>Allow</yt:instream_ads>
Subtag of yt:advertising

Content Format Text. Valid values are "Allow" and "Deny".

yt:invideo
Definition Optional. The <yt:invideo> tag indicates whether a video is eligible for the
InVideo Ads program. The Invideo Ads program consists of an alternate
viewing page format that displays an ad inside your video using a
transparent Flash overlay. The page also displays a companion ad image.

Valid values for this tag are Allow and Deny. The Default value is Allow.

For more information about InVideo ads, please see the description,
examples and specifications at http://www.youtube.com/t/ads_invideo.

Example <yt:invideo>Allow</yt:invideo>
Subtag of yt:advertising

Content Format Boolean

yt:is_icon
Definition The <yt:is_icon> tag indicates whether the corresponding video's icon
should be set as the playlist icon. Set the value of this tag to true to set the
video icon as the playlist icon. Note that when you do set this value to true,
you will also make that video the first video in the corresponding playlist. The
tag's default value is false.
Example <yt:is_icon>true</yt:is_icon>
Subtag of yt:playlist

Content Format Boolean (true/false)

Google proprietary and confidential. The features described in this document are subject to change. 50 of 92
yt:keep_claims
Definition
Optional. The <yt:keep_claims> indicates whether you want to release any
claims that were created by YouTube's Video Identification system if the
reference file associated with the claims is deleted. This tag does not affect
claims that you created manually using the YouTube Content Manager's
search tool.

Valid values for this tag are yes and no. The default value for this tag is yes.

• If the tag's value is yes, then claims associated with a reference file
will be maintained if you delete the reference file. This value
specifies that the claims will not be released.
• If the tag's value is no, then claims associated with a reference file
will not be maintained if you delete the reference file. This value
specifies that the claims will be released.

The value of this tag is only evaluated if the <yt:action> tag has a value of
Delete and the <yt:keep_fingerprint> tag has a value of no. As such, if the
value of the <yt:action> tag is not Delete, or if the value of the
<yt:keep_fingerprint> tag is yes or if the <yt:keep_fingerprint> tag is not
present, YouTube will ignore the <yt:keep_claims> tag.

Example <yt:keep_claims>no</yt:keep_claims>
Subtag of item

Content Format Text

yt:keep_fingerprint
Definition
The yt:keep_fingerprint tag indicates whether the ID file for a video will
remain active when that video is deleted.

This tag is only evaluated if the <yt:action> tag has a value of Delete, which
means that if the value of the <yt:action> is not Delete, YouTube will ignore
the tag. Valid values for this tag are yes, which means the ID file will remain
active, and no, which means the ID file will not remain active. The default
value for this tag is no.

Example <yt:keep_fingerprint>yes</yt:keep_fingerprint>
Subtag of item

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 51 of 92
yt:language
Definition
Optional. The <yt:language> tag identifies the language of the video
content. The table below lists the supported languages and their associated
<yt:language> tag values. The default value for this tag is en, which
indicates that the video content is in English.

<yt:language> Tag
Language
Value
Chinese zh
English en
French fr
German de
Japanese ja
Spanish es

Example <yt:language>en</yt:language>
Subtag of item

Content Format Text

yt:location
Definition
Optional. The <yt:location> tag encapsulates information about the
geographic location where a video was recorded.

Example <yt:location>
Subtags yt:country?, yt:zip_code?, yt:location_text?

Subtag of item

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 52 of 92
yt:location_text
Definition
Optional. The <yt:location_text> tag identifies the place where the video was recorded.
This field has a maximum length of 215 characters.

This information may be displayed in YouTube's Content Manager system and, if the video
is publicly visible on YouTube, may also be displayed on the watch page for the video.

Providing geographic coordinates for the recording location

You can use the <yt:location_text> tag to supply latitude and longitude coordinates for
the location where the video was recorded. The example below demonstrates this
functionality:

<yt:location>

<yt:location_text>31.046051,34.851612</yt:location_text>
</yt:location>

You can use the YouTube Maps API Geocoder to convert addresses to geographic
coordinates. To use the YouTube Maps API Geocoder, you will need to sign up for an API
key at http://code.google.com/apis/maps/documentation/. Once you have an API key, you
can use the Geocoding web service to extract the coordinates for an address:

http://maps.google.com/maps/
geo?q=ADDRESS&output=csv&key=API_KEY

In the request, you must entity encode the address and add the country – e.g.
"10+Downing+Street+London, UK". You also need to replace the string API_KEY with
your API key. The Geocoding service will return an HTTP 200 response code if your
request is successful.

Example <yt:location_text>Hollywood, CA</yt:location>


<yt:location_text>31.046051,34.851612</yt:location_text>
Subtag of yt:location
Content Text
Format

Google proprietary and confidential. The features described in this document are subject to change. 53 of 92
yt:mid_roll_slots
Definition
Optional. The <yt:mid_roll_slots> tag specifies the times of natural breaks
in a video when mid-roll, in-stream ads could be shown. For example,
natural breaks in a movie might occur between scenes or chapters.

The tag's value is a space-delimited series of times that are specified in


seconds from the start of the video. Please specify the times of all natural
breaks in the video. YouTube will use those times to determine the
appropriate times to show ads to prevent ad breaks that are too close to one
another. (Note that YouTube does not require a specific time length between
the final mid-roll ad in a video and a post-roll ad.)

The timing of ad breaks depends on the length and type of video, which
means that movies, shows and other videos could all have different ad-
timing policies. Ad breaks are typically spaced to be seven to 12 minutes
apart. By specifying the times of all natural breaks in a video, you ensure
that ad breaks are still optimally spaced even if YouTube changes an ad-
timing policy, such as the minimum amount of time between a pre-roll ad
and the first mid-roll ad break.

The following rules explain the general process for selecting the times for
mid-roll ad breaks:

• YouTube ensures that a minimum amount of time elapses between


a pre-roll ad and the first mid-roll ad break that occurs in a video.
For example, if your video shows a pre-roll ad, then the first mid-roll
ad break could not occur until after the video's 10-minute mark.
• YouTube ensures that a minimum amount of time elapses between
mid-roll ads. For example, YouTube might ensure that at least
seven minutes of video run between mid-roll ad breaks in a show
and that at least 10 minutes of video run between mid-roll ad
breaks in a movie.
• If a video does not show a pre-roll ad, then YouTube does not
restrict the timing of the first mid-roll ad that runs for the video.
• YouTube does not require a specific amount of time to elapse
between the last mid-roll ad in a video and a post-roll ad for that
video.

For example, suppose that YouTube ensures that ad breaks for a 22-minute
TV show are spaced at least seven minutes apart, and that a show has
natural breaks every six minutes, meaning there are natural breaks at the
six-minute, 12-minute and 18-minute points of the show. If a partner opts to
show a pre-roll ad and a post-roll ad for the show, then the user will see a
pre-roll ad, a mid-roll ad 12 minutes after the video begins, and a post-roll
ad. On the other hand, if the partner does not show a pre-roll ad, the user
will see a mid-roll ad six minutes after the video begins, another mid-roll ad
18 minutes after the video begins, and a post-roll ad.

Example <yt:mid_roll_slots>300 700 1235 1490 2233</yt:mid_roll_slots>


Subtag of yt:ad_slots

Google proprietary and confidential. The features described in this document are subject to change. 54 of 92
Content Format The tag value is a space-delimited list of positive integers.

yt:movie_metadata
Definition
Required for movie videos. The <yt:movie_metadata> tag encapsulates
additional metadata fields about movie videos. Please note that the
<yt:movie_metadata> tag's subtags are only used for tracking and
reporting purposes.

Example <yt:movie_metadata>
Subtags yt:custom_id, yt:director?, yt:notes?, yt:title, yt:tms_id?

Subtag of item

Content Format Container

yt:notes
Definition
Optional. The <yt:notes> tag enables you to store additional information
that does not map directly to one of the other elements in the feed. The tag
is a free-text field that you can use to enter any comments or notes that
should be stored with the metadata.

Example <yt:notes>Production code: NBBS096J; Length: 22'18"</yt:notes>


Subtag of yt:movie_metadata, yt:tv_metadata, yt:web_metadata

Content Format Text

yt:name
Definition Required. The <yt:name> tag specifies the name of a playlist. If the playlist
does not exist for the specified account, YouTube will automatically create a
new playlist with that name.
Example <yt:name>Griswold family vacation videos</yt:name>
Subtag of yt:playlist

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 55 of 92
yt:name
Definition Required.
Example <yt:name>Publisher XYZ</yt:name>
Subtag of
Content Format Text

yt:notification_email
Definition Optional. The <yt:notification_email> tag contains a list of one or more
email addresses to which YouTube will send a report about an uploaded
content feed. We recommend that you set up a mailing list to which
YouTube will send notifications and then subscribe individuals who should
receive notifications to that mailing list. Please use commas to separate
email addresses.
Example <yt:notification_email>
andy@example.com,smitty@example.com
</yt:notification_email>
Subtag of channel

Content Format Text

yt:owner_name
Definition Optional. The <yt:owner_name> tag identifies the company or organization
that owns the video content described in the feed.
Example <yt:owner_name>Example.com TV</yt:owner_name>
Subtag of channel

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 56 of 92
yt:password
Definition
Optional. The <password> tag specifies the password for the YouTube
user account to which you are uploading a content item. You only need to
include this tag in your feed if you want to upload content to an account
other than the default account specified in your SFTP dropbox settings and
the user account is not already linked to your YouTube Content Manager
account.

• When the <yt:account> tag containing the <yt:password> tag is a


subtag of <channel>, the <yt:password> tag value contains the
password for the YouTube user account to which you are uploading
the videos in your feed.

• When the <yt:account> tag containing the <yt:password> tag is a


subtag of <item>, the <yt:password> tag value contains the
password for the YouTube user account to which you are uploading
a particular video.

Example <yt:password>w3dn3sday</yt:password>
Subtag of yt:account

Content Format Text

yt:playlist
Definition Required. The <yt:playlist> tag contains information about a playlist that a
video should be added to or removed from.
Example <yt:playlist>
Subtags yt:action, yt:name, yt:is_icon?, yt:position*

Subtag of yt:playlists

Content Format Container

yt:playlists
Definition Optional. The <yt:playlists> tag encapsulates a list of <yt:playlist> tags,
each of which identifies a playlist and an action that should be performed for
that playlist.
Example <yt:playlists>
Subtags yt:playlist+

Subtag of item

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 57 of 92
yt:policies
Definition Optional. The <yt:policies> tag encapsulates a list of <yt:policy> tags, each
of which specifies a policy for a video. We recommend that you group
policies beneath the <yt:policies> tag. However, YouTube's XML schema
allows you to place multiple policy tags beneath either the <item> tag or the
<policies> tag.
Subtags yt:policy+

Subtag of item

Content Format Container

yt:policy
Definition Required. The <yt:policy> tag encapsulates information about the licensing
policies that apply to a video.
Example <yt:policy>
Subtags yt:commercial?, yt:ugc?, yt:territories?

Subtag of yt:policies

Content Format Container

yt:position
Definition The <yt:position> tag specifies the order in which a video should appear in
a playlist. If you do not specify a value for this tag when adding a video to a
playlist, the video will be added to the end of the playlist.

Note: If you assign more than one video to the same position in a given
playlist, YouTube will process those actions in the order that they appear in
your feed. For example, suppose a feed contains three videos and assigns
all of those videos to position four in the same playlist. When YouTube
processes the first video, it will be inserted as the fourth video in the playlist.
When YouTube processes the second video, it will also be inserted as the
fourth video in the playlist, meaning the previous video will then be the fifth
video. Similarly, when YouTube processes the third video, it will also be
inserted as the fourth video, moving the previous video down to the fifth spot
and the video before that down to the sixth spot.
Example <yt:position>3</yt:position>
Subtag of yt:playlist

Content Format Integer

Google proprietary and confidential. The features described in this document are subject to change. 58 of 92
yt:saved_policies
Definition
Optional. The <yt:saved_policies> tag identifies one or two policies that
you want to set for a video. You can specify either or both of the following
policies for videos:

• You can specify a policy that will apply to user-uploaded videos that
match your content. Identifying this saved policy eliminates the
need to define a policy that contains the <yt:ugc> tag.
• You can specify a policy for videos that are publicly visible on
YouTube's website. Identifying this saved policy eliminates the
need to define a policy that contains the <yt:commercial> tag.
Example <yt:saved_policies>
Subtags yt:saved_policy+

Subtag of item

Content Format Container

yt:saved_policy
Definition
Required. The <yt:saved_policy> tag identifies a policy that you have
defined in the YouTube Content Manager system. To learn more about
creating saved policies, please see the YouTUbe Content Manager Help
Center.

Example <yt:saved_policy>
Subtags yt:content_type, yt:saved_policy_id

Subtag of yt:saved_policies

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 59 of 92
yt:saved_policy_id
Definition
The <yt:saved_policy_id> tag identifies the saved policy that you want to
apply. The tag value specifies the unique ID or name for the policy. The
unique ID for a policy can be parsed from the URL for the page to edit or
view that policy as highlighted in the examples below:

https://cms.youtube.com/
policies_edit?draft_id=HAHygTZbol
https://cms.youtube.com/
policies_view?draft_id=PiLJLL5LXQ

Attributes Name Format Description


type Text The type attribute indicates whether you are
identifying a saved policy by its unique ID or
its name. Valid values for this attribute are
id and name.

Example <yt:saved_policy_id type="name">Monetize in all


countries</yt:saved_policy_id>
Subtag of yt:saved_policy

Content Format Complex

yt:season
Definition
Optional. The <yt:season> tag specifies the season number associated
with a TV video. This field has a maximum length of 16 characters.

Example <yt:season>2</yt:season>
Subtag of yt:tv_metadata

Content Format Text

yt:show_title
Definition
Optional. The <yt:show_title> tag specifies the TV show that is shown in a
video. YouTube recommends that you include this information if it is
available for a video. This field has a maximum length of 64 characters.

Example <yt:show_title>Seinfeld</yt:show_title>
Subtag of yt:tv_metadata

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 60 of 92
yt:start_time
Definition
Optional. The <yt:start_time> tag specifies the date and time when
YouTube will publicly release a video. This field's value contains a date and
time in ISO 8601 format. The value must express times in UTC (Coordinated
Universal Time).

If the action for the video is either Insert or Replace, and you do not provide
a start time for the video, the video will remain private in your account. You
must provide a start time for a video to be publicly visible. To make a video
public as soon as possible, use a date in the past as the start time for the
video.

Note: We recommend that you deliver video files and metadata one to two
weeks before you would like your videos to be publicly released. Even
though videos will normally be pushed to YouTube's production site within
hours of your posting your feed, providing your data in advance allows you
more control over the time that your video content becomes visible to
YouTube users.

Example <yt:start_time>2007-07-04T05:00:00Z</yt:start_time>
Subtag of item

Content Format Date (YYYY-MM-DDThh:mm:ssZ)

Google proprietary and confidential. The features described in this document are subject to change. 61 of 92
yt:target
Definition Optional. The <yt:target> tag specifies the actions that YouTube should
perform for a video content resource. The following list identifies the set of
valid actions:

• upload – Make the video publicly available on YouTube.


• claim – Identify the video as content owned by the feed provider.
YouTube will automatically claim (for your account) any content
that you upload.
• fingerprint – Generate an ID file for the content. YouTube
generates an ID file for each video that you upload to YouTube's
public website as well as for each video that you add to YouTube's
Video Identification system.
• playlist – Process any playlist actions specified for the video.

The following list identifies valid values for this tag:

• upload,claim,fingerprint
• upload,claim
• claim,fingerprint
• upload,claim,fingerprint,playlist
• upload,claim,playlist

The default value for this tag is upload,claim,fingerprint. Please be aware


that if you do not provide a value for this tag or if the tag's value contains the
word upload, the corresponding content will be visible on YouTube.

Example <yt:target>upload,claim,fingerprint</yt:target>
Subtag of item

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 62 of 92
yt:territories
Definition Optional. The <yt:territories> tag identifies a list of one or more countries
where the policies that you define for a video should or should not be
applied. If you do not provide this tag, then the policies that you set for a
video will apply worldwide.

If you do provide this tag, the value of the rule attribute indicates whether
the policies should (or should not) be applied in the specified countries. The
tag's value is a space-delimited list of ISO 3166 two-letter country codes.
(Please note that the country code for England is GB and not UK.)

You can specify different policies for different countries by including multiple
<yt:policy> tags for that video in your content feed, with each <yt:policy> tag
defining the policies for specific countries. For example, you could choose to
monetize user-uploaded videos that match your video in the United States
and to track views of user-uploaded videos matching your video everywhere
else.

Please note that if you do set different policies for different countries, your
feed will be invalid if it specifies more than one set of policies for the same
video in a single country. For example, you cannot monetize user-uploaded
videos that match your video in the United States and track views of user-
uploaded videos matching the same video everywhere except France since
this would effectively create two policies for the same video in the United
States.

Attributes Name Format Description


rule Text
The rule attribute indicates whether the
associated policies should or should not be
applied in the specified territories. The only
valid values for this attribute are include
and exclude.

• If this attribute's value is include,


then the associated policies will be
applied in the specified territories.
• If this attribute's value is exclude,
then the associated policies will not
be applied in the specified
territories.

Example Apply policy in the United States and Great Britain:


<yt:territories rule="include">US GB</yt:territories>

Apply policy everywhere except Japan:


<yt:territories rule="exclude">JP</yt:territories>
Subtag of policy

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 63 of 92
yt:title
Definition
Optional. The <yt:title> tag specifies the title of a movie video. This title will
not be displayed to users on YouTube.com but may be displayed in the
YouTube Content Manager system. This tag may have the same value as
the <media:title> tag. This tag has a maximum length of 64 characters.

Example <yt:title>Covert Operations II (Deluxe director's cut)</yt:title>


Subtag of yt:movie_metadata

Content Format Text

yt:tms_id
Definition
Optional. The <yt:tms_id> tag contains a 14-character Tribune Media
Systems (TMS) ID value that uniquely identifies a movie or television
program.

Example <yt:tms_id>00123abc123abc</yt:tms_id>
Subtag of yt:movie_metadata, yt:tv_metadata

Content Format Text (14 characters)

yt:track
Definition
Each <yt:track> element contains information about a file that contains
captions for a video. This tag's subtags and attribute specify the filename of
the caption file, a human-readable name associated with the file and the
language of the captions in the file.

Attributes Name Format Description


language Text
The language attribute specifies a two-
letter ISO 639-1 language code that
corresponds to the language of the captions
in a file.

Example <yt:track language="en">


Subtags yt:track_name?, yt:track_filename

Subtag of yt:tracks

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 64 of 92
yt:track_filename
Definition
The <yt:track_filename> tag specifies the filename for a file that contains
captions for a video. Please see the Providing captions for a video section to
review formatting guidelines for caption files.

Example <yt:track_filename>captions_ID2351_DE.rt</yt:track_filename>
Subtag of yt:track

Content Format Text

yt:track_name
Definition
Optional. The <yt:track_name> tag contains a descriptive name for a file
that contains captions for a video.

Example <yt:track_name>French captions - James Blake interview 08/13/


08</yt:track_name>
Subtag of yt:track

Content Format Text

yt:tracks
Definition
The <yt:tracks> tag contains a list of <yt:track> elements, each of which
contains information about a file that contains captions for a video.

Example <yt:tracks>
Subtags yt:track*

Subtag of yt:captions

Content Format Container

Google proprietary and confidential. The features described in this document are subject to change. 65 of 92
yt:tv_metadata
Definition
Required for TV videos. The <yt:tv_metadata> tag encapsulates
additional metadata fields about tv videos. Please note that the
<yt:tv_metadata> tag's subtags are only used for tracking and reporting
purposes.

Example <yt:tv_metadata>
Subtags yt:custom_id, yt:show_title?, yt:episode?, yt:episode_title?, yt:notes?, yt:season?, yt:tms_id?

Subtag of item

Content Format Container

yt:ugc
Definition Required. The <yt:ugc> tag specifies the action that YouTube will take if we
detect that a user has uploaded a video that matches your copyright-
protected video. The following list specifies valid values for this tag:

• share - YouTube will monetize the user-uploaded video by showing


ads, possibly including in-video ads, on the video page.
Accordingly, YouTube will include the user-uploaded video in your
revenue-sharing agreement with YouTube.
• block - YouTube will block the user-uploaded file from appearing
on YouTube's public website in the territories that you specify.
• research - YouTube will flag the user-uploaded video so that you
can track it. Please note that YouTube Content Manager and
documentation for that application refer to this option as "track".

Please see Appendix B - Protecting video content on YouTube for more


information about how YouTube determines whether users upload copies of
your material.

Example <yt:ugc>share</yt:ugc>
Subtag of yt:policy

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 66 of 92
yt:urgent_reference_file
Definition
The <yt:urgent_reference_file> tag indicates whether YouTube should
prioritize processing for a video. YouTube will process your urgent videos
before your other videos that are not marked as urgent. Please note that
since your urgent videos are only prioritized relative to your non-urgent
videos, marking all reference files as urgent may not affect the time needed
to process your files. Valid values for this tag are yes and no. The default
value is no.

Example <yt:urgent_reference_file>no</yt:urgent_reference_file>
Subtag of item

Content Format Text. Valid values are yes and no.

yt:username
Definition
Optional. The <yt:username> tag specifies the username of the YouTube
user account to which you are uploading a content item. You would only
need to include this tag in your feed if you wanted to upload content to an
account other than the default account specified in your SFTP dropbox
settings.

• When the <yt:account> tag containing the <yt:username> tag is a


subtag of <channel>, the <yt:username> tag value contains the
username for the YouTube user account to which you are
uploading the videos in your feed.

• When the <yt:account> tag containing the <yt:username> tag is a


subtag of <item>, the <yt:username> tag value contains the
username for the YouTube user account to which you are
uploading a particular video in your feed.

Note: If the username that you specify is not already linked to your YouTube
Content Manager account, you must also use the <yt:password> tag to
specify the password for that user account.

Example <yt:username>happypartner</yt:username>
Subtag of yt:account

Content Format Complex

Google proprietary and confidential. The features described in this document are subject to change. 67 of 92
yt:web_metadata
Definition
Required for web videos. The <yt:web_metadata> tag encapsulates
additional metadata fields about web videos. Please note that the
<yt:web_metadata> tag's subtags are only used for tracking and reporting
purposes.

Example <yt:web_metadata>
Subtags custom_id, yt:notes?

Subtag of <item>

Content Format Container

yt:zip_code
Definition
Optional. The <yt:zip_code> tag identifies the zip code where a video was
recorded. This field has a maximum length of 11 characters. This value may
be displayed in YouTube's Content Manager system and, if the video is
publicly visible on YouTube, may also be displayed on the watch page for
the video.

Example <yt:zip_code>94043</yt:zip_code>
Subtag of yt:location

Content Format Text

Status reports

As noted in the Delivering content feeds to YouTube section, after processing each of your XML
feeds, YouTube will post a status report in XML format that details the actions taken for each item
in that feed. The status report will be placed on YouTube's SFTP server in the same directory as
the feed. This section explains the format and content of that report.

File naming conventions for status report files

YouTube's status reports are named status-xml-filename-##.xml, where xml-filename is the


filename of your XML feed, and ## is an optional numeric index that is included if your XML feed
contained more than a certain number of actions. In other words, YouTube will post multiple
status reports if your XML feed contains more than a certain number of actions, where the exact
number of actions described in a status report may change over time.

The following examples show how these rules operate in practice for an XML feed named
yt_metadata_2009-04-29-1454.xml. The examples assume that the maximum number of
transactions in each status report is 200.

Google proprietary and confidential. The features described in this document are subject to change. 68 of 92
• Example 1: Your XML feed requests 150 actions. After processing your feed, YouTube
posts a status report to status-yt_metadata_2009-04-29-1454.xml that contains
information about all of the actions that YouTube processed. (The status report filename
does not contain a numeric index.)

• Example 2: Your XML feed requests 450 actions. After processing your feed, YouTube
posts three status reports:

◦ status-yt_metadata_2009-04-29-1454-0.xml contains information about the


first 200 actions (1-200) that YouTube processed.
◦ status-yt_metadata_2009-04-29-1454-1.xml contains information about the
next 200 actions (201-400) that YouTube processed.
◦ status-yt_metadata_2009-04-29-1454-2.xml contains information about the
remaining actions (401-450) that YouTube processed.

To process the status report for a feed, your code should check for the presence of the numeric
index in the status report filename. If a file with a numeric index of 0 exists, then your code should
process that file and then increment the numeric index, continuing to process each status report
until a filename does not exist. If a file with a numeric index of 0 does not exist, then your code
should process the status report and then exit. The flowchart below illustrates this logic:

XML Structure for Status Reports

The <channel_status> tag is the root XML element in a status report. The <channel_status> tag
contains one <item_status> tag that indicates whether YouTube successfully processed your
feed. It also contains one <item_status> tag for each item in your feed. Within each <item_status>

Google proprietary and confidential. The features described in this document are subject to change. 69 of 92
tag, the <command> tag identifies the action that YouTube executed. If the value of the
<command> tag is Parse, then the <item_status> tag contains information about your XML feed
as a whole. Otherwise, the <item_status> tag contains information about an insert, update,
replace or delete action requested in your XML feed.

If YouTube successfully executes the action that you request in your feed, the <item_status> tag
will contain a <status> tag with the value Success. If YouTube does not successfully execute the
action that you request in your feed, the <item_status> tag will contain a <status> tag with the
value Failure and a <status_detail> tag that contains additional information about the reason that
the operation failed.

Note: YouTube will assign a video ID to each new video that you upload to be publicly visible on
YouTube. In addition, YouTube will assign a fingerprint ID for every other video that you include in
YouTube's Video Identification system. The status report will specify this ID, and you will need to
provide that ID in later requests to update, replace or delete that video.

Sample XML for status reports

The XML sample below shows the structure of the status reports that YouTube will return when
you post a content feed. The status report contains entries for five feed items. In the XML, there
are comments to indicate the separation of <item_status> tags for different feed items. The first
<item_status> tag indicates that YouTube successfully processed the XML feed. The second
<item_status> tag indicates that a request to insert a video failed; the remaining four entries
indicate that requests to insert, update, replace and delete other videos were successful. The
comments in the example would not appear in an actual status report.

<?xml version="1.0" encoding="UTF-8"?>


<channel_status version="2">
<timestamp>1162434848.49</timestamp>
<uploader_name>Your dropbox account</uploader_name>

<!-- Status for processing the XML feed begins here -->
<item_status version="2">
<timestamp>1162437914</timestamp>
<action>
<command>Parse</command>
<status>Success</status>
<status_detail />
</action>
<metadata_file>your_file.xml</metadata_file>
</item_status>

<!-- Status for failed insert action begins here -->


<item_status version="2">
<timestamp>1162434262</timestamp>
<action>
<command>Submit</command>
<status>Failure</status>
<status_detail>Can't find video file</status_detail>
</action>
<video_file>co2_file.mov</video_file>
<filename>co2_file.mov</filename>

Google proprietary and confidential. The features described in this document are subject to change. 70 of 92
<custom_id>000ABC123XYZ</custom_id>
<title>Covert Operations II</title>
</item_status>

<!-- Status for successful insert action begins here -->


<item_status version="2">
<timestamp>1162434262</timestamp>
<action>
<command>Insert</command>
<status>Success</status>
</action>
<video_file>co2_file.mov</video_file>
<filename>co2_file.mov</filename>
<custom_id>000ABC123XYZ</custom_id>
<title>Covert Operations II</title>
</item_status>

<!-- Status for successful update action begins here -->


<item_status version="2">
<timestamp>1162434258</timestamp>
<action>
<command>Update</command>
<status>Success</status>
</action>
<id type="video_id">a2jd010</id>
<title>Extreme Knitting with Granny Jones</title>
</item_status>

<!-- Status for successful replace action begins here -->


<item_status version="2">
<timestamp>1162434258</timestamp>
<action>
<command>Replace</command>
<status>Success</status>
</action>
<id type="video_id">asd92n30</id>
<isrc>USREV0124523</isrc>
<custom_id>2307411</custom_id>
<title>WOOHOO</title>
</item_status>

<!-- Status for successful delete action begins here -->


<item_status version="2">
<timestamp>1162434258</timestamp>
<action>
<command>Delete</command>
<status>Success</status>
</action>
<id type="video_id">k302t034</id>
<isrc>USREV0500005</isrc>
<custom_id>5607411</custom_id>
<title>Unicorns Are Ugly</title>

Google proprietary and confidential. The features described in this document are subject to change. 71 of 92
</item_status>
</channel_status>

XML tag definitions for status reports

The following tables define the XML tags that may appear in the status report that YouTube posts
after processing your feed. The tags are listed in alphabetical order.

action
Definition The <action> tag contains information about the type of action described by
the content of an <item_status> tag as well as an indication of whether the
action was successful.
Example <action>
Subtags command, description, status, status_detail?

Subtag of item_status

Content Format Container

channel_status
Definition The <channel_status> tag is the root element in a status report that
explains how YouTube processed an XML feed.
Example <channel_status>
Subtags timestamp, uploader_name, item_status+

Content Format Container

command
Definition The <command> tag specifies the type of action that YouTube executed.
This tag has five possible values – Parse, Insert, Update, Replace and
Delete. The <item-status> tag that contains the Parse command indicates
whether YouTube successfully processed your XML feed. Each successive
<item-status> tag specifies one of the four remaining actions, each of which
corresponds to a possible value of the <yt:action> tag in your XML feed.
Example <command>Update</command>
Subtag of action

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 72 of 92
custom_id
Definition The <custom_id> tag contains a unique value that you use to identify a
video. The <custom_id> tag for an item in the status report will contain the
same value as the <yt:custom_id> tag in your feed. This value is returned in
the status report to help you to match the returned status to the proper
video.
Example <custom_id>000ABC123XYZ</custom_id>
Subtag of item_status

Content Format Text

description
Definition The <description> tag contains additional information about the action that
YouTube performed. (The <command> tag identifies this action.)
Example <description>Update a video</description>
Subtag of action

Content Format Text

filename
Definition The <filename> tag specifies the file that contains the actual content for a
video. The <filename> tag for an item in the status report will have the same
value as the <media:content> tag's url attribute for the same item in your
feed. Note: This field is only returned if you are inserting or replacing a
video.
Example <filename>co2_file.mov</filename>
Subtag of item_status

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 73 of 92
id
Definition The <id> tag specifies the unique ID that YouTube assigned to your asset.
This value is particularly important for an asset that you have just inserted
since you will need to use the newly assigned video_id or fingerprint_id if
you want to update, replace or delete the corresponding asset.

To update the asset, you will use the <yt:id> tag to identify both the
video_id or fingerprint_id as well as the value of the type parameter. The
latter value appears in the <yt:id> tag's attribute, which is also named type.
Attributes Name Format Description
type Text
The type parameter specifies the type of
identifier contained in the tag's value. Valid
values for this attribute are video_id and
fingerprint_id. YouTube assigns a
video_id to all videos that are uploaded to
be publicly visible on YouTube's website are
assigned a video_id. In addition, YouTube
assigns a fingerprint_id to all videos that
are included in YouTube's Video
Identification system.

Example <id type="video_id">a2jdj010</id>


Subtag of item_status

Content Format Text

item_status
Definition The <item_status> tag contains information about an action requested in
your feed.
Example <item_status>
Subtags timestamp, action, custom_id?, id, metadata_file?, title, video_file?, filename?

Subtag of channel_status

Content Format Container

metadata_file
Definition The <metadata_file> tag identifies the XML feed for which the status report
provides information.
Example <metadata_file>your_file_10312007.xml</metadata_file>
Subtag of item_status

Content Format String

Google proprietary and confidential. The features described in this document are subject to change. 74 of 92
status
Definition The <status> tag indicates whether YouTube successfully completed a
requested action. Possible values for this tag are Success and Failure.
Example <status>Success</status>
Subtag of action

Content Format Text

status_detail
Definition The <status_detail> tag explains why YouTube was unable to complete a
requested action.
Example <status_detail>Cannot find video file</status_detail>
Subtag of action

Content Format Text

timestamp
Definition As a subtag of <channel_status>, the <timestamp> tag indicates the time
that YouTube finished processing an entire feed. As a subtag of
<item_status>, the <timestamp> tag indicates the time that YouTube
finished an individual item in the feed.
Example <timestamp>1162434848</timestamp>
Subtag of channel_status, item_status

Content Format Text

title
Definition The <title> tag specifies the title that YouTube displays for a video. This title
will display in YouTube Content Manager, which allows you to monitor your
content. If your video is visible to the public, this title will also display on
YouTube's public website. The <title> tag for an item in the status report will
contain the same value as the <yt:title> tag in your feed.
Example <title>Covert Operations II</title>
Subtag of item_status

Content Format Text

Google proprietary and confidential. The features described in this document are subject to change. 75 of 92
uploader_name
Definition The <uploader_name> tag contains a human-readable name assigned to
your SFTP dropbox. Your YouTube contact will assign this name. You do
not need to process the value in this tag.
Example <uploader_name>Your SFTP dropbox</uploader_name>
Subtag of channel_status

Content Format String

video_file
Definition
The <video_file> tag specifies the file that contains the actual content for a
video. The <video_file> tag for an item in the status report will have the
same value as the <media:content> tag's url attribute for the same item in
your feed. Note: This field is only returned if you are inserting or replacing a
video.

Example <video_file>co2_file.mov</video_file>
Subtag of item_status

Content Format Text

video_id
Definition
The <video_id> tag specifies the unique ID that YouTube assigned to your
video. This value is particularly important for a video that you have just
inserted since you will need to use the newly assigned <video_id> if you
want to update, replace or delete the corresponding video at some point in
the future.

Example <video_id>a2jdj010</video_id>
Subtag of item_status

Content Format Text

Appendixes

Appendix A - Valid categories for video content

Appendix B - Protecting video content on YouTube

Appendix C - Validating a feed with the YouTube XML Validator

Appendix D - Additional XML feed examples for TV videos

Google proprietary and confidential. The features described in this document are subject to change. 76 of 92
Appendix E - Generating an SSH key

Appendix F - Posting a file to an SFTP server

Appendix A - Valid categories for video content

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 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 regionIDs
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.

<atom:category term='Entertainment' label='Entertainment'


xml:lang='en-US'>
<yt:browsable regions='AU BR CA FR DE GB NL HK IN IE IT
JP MX NZ PL RU KR ES TW US'/>
<yt:assignable/>
</atom:category>
<atom:category term='Nonprofit' label='Nonprofit &amp;
Activism' xml:lang='en-US'>
<yt:assignable/>
<yt:browsable regions='US'/>
</atom:category>
<atom:category term='Videoblog' label='Videoblogging'
xml:lang='en-US'>
<yt:deprecated/>
</atom:category>

Localized category lists

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>, where you replace the term LANGUAGE in

Google proprietary and confidential. The features described in this document are subject to change. 77 of 92
the URL with the appropriate language value from the following list. (Instead of appending the hl
parameter value to the schema URL, you can also set the Accept-Language HTTP request
header to the appropriate language value.)

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) en-US
* default value
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:

<atom:category term='Entertainment' label='Divertissement'


xml:lang='fr-FR'>
<yt:assignable/>
<yt:browsable/>
</atom:category>
<atom:category term='Nonprofit' label='Associations et
organismes' xml:lang='fr-FR'>
<yt:assignable/>
</atom:category>

Google proprietary and confidential. The features described in this document are subject to change. 78 of 92
Appendix B - Protecting video content on YouTube

The YouTube Content Manager system enables a rights owner to identify user-uploaded content
that may consist entirely or partially of the rights owner's work. The rights owner can opt to have
YouTube remove the user-uploaded content, track the progress of the user-uploaded content, or
include the user-uploaded content in their revenue-sharing agreements with YouTube. (The
<yt:ugc> tag definition explains how rights holders can set this policy for individual videos in their
feeds.)

YouTube uses several mechanisms to identify user-uploaded content that may potentially include
a rights owner's content. The following list briefly discusses these mechanisms:

• MD5 Hashes – YouTube uses the checksum of the video binary that the user uploads to
create an MD5 hash. YouTube then compares that MD5 hash to a database of reference
hashes. Hash comparisons work when two videos are completely identical.

• ID files – YouTube creates frame-by-frame ID files (also known as video fingerprints) of


a rights owner's content and then matches user uploads to those files. When matching
frames are found, YouTube's content-matching engine then compares frames
sequentially before and after the matching frames to determine whether the user upload
actually matches the rights owner's content. YouTube's ID files also account for video
degradation and inversion in user uploads.

• Audio Identification – YouTube creates ID files, or fingerprints, for all content uploaded
by YouTube's audio content partners. YouTube maintains these ID files in a database
and compares the ID files for new user uploads to the ID files in that database. ID files
only match the audio portion of YouTube content. These files are extremely robust in
matching exact copies of the audio portion of short-form content and are designed to
account for minor time discrepancies in the video.

Note: Audio identification is best suited for identifying unique audio content with
pronounced distinguishing features. Audio identification is limited in its ability to help
identify video content matches.

Appendix C - Validating a feed with the YouTube XML Validator

The following steps explain how to validate your feed using YouTube's XML Validator:

1. Log in to your YouTube Content Manager account.

2. Click the Account Settings link at the top of the page.

3. Click the XML Validator link.

4. Upload your XML file or paste your XML feed into the text box.

5. Click the Validate XML button to see whether your XML validates against YouTube's
XML schema.

Google proprietary and confidential. The features described in this document are subject to change. 79 of 92
Appendix D - Additional XML feed examples for TV videos

The XML below shows a sample feed for TV videos. The XML for different feed types is virtually
identical. The primary difference between the samples is in the use of the <yt:movie_metadata>
and <yt:tv_metadata> tags, which contain metadata about a particular type of video. You can also
use the <yt:web_metadata> tag to provide metadata for a video.

<?xml version="1.0" encoding="UTF-8"?>


<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss"
xmlns:yt="http://www.youtube.com/schemas/yt/0.2">
<channel>
<yt:notification_email>sandy@example.com,
ben@example.com</yt:notification_email>
<yt:account>
<yt:username>happypartner</yt:username>
<yt:password>thec0wg0esm00</yt:password>
</yt:account>
<yt:owner_name>Example.com TV</yt:owner_name>

<item>
<yt:action>Insert</yt:action>
<media:title>Extreme Knitting with Granny Jones: Holiday
Sweaters</media:title>
<media:thumbnail url="file://custom_thumbnail.jpg"
fileSize="349016"/>
<media:content url="file://extreme_knitting.mov">
<media:description type="plain">
Granny Jones knits a wool sweater!
</media:description>
<media:keywords>knitting, extreme, granny, jones
</media:keywords>
<media:category>Entertainment</media:category>
<media:rating scheme="urn:simple">adult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2005-08-01</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

<yt:start_time>2007-07-07T07:07:07</yt:start_time>

Google proprietary and confidential. The features described in this document are subject to change. 80 of 92
<yt:end_time>2007-12-31T00:00:00</yt:end_time>

<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:tv_metadata>
<yt:custom_id>gj_0308</yt:custom_id>
<yt:episode>3</yt:episode>
<yt:episode_title>Holiday
Sweaters</yt:episode_title>
<yt:show_title>Extreme Knitting with Granny
Jones</yt:show_title>
<yt:season>8</yt:season>
</yt:tv_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

<yt:advertising>
<yt:adsense_for_video>Allow</yt:adsense_for_video>
<yt:invideo>Allow</yt:invideo>
<yt:instream_ads>Allow</yt:instream_ads>
<yt:ad_slots>
<yt:has_pre_roll>true</yt:has_pre_roll>
<yt:has_post_roll>true</yt:has_post_roll>
<yt:mid_roll_slots>480 900 1320</yt:mid_roll_slots>
</yt:ad_slots>
</yt:advertising>

<yt:target>upload,claim,fingerprint</yt:target>

Google proprietary and confidential. The features described in this document are subject to change. 81 of 92
</item>

<item>
<yt:action>Update</yt:action>
<yt:id type="video_id">asd92n30</yt:id>
<media:title>When Poodles Attack!</media:title>
<media:thumbnail url="file://custom_thumbnail2.jpg"
fileSize="349016"/>
<media:content url="">
<media:description type="plain">
KILLER poodles are on the loose!
</media:description>
<media:keywords>killer, pets, poodle,
attack</media:keywords>
<media:category>Entertainment</media:category>
<media:rating scheme="urn:simple">adult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2004-03-15</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:tv_metadata>
<yt:show_title>When Poodles Attack!</yt:show_title>

Google proprietary and confidential. The features described in this document are subject to change. 82 of 92
</yt:tv_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

</item>

<item>
<yt:action>Replace</yt:action>
<yt:id type="video_id">g92df3km2</yt:id>
<media:title>Cooking with Mary Ann Cotton: Killer Holiday
Feasts</media:title>
<media:content url="file://cooking_1252.mov" >
<media:description type="plain">
Mary makes a killer holiday feast.
</media:description>
<media:keywords>mary, cotton, cooking,
feast</media:keywords>
<media:category>Entertainment</media:category>
<media:rating
scheme="urn:simple">nonadult</media:rating>
</media:content>
<yt:language>en</yt:language>
<yt:date_recorded>2004-10-18</yt:date_recorded>

<yt:location>
<yt:country>US</yt:country>
<yt:zip_code>90210</yt:zip_code>
<yt:location_text>Beverly Hills, CA</yt:location_text>
</yt:location>

<yt:community>
<yt:allow_comments>Always</yt:allow_comments>
<yt:allow_responses>Never</yt:allow_responses>
<yt:allow_ratings>false</yt:allow_ratings>
<yt:allow_embedding>false</yt:allow_embedding>
</yt:community>

<yt:policy>
<yt:commercial>share</yt:commercial>

Google proprietary and confidential. The features described in this document are subject to change. 83 of 92
<yt:ugc>share</yt:ugc>
<yt:territories rule="include">US GB</yt:territories>
</yt:policy>

<yt:tv_metadata>
<yt:custom_id>1252</yt:custom_id>
<yt:episode_title>Killer Holiday
Feasts</yt:episode_title>
<yt:show_title>Cooking with Mary Ann
Cotton</yt:show_title>
<yt:episode>5</yt:episode>
<yt:season>2</yt:season>
</yt:tv_metadata>

<yt:distribution_restriction>
<yt:distribution_rule>Allow</yt:distribution_rule>
</yt:distribution_restriction>

</item>

<item>
<yt:action>Delete</yt:action>
<yt:id type="video_id">z84kf03j5g</yt:id>
<yt:keep_fingerprint>no</yt:keep_fingerprint>
<yt:keep_claims>no</yt:keep_claims>
</item>
</channel>
</rss>

Appendix E - Generating an SSH key

The following instructions explain how to generate an SSH key:

• Linux

1. Run "ssh-keygen -t dsa".


2. Select the default values for all options. Your identification will be saved in
/home/username/.ssh/id_dsa, and your public key will be saved in
/home/username/.ssh/id_dsa.pub.
3. Upload the public key – the file saved at /home/username/.ssh/id_dsa.pub –
when signing up for your SFTP dropbox account in your YouTube Content
Manager account. You can paste the public key into the SSH Public Keys field
or upload the public key file in the SSH Public Key File field. Contact YouTube
or your Technical Account Manager if you need further instructions.

Google proprietary and confidential. The features described in this document are subject to change. 84 of 92
4. Use your identification, /home/username/.ssh/id_dsa, as the private key for
your SFTP dropbox account.

• Windows

1. Download puttygen from http://www.chiark.greenend.org.uk/~sgtatham/putty/


download.html and WinSCP from http://www.winscp.net.
2. Run puttygen. Select SSH-2 RSA and click the "Generate" button.
3. Follow the instructions to move the mouse around in the blank area until the
key is generated.
4. Save the public key. Upload the public key when signing up for your SFTP
dropbox account in your YouTube Content Manager account. You can paste
the public key into the SSH Public Keys field or upload the public key file in the
SSH Public Key File field. Contact YouTube or your Technical Account
Manager if you need further instructions.
5. Click Save private key, ignore the request to passphrase protect the key and
save the key as id_dsa.ppk.
6. You can use WinSCP with this private key to access your SFTP dropbox
account.

• Mac

To generate a ssh key pair on your Macintosh type the following in the terminal window:
"ssh-keygen -t dsa -f youtubekey". Two files will be generated, "youtubekey.pub" and
"youtubekey". Please email the file attachment with "youtubekey.pub" and keep
"youtubekey" in a safe place since you will need that file to connect to YouTube's SFTP
server.

1. Open a terminal window.


2. Type the following text (without quotes): "ssh-keygen -t dsa -f youtubekey"
3. This process will generate two files, youtubekey.pub and youtubekey.
4. Upload the public key – youtubekey.pub – when you sign up for your SFTP dropbox
account in your YouTube Content Manager account. You can paste the public key into
the SSH Public Keys field or upload the public key file in the SSH Public Key File field.
Contact YouTube or your Technical Account Manager if you need further instructions.
5. Use the youtubekey as the private key for connecting to your SFTP dropbox account.

Appendix F - Posting a file to an SFTP server

To post a file to your SFTP dropbox, you can use an SFTP client or you can enter the necessary
commands on the command line. A number of free SFTP clients are available for download for
Windows, Mac or Linux environments.

The following steps explain the process of uploading your files to your SFTP dropbox account:

1. Connect to your SFTP dropbox account.

a. If you are using an SFTP client, connect to the URL


SFTP_ACCOUNT.xfer.youtube.com. In the URL, replace SFTP_ACCOUNT
with your account name. When prompted to enter a username, enter the same
account name as your user name.

Google proprietary and confidential. The features described in this document are subject to change. 85 of 92
If your client supports multiple connection methods (FTP, SFTP, etc.), ensure
that it is making an SFTP connection.

b. If you are connecting via the command line, connect to


SFTP_ACCOUNT@SFTP_ACCOUNT.xfer.youtube.com, which is the URL for
your dropbox account. In the URL, replace SFTP_ACCOUNT with your account
name.

2. You do not need a password to log in to your account. If you are prompted for a
password, just press the [Enter] key without entering a password. If your SFTP client
displays a password field in the form for establishing a connection, just leave the field
blank.

3. You do need to specify the location of your SSH private key. If you are using an SFTP
client, you may need to check a box indicating that you are using public key
authentication before you will be prompted to enter the location of your private key.
Appendix E explains how to generate an SSH key and locate your private key.

4. Connect to port 22.

5. Create a new directory, which you will use to post your files, and include a timestamp in
the directory name. You should create a new directory each time you upload a new set
of files to YouTube.

6. Post your audio or video files as well as your XML feed to your SFTP account.

7. When you are ready for YouTube to process your video files and your XML feeds, create
a file named delivery.complete in the SFTP directory where those files are located.

Revision History

October 1, 2009

This update contains the following changes:

• The new <yt:notes> tag lets you provide information that does not map directly to one of
the other asset metadata elements.

• The definition of the <yt:mid_roll_slots> tag has been corrected to state that the tag's
value is a space-delimited series of times rather than a comma-delimited series.

• Appendix C - Validating a feed with the YouTube XML Validator has been updated.
Previously, this appendix explained how to use an XML schema to validate your feed.
Rather than using an XSD, you should use the XML Validator in CMS to confirm that
your XML feeds are valid.

July 29, 2009

This update contains the following changes:

Google proprietary and confidential. The features described in this document are subject to change. 86 of 92
• The definitions of the <item>, <media:content> and <media:title> tags have been
updated to correctly reflect that <media:title> is a subtag of <item> and is not a subtag of
<media:content>.

• The definition of the <id> tag, which appears in response feeds, has been updated to
note that the value of the tag's type parameter could be either video_id or
fingerprint_id. The type should be stored and will need to be specified in the <yt:id>
tag's type attribute if you update, replace or delete the corresponding asset. (The <yt:id>
tag's definition has also been updated to reflect this information.) Note that this
documentation change clarifies existing feed behavior and does not represent a change
in the way feeds are processed or the way response feeds are constructed.

• Appendix E - Generating an SSH Key has been updated to contain links to the Content
Manager page for managing your SFTP dropbox account.

June 30, 2009

This update contains the following changes:

• The new Showing ads on a video section explains different options for showing ads in
the video player for monetized videos.

• The new <yt:instream_ads>, <yt:ad_slots>, <yt:has_pre_roll>, <yt:mid_roll_slots> and


<yt:has_post_roll> tags let you enable in-stream ads to show for a video and to define
the times that in-stream ads are allowed to be shown for that video.

• The new <media:thumbnail> tag lets you upload a custom thumbnail image for a video
as a part of an insert, update or replace action. To upload a custom image, place the
image in your SFTP directory and identify the file location using the <media:thumbnail>
tag's url attribute. Please ensure that the image adheres to the specifications listed in
the <media:thumbnail> tag definition.

• The file size limit for uploaded videos has increased from 1GB to 2GB.

• The definition of the <media:content> tag's url attribute has been updated to correctly
explain that the attribute's value should specify a location that is relative to the location of
the XML feed rather than to the root directory of the SFTP dropbox account.

Note: This change clarifies existing behavior and does not reflect a recent change in the
way that YouTube processes the value of the <media:content> tag's url attribute.

• The Understanding status reports for uploaded feeds section has been updated to
explain that YouTube will post multiple status reports for your feed if that feed contains
more than a certain number of actions. (The maximum number of actions included in a
report may change over time.) The section also contains updated information about the
file naming conventions for status reports. Finally, it contains a flowchart that illustrates
the logic for identifying and processing status reports.

Note: This change clarifies existing behavior and does not reflect a recent change in the
way status reports are generated.

Google proprietary and confidential. The features described in this document are subject to change. 87 of 92
• The new <yt:keep_claims> tag lets you release any claims that were created by
YouTube's Video Identification system if you delete the reference file associated with the
claims. The default behavior is to not release claims
(<yt:keep_claims>yes</yt:keep_claims>). The <yt:keep_claims> tag value is only
evaluated if the <yt:action> tag has a value of Delete and the <yt:keep_fingerprint> tag
has a value of no. Otherwise, YouTube will ignore the <yt:keep_claims> tag.

• A new section, Appendix F - Posting a file to an SFTP server, discusses the steps for
connecting to your SFTP dropbox account and posting files to that account.

• The <yt:adsense_syndication> tag has been deprecated.

January 13, 2009

This update contains the following changes:

• The updated <yt:target> tag definition and the new Managing playlists and playlist
content section explain how to modify your content feeds to add videos to playlists,
update the order of playlist videos, or remove videos from playlists.

• The new Specifying category metadata section explains the different category-specific
attributes that can be specified for movie, TV and web videos.

• The File formats for uploaded content section has been updated to reflect several
changes to the guidelines for formatting uploaded videos:

◦ The guidelines now explain how the YouTube player frames standard (4:3)
content that displays in a widescreen player as well as widescreen (16:9)
content that displays in a standard player.
◦ The guidelines no longer include recommendations for video bitrate since
bitrate is highly dependent on codec, framerate and resolution.
◦ The maximum file size for uploaded videos has increased to 20GB for videos
that will be viewed on YouTube and for videos that will be used as reference-
only material.

• The new <yt:director> tag identifies the director(s) of a movie video. This tag is optional
and is only used for movie videos.

• The Localized category lists section has been updated to note the availability of category
lists for Czech and Swedish. In addition, the following localized category lists have been
retired:

◦ The list for Canada (hl=en-CA) has been retired. Please use the U.S. list
(hl=en-US) as an alternative.
◦ The lists for Ireland (hl=en-IE, Australia (hl=en-AU) and New Zealand
(hl=en-NZ) have been retired. Please use the Great Britain list (en-GB) as an
alternative.
◦ The Chinese list for Hong Kong (hl=zh-HK) has been retired. Please use the
list for traditional Chinese (hl=zh-TW) as an alternative.

Google proprietary and confidential. The features described in this document are subject to change. 88 of 92
November 10, 2008

This update contains the following changes:

• The new Providing captions for a video section explains how to specify caption file(s) for
a video. The section also discusses supported formats for caption files, provides an
example of a simple caption format, and explains how YouTube will process captions for
a video when you update or replace that video.

• The <yt:tms_id> tag is a new subtag of <yt:tv_metadata>. The tag's value specifies a
14-character Tribune Media Services (TMS) ID that uniquely identifies a television
program.

• Appendix A - Valid categories for video content has been updated to explain that
categories that are neither assignable nor browsable are deprecated and are identified
as such in the YouTube categories feed by the <yt:deprecated> tag.

September 9, 2008

This update contains the following changes:

• The newly added <yt:adsense_for_video> tag enables you to indicate whether an


uploaded video can display AdSense ads, which may include remnant in-video ads or
contextual text ads. The default value for this tag is "Allow", which indicates that a video
can display AdSense ads.

• The newly added <yt:urgent_reference_file> tag enables you to indicate whether


YouTube should prioritize processing of a video relative to your other videos.

• The newly added <yt:web_metadata> tag enables web partners to provide video
metadata.

• The Providing information about your assets section and the <yt:action> tag definition
have been updated to note that when you delete a video, you also delete video statistics,
such as view counts, and user comments associated with that video.

• The discussion explaining how to apply policies to particular territories has been updated
to also explain how to apply policies worldwide.

• The description of the <yt:keep_fingerprint> tag has been updated to more clearly
explain that the tag is ignored unless the value of the <action> tag is Delete. This update
does not reflect a change in the way feeds are actually processed but rather a
clarification to the way the process is described in this specification.

• The <media:content> tag definition has been updated to accurately reflect the fact that
the url attribute is required, not optional as previously stated. In addition, the fileSize
attribute is not required, and that attribute has been removed from the specification.
(YouTube will ignore this attribute if it appears in your feed.)

• The <media:keywords> tag definition has been updated to note that the tag's value has a
maximum length of 300 characters and that individual keywords have a maximum length
of 25 characters.

Google proprietary and confidential. The features described in this document are subject to change. 89 of 92
• The <yt:location_text> tag definition has been updated to explain how to use this tag to
provide geographic coordinates – latitude and longitude – for a video's recording
location.

• The <yt:title> tag definition has been updated to accurately reflect that this tag, which
only appears as a subtag of <yt:movie_metadata>, is optional.

• The <media:title> tag definition has been updated to accurately reflect that this tag
contains the display title for a video.

• Appendix A - Valid categories for video content has been updated to explain the
<yt:browsable> tag's new regions attribute, which identifies the countries where a
category is browsable. In addition, the Localized category lists section, a new subsection
of Appendix A, has been added to explain how to download category lists for specific
languages and locales.

June 26, 2008

This update contains minor formatting changes.

June 17, 2008

This update contains the following changes:

• The Formatting requirements section has been updated to mention that the quality of
your uploaded videos will determine whether YouTube can encode those videos for
higher quality (HQ) playbacks. Learn more about higher quality playbacks.

• The Formatting requirements section has also been updated to note that the maximum
file size is 8GB for videos that are used as reference-only material in YouTube's Video
Identification system. The previous version of this document incorrectly stated that the
maximum size for such files was 10GB.

• The Delivering content feeds to YouTube section has been updated to explain how you
can manage settings for your SFTP dropbox in your YouTube Content Manager account.

In addition, the definitions of the <yt:account>, <yt:username> and <yt:password> tags


have all been updated to reflect the fact that the SFTP dropbox settings in your CMS
account identify the default YouTube user account that can update or delete your
content. As such, the <yt:account> tag is now an optional subtag of the <channel> tag.

• The <media:restriction> tag has been deprecated and replaced by the <yt:territories>
tag, which identifies one or more countries where the policies that you set for a video will
be applied. Using the <yt:territories> tag, you can apply different policies in different
countries. We will continue to support the <media:restriction> tag, which specifies the
countries where playback of a video is allowed or prohibited.

• The definition of the <yt:commercial> tag has been updated. Previously, the tag had two
valid values, share and free, and the selected value indicated whether YouTube could
use ads to generate revenue for a video. With this update, those two values take on a
secondary meaning, implicitly stating that YouTube may also play the video.

Google proprietary and confidential. The features described in this document are subject to change. 90 of 92
In addition, we have added the value block as a valid value for the <yt:commercial> tag.
This new value indicates that YouTube may not play the video. The tag's definition has
also been updated to explain that the <yt:commercial> tag is part of a policy, and the
tag's value only applies to the territories specified in that policy. (Learn more about
defining different policies for different territories.)

• The <yt:ugc> tag definition has been updated to reflect the fact that this tag is required
for all actions (other than Delete).

• The Localized category lists section, a new subsection of Valid categories for video
content, has been added to explain how to download category lists for specific
languages and locales.

• The <yt:policies> tag has been added as a subtag of <item>. The <yt:policies> tag
contains a list of all policies for a video, and each policy is, in turn, contained within a
<yt:policy> tag. Prior to the introduction of the <yt:policies> tag, the <yt:policy> tag
appeared in content feeds as a subtag of <item>. To ensure backward compatibility for
existing partners, we will continue to support feeds in which the <yt:policy> tag is a
subtag of <item>.

• Appendix C - Validating a feed with the YouTube XML Validator section explains a tool
available in the YouTube Content Manager that you can use to validate your feed.

• The <media:keywords> tag definition has been updated to specify that keywords may
not contain whitespace and that keywords need to be comma-separated rather than
space-delimited. Keywords must also be at least two characters long.

• The description of the Update action has been updated to note that you must include all
metadata for an item in the update item. You cannot, as previously stated, omit data
fields that are not changing.

February 19, 2008

• The Formatting requirements section has been updated to more clearly define the
recommended formatting specifications for uploaded videos. This section also includes
additional guidelines for uploaded videos that will be included in YouTube's Video
Identification System.

• Appendix A - Valid categories for video content has been updated to explain how you
can download an XML schema containing an up-to-date list of YouTube categories. This
section describes the contents of the XML file and also explains how to assign a new
video to a category.

• The <media:keywords> tag definition has been updated to specify that you must provide
at least one keyword per video. If you provide multiple keywords, those keywords should
be separated with commas.

• The description of the <yt:target> tag in the Setting content policies section as well as
the definition of that tag have both been updated to indicate that upload,claim is now a
valid value for that tag.

Google proprietary and confidential. The features described in this document are subject to change. 91 of 92
• The description of the <yt:commercial> tag in the Setting content policies section has
been updated to indicate that the default value of that tag is share, which indicates that
YouTube can use ads to generate revenue for the corresponding video.

• The description of the <yt:invideo> tag in the Setting content policies section has been
updated to indicate that if the value of the <yt:commercial> tag is free, the corresponding
video will not display in-video ads even if the value of the <yt:invideo> tag is Allow or
you omit the <yt:invideo> tag for the corresponding video.

© YouTube, Inc. 2009. All Rights Reserved.

Google proprietary and confidential. The features described in this document are subject to change. 92 of 92

You might also like