8

How to encode video on the fly and send it trough the network from C#?

Can't find a suitable library. I need to encode in WMV and don't mind if the actual encoding is made in C++ as long as the library has a .NET assembly available.

Thanks

Rob Cooper
  • 28,567
  • 26
  • 103
  • 142
Greg Roberts
  • 798
  • 9
  • 14

3 Answers3

3

I'm aware of ffmpeg, but it is native C code only. If you're ok with interoperability this may be your ticket.

Edit: It turns out someone already wrapped this in a .NET assembly. It's called FFlib.NET.

spoulson
  • 21,335
  • 15
  • 77
  • 102
2

I use the Windows Media Format SDK, although I admit I use it directly in C++ native code. I believe it can be called from managed code.

This is now included as part of the Windows SDK here:

http://msdn.microsoft.com/en-us/windows/bb190307.aspx

(or you can download it separately - see the list in the left-hand panel)

Be warned, it is a fair bit to get your head around. However, there are sample code resources which should assist.

Mike Pollitt
  • 1,817
  • 16
  • 13
0

Depending on what you are encoding (size, framerate, hardware, etc) real-time encoding may not even be possible. Video encoding is VERY CPU intensive.

Andrew Burns
  • 13,917
  • 9
  • 40
  • 42