Tag Archives: Windows Media

Cable Labs Certified Media Center – Requirements

Cable Labs is really putting the screws on OEM users, who like to home-brew their media center PC on the cheap.  To view and record HDTV content on a new Vista MCE PC, the following is a list of required components (thanks Chris Lanier):

1) Vista Home Premium or Ultimate
2) HDCP Video Card
3) Special BIOS w/ OCUR bit set
4) OCUR (CableCARD Reader/Digital Cable Tuner)
5) OCUR Product Key (separate from Windows Product Key)
6) Sign MS agreement
7) Sign CableLabs agreement
8) Video drivers that support COPP, PVP-OPM, CGMS-A
9) Sound card to support exact requirements of CableLabs

Thought: The OCUR product key worries me a little, how much does one want to bet that the product key is pre-installed with a new system and not made available to the end consumer – preventing upgrade/re-pave of the system.

So.. essentially you’re looking at a completely new box – no hope of just adding cable card support to your existing MCE hardware.  At present, very few vendors are providing Cable Labs certified PCs, and I haven’t seen much in the way of certified bare-bones systems either.

According to Engadget, Vidabox are coming out with an all sing and dancing cable-card, Blue Ray, HD DVD unit in March, but it at $4500 it’s not cheap:

http://www.engadget.com/2007/01/23/vidabox-rolls-cablecard-into-blu-ray-and-hd-dvd-all-in-one-media/

Conclusion: it is still early days.  Vista isn’t yet mainstream, and many vendors have yet to come out of the “Cable Labs” woodwork.  I expect to see a change throughout this year as devices come onto the market that support cable card HDTV.

Windows Media Stream CSModule

I wrote my first Community Server module to display Windows Media Streams inside blog posts (bin and src download attached to this post).  You can do something similar with the YouTube plugin that Scott W wrote, but I wanted to try my hand at writing a CS plug-in and thought this would be a cool exercise.

Check out the BBC 24 News Headlines below:

