Koozai > Blog > How To Use Schema.org Markup for Your Videos

How To Use Schema.org Markup for Your Videos

| 4 minutes to read

If you are new to Schema.org markup, you are not alone. Schema.org is a joint project between Search Engine giants Google, Bing, Yahoo! and Yandex so it is fast becoming an important addition to your website to help your content get indexed.

In summary it provides clear structured information to the search engine spiders about rich content such as events, people, places, products, reviews and media content.  A full list of current Schema.org types can be found here.

What I’m going to recommend in this blog post is using the VideoObject item to provide search engines with the information to be able to show the videos on your website in the search results in a well formatted manner. For example:

Video Markup in the Search Results

Adding the HTML to your video files is relatively easy, say your video code just has the video embed code something like this:

<h2>My Great Video</h2>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
<param name="movie" value="https://www.mywebsite.com/my-video.swf">
<param name="quality" value="high">
<param name="play" value="true">
<embed src="https://www.mywebsite.com/my-video.mp4" type="application/x-shockwave-flash">
</embed>
</object>

<p>This video was made to illustrate how cookies taste so good.</p>

 

The example below shows how it might look with the Schema.org  markup added:

<div itemprop="video" itemscope itemtype="https://schema.org/VideoObject">
<h2><span itemprop="name">My Great Video</span></h2>

<meta itemprop="duration" content="T1M30S" />
<meta itemprop="thumbnailURL" content="https://www.mywebsite.com/my-video-thumbnail.jpg" />
<meta itemprop="contentURL" content="https://www.mywebsite.com/my-video.flv" />
<meta itemprop="embedURL" content="https://www.mywebsite.com/my-video.swf" />
<meta itemprop="uploadDate" content="2011-07-05T08:00:00+08:00" />
<meta itemprop="expires" content="2012-01-30T19:00:00+08:00" />
<meta itemprop="width" content="640" />
<meta itemprop="height" content="480" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param name="movie" value="https://www.mywebsite.com/my-video.swf">
<param name="quality" value="high">
<param name="play" value="true">
<embed src="https://www.mywebsite.com/my-video.flv"type="application/x-shockwave-flash">
</embed>
</object>

<p><span itemprop="description">This video was made to illustrate...</span></p>
</div>

It is important to include the required VideoObject properties as described in the table below. There are also a few optional VideoObject properties.

