tags:

views:

337

answers:

1

So I created images generator (quite simple onewhich generates RGBs) I want to be able to turn some amount of images into H264 KeyFrame+dependent frames (lats say 100) So on each 100 frames generated I need to encode them into H264. How to do such thing?

+1  A: 

You have a couple options. Probably the best available encoder is x264, but it doesn't have a C# interface. You'd need to define C-style interop calls to use it from a C# program.

Another option would be MSFT's expression encoder SDK, which supports H264. I'm not sure how much it costs. Then there's a few other encoder implementations, such as Mainconcept and Dicas, that may have C# interfaces, but those are going to cost you.

One last option is to use DirectShow.NET and this filter to do the encoding with directshow. You should be able to do everything from C#, and it's through COM interop so the interface is a bit cleaner.

Lastly, almost all encoders work in the YUV colorspace, so you'll likely need something to convert your RGB images--x264 and the Monogram filter both work on YV12.

kidjan