How To: Transform MRSS feeds to Google video sitemaps
The following applications and features are supported via the Brightcove Developer's Group.
If you need help with the following instructions please go to the Brightcove Developer's Group.
In the Developer's Group you can find help from other developers, including some Brightcove folks.
Brightcove enables distribution of Media RSS feeds to many popular search engines and video aggregators; check out this article in Splice for more information. Google's new video sitemaps, however, use a different format in order to index your content for Google's video search. These new video sitemaps use the standard Sitemap protocol; you can read more about it here. To help you submit your content to Google we have devised a simple server-side script to help you transform your Brightcove Media RSS feeds into the Video Sitemap format.
Before You Begin
Download the source code. This zip file includes an XSLT file and reference implementations in PHP, JSP, and ASPX.
How it works
Technically speaking, the script is a translation layer that converts Brightcove Player Media RSS feeds into Google Video Sitemaps using XSL transforms. You can download the XSLT and reference implementations in PHP¹, JSP², and ASPX. If you don’t use any of these languages, you can use the implementations provided as a reference for porting them to your backend system.
Brightcove players allow you to specify a base URL where the player is hosted, and video URLs for the player are derived from that. This script simply transforms the feed of a player's contents into a format ready for ingestion by Google's web-crawling tools. In our reference implementations, we created a dynamic page which expects a player ID as a GET parameter and outputs the converted feed in Video Sitemap form. By registering the page URL with Google, complete with a playerID query parameter, you can maintain a static URL that Google can check periodically to update their mapping for your site.
Deployment and customization
Now that we have our UI and infrastructure ready we can create our captions. We'll use the contentLoad event handler to define our cuepoints and assign them to the featuredTitle in one place.
If you’re using a PHP, Java, or ASP backend you can easily deploy the existing files anywhere you like in your application path. It just needs to be accessible from your web browser or any other application functionality you want to call it. Be sure to take note of the dependencies for PHP and Java (see the end of this document).
The reference implementations are basic samples with specific functionality. You can customize them to suit your specific language, environment and individual requirements, in the same manner as the XSL transformation document can itself be customized to output the video data as desired. To host a customized page like one of these you need to have a web server that provides some form of dynamic pages and the capability to execute XSL transforms from within those pages; some environments will need this capability added by external libraries and some will already have it built in. Once that capability is in place, merely hosting two files (the videomap.xsl and your dynamic transformation page) will allow you to provide full video sitemaps for Google video search.
Dependencies for PHP and Java
¹Note that the PHP implementation requires installation of the Sablotron library and wrapper for PHP.
²Note that the JSP implementation requires installation of the Jakarta XSL tag library.
