Friday, 19 October 2012

How To Add Video And Audio Files On Your Site Using Microdata as per schema.org


 In our  post dated 3rd October 2012 we spoke about how to prepare your site for the semantic web and mentioned that we shall be  taking up each point in detail every Friday.


Our last post discussed  the hCard implementation  using microformat and microdata format for adding the contact details.

Today we discuss about  how to markup  video and audio files on your site using microdata  as per schema.org.

Videos and audio files are very useful and easily accessible content for the users. Especially  for content about demos,  interviews, how to instruction posts, testimonials, product display etc. Content which the user may not find interesting as text format can be made interesting by presenting it properly in a video or a podcast.

Video content and audio content can be indexed and made SEO friendly  which can improve the search visibility on varied search options of the search engines.

One of the ways is to add the video and audio content using microdata as per the schema.org.

Usually when we add video we embed the code generated via YouTube for that video if it is on YouTube or for that matter any other video broadcasting site like vimeo, Ted, etc.

For example:

<iframe width="560" height="315" src="http://www.youtube.com/embed/73wbfVrpQBk?list=UU0LI2nnnSO6lP8ZFj9FIdyA&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>

But using the microdata format as per schema.org the same code can be written as :


<div itemscope itemtype="http://schema.org/VideoObject">

<h2>Video: <span itemprop="name">SEO Myths Part 3</span></h2>

<p>  <meta itemprop="thumbnailURL" content="http://webpro.in/images/seo-services.jpg" /><br />

<meta itemprop="embedURL"     content="http://www.youtube.com/watch?v=ODBHEBMYQdQ" /><br />

<iframe src="http://www.youtube.com/embed/73wbfVrpQBk" frameborder="0" width="640" height="390"></iframe><br />

<span itemprop="description">Wasim Ismail goes over some SEO Myths in our third SEO Myths series.The five SEO myths covered in the video are: If you are active on Twitter your rankings will improve, There are Google certified SEOs, No follow links do not count, Once Google deletes your site from the index then no way that site can be re included, You must have a keyword in the domain name or have an exact match domain.</span>

</div>


This code gets reflected under Structured Data in WMT as follows:


how to markup video and audio files on your site using microdata as per schema.org


For adding audio  files:

If Original HTML:



  1. <b>12oclock_girona.mp3</b>

  2. Total Time: 0m:15s - Recorded on a terrace of Girona a sunday morning

  3. composed by Roger


  4.  <script type="text/javascript">

  5. var fo = new FlashObject("http://google.com/flash/preview-player.swf", "flashPlayer_719", "358", "16", "6", "#FFFFFF");fo.addVariable("url", "http://media.freesound.org/data/0/previews/719__elmomo__12oclock_girona_preview.mp3");fo.addVariable("autostart", "0");fo.write("flashcontent_719");

  6. </script>






Then With Microdata:



  1. <div itemscope itemtype="http://schema.org/AudioObject">

  2.   <span itemprop="name"><b>12oclock_girona.mp3</b></span>


  3. <script type="text/javascript">

  4.   var fo = new FlashObject("http://google.com/flash/preview-player.swf",

  5.   "flashPlayer_719", "358", "16", "6", "#FFFFFF");fo.addVariable("url","http://media.freesound.org/data/0/previews/719__elmomo__12oclock_girona_preview.mp3");fo.addVariable("autostart", "0");fo.write("flashcontent_719");

  6. </script>


  7. <meta itemprop="encodingFormat" content="mp3" />

  8.  <meta itemprop="contentURL" content="http://media.freesound.org/data/0/previews/719__elmomo__12oclock_girona_preview.mp3" />


  9. <span class="description">

  10.                 <meta itemprop="duration" content="T0M15S" />

  11.                 <span itemprop="description">Recorded on a terrace of Girona a sunday morning</span>

  12. </span>

  13. </div>


Related Links:


http://schema.org/VideoObject

http://schema.org/AudioObject

Next Friday 26th October 2012 – Read about “How To Add authorship markup ”

No comments:

Post a Comment