Real-time wmv video encoding in C#

2019-01-23 18:38发布

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

3条回答
小情绪 Triste *
2楼-- · 2019-01-23 18:58

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

查看更多
迷人小祖宗
3楼-- · 2019-01-23 19:02

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.

查看更多
在下西门庆
4楼-- · 2019-01-23 19:09

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.

查看更多
登录 后发表回答