Friday, December 29, 2006

CDNs vs Multicasting

It is pretty well known fact nowadays that in order to organize streaming to the wide array of clients you will need to use services of the Content Delivery Network. Well, at least that's what I thought up to few days ago. :). But fortunatly that isn't always the case.

When you're using CDN's services you're paying for Gig's they've streamed. So if you have 1000 of viewers and they are viewing 1 Gb each you will have to pay for 1000 * 1 Gb * $1.60 (approx. price of Gig) = $1600. Pretty impressive, isn't it?

Now, when you're streaming live event (sports event, music concert, or even you on your webcam) in each specific time all the users should have the same picture on their screen. And that's where multicasting fits perfectly in. Using multicasting you are streaming to the group address, and users who want to view your stream connect to that group address. So you only stream your audio/video to the group once and that's it. So for the same sittuation if you have 1000 clients viewing 1 Gb you would have to pay only for 1 Gb traffic to your ISP....or you would pay nothing extra if you have unlimited plan;)

The drawback of multicasting is that your ISP has to support it. The stats says only 5% of ISPs support multicasting. Another drawback - you're broadcasting a steam, and user does not choose when he wants it to start. So ondemand scenario is hardly possible.

More info on multicasting:
http://technet2.microsoft.com/WindowsServer/en/Library/9feb45d5-bf5a-4e55-8c71-a37b7e7c3b311033.mspx

The good example of how it all works with multicasting is here:
http://www.americafree.tv ..well they are broadcasting movies that are sooooo old, but still...makes my point :).

Monday, December 25, 2006

Google vs Microsoft

I've just expirienced one thing that I think says pretty much about the software market in general. There have been a lot of complains over Micosoft that they deliver bad product and that if they weren't monipolist we would have something so much better..

Well, I don't think I have to say here that ALL software application have bugs. But let's look at the closest (as some say) compatitor of Microsoft - Google.


I've installed few applications from them. Which is Picassa, Google Internet Accelerator, Google Talk. While they all have great ideas and features, I wouldn't say they are in any way better then Microsoft's products (well, maybe they are better in maketting part though;)). For example Google Internet Axcelerator freaked me out because when I've installed it I've noticed that Windows is using more then 1 Gb of virtual memory. As I was programming different stuff I thought that this might be a bug in some of my projects, or Visual Studio. So I've been trying to catch some memory leaks in my code. And then I excidentaly unloaded the Google Internet Accelerator's process from the memory and it freed the memory for 400 Mbs (!!). And that's a simple apllication with almost no GUI.


Basicly what I'm trying to say with this post is that probably it really is impossible to develop the perfect application, but in a word were perfect is impossible the one who's closer to the perfect wins. And that seems to be MS...well for now for sure..

Wednesday, December 20, 2006

MSN Soapbox

I've just received my invitation to participate in beta testing of MSN Soapbox. MS's "me too" technology for YouTube. Unfortunately my test didn't went well at all. I remember I was able to view videos from Soapbox before (before I was invited) and it looked pretty cool. I guess I was viewing it in somewhat different way. Anyway, when I tried browsing the MSN Soapbox library I wasn't able to view ANY video at all. They all seemed to be streaming and I could here the sound playing, but the video window was all black, and sometimes saying "Loading..." when buffering. Well it's beta testing so maybe errors like this are acceptable. One suggestion I have of why could it possibly be black to me is that I don't have appropriate codec installed and though the DirectShow graph can't be built...(does it use DirectShow at all?).

Another tricky question on MSN Soapbox is it's video player. It doesn't look like Flash or WMP control to me. So I suppose that's something different. I've asked this question on WMTalk group and for now all we came up to is that that's not WPF/E for sure, as soapbox was released to beta a bit earlier then CTP of WPF/E was released. So I suppose that's some kind of custom ActiveX they are using...but why would they not use WMP embedded? If anybody has any clues please post them here! ;)

Wednesday, December 13, 2006

Customizing Windows Media Player appierence with UI plug-in

I recently had a project that had to customize the WMP's GUI. Not only withing Settings area, but should be able to paint anywhere on the WMP. Still, the WMP should think that it's an UI plugin, and be able to load/unload it on users' prompt.


