Webmasters will now be happy as you can help Google index your videos and make it more searchable through Google Video Search. You can now tell Google where are your video files and they will be gladly added into their web crawler, that is if you submit with a sitemap which is compliance to Google Sitemap Protocols, which has been standardize by Google, Microsoft and Yahoo! since year 2006.
To get you started:
1) Create a Video Sitemap
I have managed to build a Video Sitemap for Vshare.
This is what I am currently using. I submitted it to Google and he liked it. No problems so far.
Just edit your MySQL Details and your site name in the script, then save it in your site root as "video-sitemap.php" .
Code:
<?php
echo "<?xml version='1.0' encoding='iso-8859-1'?>";
echo "<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9' xmlns:video='http://www.google.com/schemas/sitemap-video/1.0'>";
// hostname on which MySQL is (usally localhost)
$dbhost = "localhost";
// Database name
$dbname = "my_database_name";
// Username
$dbuser = "my_user_name";
// Password
$dbpass = "my_password";
// mysql_connect() fnction
$conn = mysql_connect($dbhost,$dbuser,$dbpass)
or die("Unable to connect to MySQL.");
// mysql_select_db() function
mysql_select_db($dbname,$conn)
or die("Unable to connect to Database $dbname");
$sql = "Select VID, title, description, adddate, flvdoname, duration from video where approve=1 and active=1";
// execute SQL Command
$res = mysql_query($sql,$conn)
or die( "Error: " . mysql_error() );
// Retrieve Results
while ($info = mysql_fetch_row($res)) {
$SefUrl=strtolower(preg_replace("/[^a-zA-Z0-9]+/","-", $info[1]));
$title=str_replace("&","e", $info[1]);
$title=str_replace("\"","", $title);
$desc=str_replace("&","e", $info[2]);
$desc=str_replace("\"","'", $desc);
$desc=str_replace("<","", $desc);
$desc=str_replace(">","", $desc);
echo "<url>
<loc>http://www.yoursite.com/view/".$info[0]."/".$SefUrl."/</loc>
<video:video>
<video:content_loc>http://www.yoursite.com/flvideo/".$info[4]."</video:content_loc>
<video:player_loc allow_embed='yes'>http://www.yoursite.com/player.swf</video:player_loc>
<video:title>".$title."</video:title>
<video:description>".$desc."</video:description>
<video:thumbnail_loc>http://www.yoursite.com/thumb/".$info[0].".jpg</video:thumbnail_loc>
//change the following line if your site contains adult videos
<video:family_friendly>Yes</video:family_friendly>
<video:duration>".$info[5]."</video:duration>
</video:video></url>";
}
echo "</urlset>";
// mysql_close() function
mysql_close($conn);
?>
2) Sign into Google webmaster tools with your Google Account.
3) Add your site to your account. Your site will be the URL to the directory at which you’ve placed your Video Sitemap. For example, if the URL to your Sitemap is “http://www.example.com/videofeed.xml”, you will need to add a site “http://www.example.com”.
4) Click Add a Sitemap beside the site.
5) Select Video Sitemap.
6) Type the URL to your Video Sitemap in the provided field. Make sure you include the entire URL, such as “http://www.example.com/video-sitemap.php”.
7) Click Add Video Sitemap.
Bookmarks