Required PropertyDescription
nameThe title of the video
thumbnailURLThe URL of a thumbnail image for the video. Must be at least 160×90 pixels and a maximum of 1920×1080 pixels. Image files should be in .jpg, .png or .gif formats.
contentURL*Either this contentURL or the embedURL property is required*
A URL to the actual video file, this could be either of the following formats: .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv. RTMP streaming protocols are not supported.
embedURL*This option should be used if your video is hosted by a thrid party website*
Insert the URL of video page, for example https://www.youtube.com/watch?v=3tJJrfUVKgw. This URL can usually be found in the tag for the video.
descriptionA written description of the video. This tag can be added to an existing description on your page (making sure it is within the VideoObject div.

 

Optional PropertyDescription
durationThe duration of the video in ISO 8601 format.
uploadDateThe date the video was first published in ISO 8601 format.
expiresIf you want to specify a date when the video will no longer be available, you can do so by stating it in ISO 8601 format. Don’t use this property if your video does not expire.
heightThe height of the video in pixels.
widthThe width of the video in pixels.

With the new Schema.org VideoObject properties you can easily specify the details of your video for a richer search engine listing. Although the search engines used to do an OK job of picking out the video and using the page title and content to add details to the search engine listing, we previously used video sitemaps to indicate what these were as well as what videos were on a website.

Google still highly recommends creating an XML video sitemap to provide additional video information and submitting it to them so they discover all of the  video content available on your website. Video sitemaps can be quite time consuming to create unless you use automated software, so at least you can give your videos a better chance of being correctly indexed using this new Schema.org markup.

One of the major advantages I can see with being able to add VideoObject properties to your HTML is being able to accurately describe each video on a single page with multiple videos. Previously with video sitemaps it was difficult get multiple videos on the same page indexed correctly, and if you have HTML access to your pages, adding the Schema.org markup offers an easier, more reliable and widely accepted standard.

Don’t forget to test all of your Schema.org markup using Google’s Rich Snippet testing tool. More information on Schema.org for Videos can be found on Google’s Webmaster EDU site and in this announcement.

Responses

  1. A avatar

    Hi Dean,

    Great site!

    I have a question regarding the rich snippets: markup for your videos. What if your video is hosted privately on a third party website, because it is a paid video? Do you still have to add the embedURL property? What about the contentURL, I don’t have the physical file on my server. They all are hosted on a third party website.

    Greets,

    A.

    1. James Challis avatar

      If the video is hosted on a third party site then I would say that the embedURL property would be best even if this is a paid video because the file will be hosted separately to the site and is being embedded from another location. The mark up should still be relevant to your site and enable the video data to be shown in the same way.

  2. Partha Sarathi Dutta avatar

    I’ve seen this.. https://support.google.com/webmasters/answer/2413309?hl=en; even Yandex has their own (https://help.yandex.com/video2/partners/schema-org2.xml).

    Bing should now also start thinking about publishing a similar fashioned document within their Webmaster help forum for the sake of end-users.

  3. kelly avatar
    kelly

    thanks for this article. I was wondering if it is appropriate/necessary to add the markup to a list of video items as well, that link to the individual video pages?

    1. Dean Marsden avatar

      Hi Kelly, I would just add the mark up to wherever you have the video embedded. So if they are only on the individual pages then add it there. That would be the page you want to shown in the search results.

  4. […] you write these snippets, example being the Yoast Video SEO for WordPress. You can also use the schema.org mark-up, as we are now learning that Google has embraced this mark-up […]

  5. JJ avatar
    JJ

    If we have YouTube videos embedded on our site and use the Schema meta tags, how can we get Google to link to the actual PAGE URL and not the YOUTUBE URL. All of the examples out there (including yours) do not address this most basic of issues. How do we specify the URL of the page we want the video to link to. We don’t want links to Youtube.com, but our own site.

    Also, what value is contentURL and embedURL when the YouTube does not provide a video file? That was also not addressed by your article.

    Please can you advise? Thank you.

    1. Dean Marsden avatar

      It sounds like your video on YouTube is just stronger than the page on your website.

      The best thing you can do is to implement a Video Sitemap and submit this to Webmaster Tools so that they are fully aware of your page with the YouTube video.

      Follow my guide here: https://www.koozai.com//search-marketing/how-to-create-a-video-sitemap-for-embedded-youtube-videos-without-using-linkedtube-com/

      Or the official Google help page: https://support.google.com/webmasters/answer/80472?hl=en

      If this doesn’t work over time, you may want to try setting the video as ‘unlisted’ in YouTube so that it can only be found via a link (i.e. not crawled by Google)

  6. Jason avatar

    Well, if you’re going to host your own videos and you don’t want your viewers to have to download players, you have to host them in 3 different formats (Ogg, WebM and MP4). What do you put in the “value=”https://www.mywebsite.com/my-video.swf”>” section if you have 3 different videos for the different browsers?

    1. Dean Marsden avatar

      Hi Jason, If you wish to use multiple formats within your page, then utilising HTML5 code is good choice (https://en.wikipedia.org/wiki/HTML5_video#Multiple_sources). The Parameter tags and the object id section as a whole would not be needed if you were to implement a different video format to flash.

  7. Jason avatar

    I haven’t tried using it yet, but is the schema markup compatible with multiple embedded videos which are necessary for the various browsers?

    1. Dean Marsden avatar

      Hi Jason. Thanks for the comments and question. I’d add the schema to every video on a page. This can help them appear better in the search results. If you wanted to improve their search performance better, I’d have each video on its own webpage just to increase the ‘theme’ or targeting for that page. Modern browsers and the popular search engines are able to read the the schema code fully. Hope this helps?

  8. Jason avatar

    Just about every explanation of schema.org sucks. Yours is the best I’ve seen. It’s not great, but it sucks the least. Congrats.

  9. diego avatar
    diego

    thank your for your answer! I think your are totally right, one the user arrives on the page, he can than switch between the different formats…but it doesn’t matter what the search engines showed on the SERP! Thank you and keep posting :)

  10. Dean Marsden avatar

    Hi Deigo, Thanks for stopping by on my blog post! I’ve not encountered having multiple video formats within the schema.org code. I can only suggest that every format is not needed to be added to your schema code as the schema is there in place to help search engines and other services identify and preview your video content and using a single common video format in the code should do this. The different formats will then be useful for users once they have been forwarded to your page.

    However if you are not seeing any errors by having multiple file formats in the contentURL then it shouldn’t harm it :)

  11. diego avatar
    diego

    Hi Dean, thanks for sharing your knowledge, I’m facing a pretty complicate issue about this topic, maybe you can help me :)
    On my website I’m hosting the same video in different formats, could I define more than one contentURL item for a videoObject? Rich Snippet testing tool looks to accept it…

  12. Hiren Khambhayta avatar

    Thanks for helpful tip, are there any way to get default flash swf file to attach videos to?

    1. Dean Marsden avatar

      Hi Hiren, If you want to get your flash video files to be indexed via a video sitemap you will have to provide the root video file (such as my video.m4v) as usually an swf if just the ‘container’ for playing a video file.

  13. Philip Kleudgen avatar

    Hi,

    Thanks for your advice. I think what you say makes sense. I will use what fits the post best or maybe both.

  14. Philip Kleudgen avatar

    Hi, thanks for this great tutorial how to set the video snippet up. I tried it on one of my sites and it works like a charm, but on another website of mine where I have installed https://wordpress.org/extend/plugins/google-rich-snippets-plugin/ it does not work. Everytime I save the post it seems to delete the markup of the video and only shows the review snippet.

    Any suggestions?

    regards Phil

    1. Dean Marsden avatar

      Hi Phil,
      Glad the video snippets are showing on your first website. I believe the reason it is not showing on your second website is because you can’t have two snippets show at the same time in the search results. However you should keep both mark-ups on the page because one or the other will show depending on what search query searchers used.

      For example if they searched for ‘Blue Widget Review’ then the review snippet may show, but if they searched for ‘Blue Widget Video’ then the video data may show. Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

Digital Ideas Monthly

Sign up now and get our free monthly email. It’s filled with our favourite pieces of the news from the industry, SEO, PPC, Social Media and more. And, don’t forget – it’s free, so why haven’t you signed up already?