As WMP does not expose any functionality for repainting itself, I had to figure out some way on how to do this. I've managed to implement this with a hook procedure. It is a pretty raw method, I think, and you can run it some troubles with different versions of WMP, maybe you'll have to create version for your plugin for each version of WMP. The troubles may be causes because of different looks of different versions of WMP. (WMP 10 and WMP 11 for example). But this is a working solution, and I don't know of any other so here it goes.

When you're creating a UI plugin, WMP calls Create method of your plug-in. It looks something like this:

HRESULT CYourPlugin::Create(HWND hwndParent, HWND *phwndWindow);

So the first parameter you have a parent window for the plugin. Logically it would pretty obvious that the parent for the plug-in is a WMP window, itself. But that's not really like that. To get the player window you'll have to do something like this:

HWND thePlayerWnd = GetParent(GetParent(GetParent(GetParent(hwndParent))));


yeah, there are a lof of windows within the WMP. So once you have the player's window, you can set a hook to listen to the messages that it receives like this:

DWORD threadID = GetCurrentThreadId();

HHOOK hook SetWindowsHookEx(WH_CALLWNDPROCRET, (HOOKPROC) MyHookProc, AfxGetInstanceHandle(), threadID);

Then you just monitor the messages sent to hook procedure and handle them on your as you wish. (please note that in this case messages will be sent to you AFTER WMP had processed them. That's because of WH_CALLWNDPROCRET flag).

when your plugin is being unloaded don't forget to unhook:

UnhookWindowsHookEx(hook);



That's it.

more info on hooks can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/hooks.asp

more info on WMP UI plugins here:
http://msdn2.microsoft.com/en-us/library/aa393418.aspx

If anybody has any question/suggestions please fill free to post them here.

Monday, December 11, 2006

GlooTV

Just got an email from the GlooTV team. Saying they are very excited about their new project and can't wait to let me beta test it. Can't say I'm that excited thooug:) Looks like another p2p streaming solution, but I'm not sure and still, it will be interesting to have a look at that!
If you're interested in beta testing it hurry up to http://GlooTV.com and register. Maybe you will still be among beta testers. And they will give free T-Shirts! Yey!:)

Sunday, December 10, 2006

VeniceProject

I've recently discovered the VenicePrject. That's the most mistified project ever! :) I wasn't able to find a thing about what it is exactly. Only that the guys who started Skype are behind it. They say it's something like p2p video streaming, but I know there are plenty p2p solutions available today already..like http://octoshape.com ..Well when Skype was starting there were already some VoIP messengers, so who knows..

If anybody is interested, you can start searching an info about the project here.
http://www.theveniceproject.com/


If you find anything, please post a comment here! I am really curiouse about it.

New stuff

Few cool things from the Media market I liked recently.

First - YouTube launches it's new feature - QuickCapture. (http://youtube.com/my_videos_quick_capture). It really looks like a great feature and I've been thinking a lot about something like this. In fact I'm currently implementing something like this. The funniest thing is that that Quick Capture page crashes on my laptop. :) It just starts downloading and then bam! I see the error message saying there was an error in my camera driver. I think it's worth to say that I'm using my QTek 8310 Smartphone as a camera:) but still, looks like YouTube didn't expect someone this.


Then the second thing is WPF/E CTP version. It's been released for a week or so already, and had a huge attention on WMTalk group. I have to say I LOVED it, even though it's only a CTP version and it loaded my CPU 87% just when watching the movie. You can find some cool samples of WPF/E here:

http://www.thewpfblog.com/


Cool thing is that it's able to co-exist with Flash. Like here:
http://thewpfblog.com/examples/wpfe/microbe/Default.html


More info on WPF/E here: http://msdn2.microsoft.com/en-us/library/bb190632.aspx
I've downloaded the WPF/E SDK, but for some reason didn't look at it yet. Well... I hope I will soon. The launch is expected in the first half of 2007 anyway;)

If you're posting you exist (neo Decart;)

Read that somewhere, so here I go. It's the start of my existence. Happy birthday to me!