[MMS://wmlive.bbc.net.uk/wms/news/heads_bb_s1:400:270]

To install this module, add the following line to the communityserver.config file under the <CSModules> tag, and copy the DLL to the bin directory.

<add name = "MMS" type = "RobGarrett.com.CSModules.MMSModule, RobGarrett.com.CSModules.mmsModule" /> 

To add a stream to a post, use the following syntax (replace { } with [ ]  ):

{mms_url:width:height}

e.g

{MMS://wmlive.bbc.net.uk/wms/news/heads_bb_s1:400:270}

That's all there is to it.

Embedding Windows Media and Quicktime into ASP.NET pages

I know there are numerous web sites and blogs about this subject.  Since I had to write some code for “Fred” to render on-line video, and embedding video in web pages can be somewhat fiddly to get right, I figured I’d blog the C# code for my future reference.  If hosting on-line video in your web site interests you, be sure to check out Sahil Malik’s post on the subject.

Below are two examples, which create the HTML for embedding Windows Media and Quicktime sources.  To use this code, compile either or both examples into your ASP.NET project (or into a referenced class library assembly), bung a PlaceHolder on your page and during the load event of your page pass the instance of your PlaceHolder control to the desired method.  The location should either be a relative URL or absolute URL to the hosted video file, which can be a streaming location or an HTTP location.

Embedding Windows Media:

private void CreateMediaPlayerEmbeddedControl(PlaceHolder ph, string location, int width, int height)
{
HtmlGenericControl result = new HtmlGenericControl();
ph.Controls.Add(result);
HtmlGenericControl embed = new HtmlGenericControl();
result.Controls.Add(embed);
// Embed tag.
embed.TagName = “embed”;
embed.Attributes.Add(“type”, “application/x-mplayer2”);
embed.Attributes.Add(“pluginspage”, “http://www.microsoft.com/netshow/download/player.htm”);
embed.Attributes.Add(“name”, “mediaPlayer”);
embed.Attributes.Add(“width”, width.ToString());
embed.Attributes.Add(“height”, height.ToString());
embed.Attributes.Add(“AllowChangeDisplaySize”, “1”);
embed.Attributes.Add(“AllowSize”, “0”);
embed.Attributes.Add(“AutoSize”, “0”);
embed.Attributes.Add(“AutoStart”, “1”);
embed.Attributes.Add(“DisplaySize”, “4”);
embed.Attributes.Add(“EnableContextMenu”, “0”);
embed.Attributes.Add(“Enabled”, “1”);
embed.Attributes.Add(“InvokeURLs”, “0”);
embed.Attributes.Add(“ShowCaptioning”, “0”);
embed.Attributes.Add(“ShowStatusBar”, “0”);
embed.Attributes.Add(“ShowControls”, “1”);
embed.Attributes.Add(“WindowlessVideo”, “1”);
embed.Attributes.Add(“uiMode”, “None”);
embed.Attributes.Add(“src”, location);
// Object tag
result.TagName = “object”;
result.Attributes.Add(“classid”, “clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95”);
result.Attributes.Add(“standby”, “Loading Microsoft Windows Media Player components…”);
result.Attributes.Add(“codebase”, “http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701”);
result.Attributes.Add(“type”, “application/x-oleobject”);
result.Attributes.Add(“width”, width.ToString());
result.Attributes.Add(“height”, height.ToString());
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
}

Embedding Quicktime:

private void CreateQuickTimeEmbeddedControl(PlaceHolder ph, string location, int width, int height)
{
HtmlGenericControl result = new HtmlGenericControl();
ph.Controls.Add(result);
HtmlGenericControl embed = new HtmlGenericControl();
result.Controls.Add(embed);
// Embed tag.
embed.TagName = “embed”;
embed.Attributes.Add(“width”, width.ToString());
embed.Attributes.Add(“height”, height.ToString());
embed.Attributes.Add(“scale”, “tofit”);
embed.Attributes.Add(“autoplay”, “true”);
embed.Attributes.Add(“controller”, “true”);
embed.Attributes.Add(“target”, “myself”);
embed.Attributes.Add(“type”, bo.MimeType);
embed.Attributes.Add(“pluginspage”, “http://www.apple.com/quicktime/download/index.html”);
embed.Attributes.Add(“src”, location);
// Object tag
result.TagName = “object”;
result.Attributes.Add(“classid”, “clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B”);
result.Attributes.Add(“codebase”, “http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0”);
result.Attributes.Add(“width”, width.ToString());
result.Attributes.Add(“height”, height.ToString());
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
result.Controls.Add(new LiteralControl(“”));
}

That’s it…. now if you’re really good, you can detect the client operating system, by looking for the word “Windows” in the user agent string (hint:Request.UserAgent) and calling the correct method above.

I tested the above code using FireFox and IE (Windows and Mac).  Windows Media will play in FireFox if you have the Windows Media Plugin (Windows version ships with latest version of Windows Media Player) installed, and the rendering Quicktime requires the plugin from Apple (duh).

Ratings Powertoy for WMP9/10

So, you’ve spent a lot of effort adding ratings to the media files in your media library in Windows Media Player. You later decide to move all your content to another workstation/server and realize that all the ratings are lost in the transition.

WMP Ratings are stored in a database stashed away in your Windows profile. Simply moving the media files to another machine is not enough to migrate the ratings. The database is a binary file and contains links to the physical location of media files. Thus, copying the database over to a new machine will not suffice.

Fortunately there is now a way to transition your ratings, using the Ratings Migration Powertoy. This handy tool installs as a plug-in into WMP9/10 and will copy the ratings from your profile to the physical WMA/MP3 files. Once migrated, the rating information can be extracted from the files and added to a new database in your profile.

http://www.wmplugins.com/ItemDetail.aspx?ItemID=58

eMusic Tag Editor

eMusic Tag Editor is really cool! This application provides editing of ID3 and WMA tag info in bulk.

I was looking for a tag editor for editing tag info for WMA files (since Media encoding did not copy over the ID3 info when I converted from my MP3). eMusic Tag Editor enabled me to add tag info to over 2000 songs in the space of an afternoon.

My favorite feature is the ability to extract tag component information from a file path. For example – I store my files in a directory named after the artist and the filename is the title of the song. eMusic Tag Editor pulled this information for each file and updated the tag info for every song in my collection while I went to lunch.

Download a trial version at http://www.emusictageditor.com/

Screen shot –