HowTo Multicast Stream Captured by DirectShow?

I have a requirement to create a very simple streaming server. It should be able to capture video from a device and then broadcast that video via multicast to multiple clients on the local network.

The capture part is pretty straightforward (in C #) thanks to a library someone wrote with DirectShow.Net ( http://www.codeproject.com/KB/directx/directxcapture.aspx )

The question I have now is how to do this? This is the part I am stuck on. I'm not sure what to do next or what steps to take.

+1


source to share


3 answers


There are no filters available that you can plug in and use.

You need to do three things:

  • Compress video to MPEG2 or MPEG4
  • Mux it to MPEG Transport Stream
  • Broadcast transmission

There are many codecs available for Part 1, and some devices may even output compressed video.

Part 3 is also easy.



The main problem is with part 2, as the MPEG transport stream is patented. It is licensed so you cannot create free software on it (VLC and FFMPEG violate this license) and you have to pay several hundred dollars to get a copy of the specification.

If you need to develop it, you need to:

  • Get a copy of ISO / IEC 13818-1-2000 (you can download it as PDF from their website), it describes the MPEG Transport Stream
  • Design a render filter that takes MPEG elements and multiplexes them into a transport stream

It must be a renderer since Transport Stream is not a transform filter. There are some kinds of data (program allocation tables and reference clocks) that need to be sent on a regular basis and you need to maintain a workflow for this.

+2


source


To do this, you need to configure / record some kind of streaming video server.

I have used VideoCapX for the same purpose in my project. The documentation and support aren't top notch, but it's good enough. It uses WMV streaming technology. The stream is called MMS . You can view it using any media player. I tested Windows Media Player, Media Player Classics and VLC. If you want to see this possibility without having to write code again, check out U-Broadcast , it uses VideoCapX to do the job behind the scenes.

I have been using DirectShow.Net for almost 2 years now and it is still difficult for me to write a streaming server due to the complexity of DirectShow technology.

Besides WMV, you can watch Helix Server or Apple Streaming Server. The latter is not free, which is why Microsoft's WMV Streaming Server.



You can also take a look at VLC or Windows Media Encoder for streaming right from the app. But for now I find that U-Broadcast does both of the above. VLC has codec compatibility issues and playing from a non-VLC player, WME has a problem starting the capture device.

Luck

NOTE. I am not affiliated with VideoCapX or its company, I am just happy about it.

+1


source


0


source







All Articles