Live streaming with DirectShow and Windows Media Format SDK RRS feed

  • Question

  • I'm developing a Silverlight 3 application and want to add support for live streaming (webcam + microphone as input). Unfortunately, Silverlight cannot access a webcam or a microphone itself, so I need to create a stand-alone application for establishing the media stream. I guess Silverlight would work best with Microsoft technology, so I want to use the ASF format with WMV/WMA encoding.

    After doing some research, here is what I think I could do:

    • It seems possible to capture both webcam and microphone input with DirectShow and then combine it into one "stream".
    • To encode the stream, I probably need to pass it to the Windows Media Format SDK libraries (MSDN documentation describes how to use DirectShow with WM ASF Writer).
    • I think it should be then possible to use something like "Network Sink" to broadcast the ASF stream (without writing it to the HDD).
    • I guess that connecting lots of clients to the stream would be quite heavy on bandwidth, so I should probably send the stream to a server and broadcast it from there. I just don't know if it's possible to use a combination of ASF Reader/Writer to "pass" the stream through the server. I also don't know if I could use multicasting to achieve a similar result.

    I'm planning to use C#, although this probably doesn't make much difference as I will have to use some wrappers for C++ libraries anyway (like DirectShow.Net or SlimDX).

    Unfortunately, I have virtually no experience with handling media streams. So my first question is, is it even possible to do streaming in the way I described? And will Silverlight be able to play such stream?

    And if it IS possible, is it a sensible way or should I consider using some different libraries/frameworks?

    Saturday, April 25, 2009 9:11 AM

All replies