12

Does anyone know of an open source H.264 encoder in C# (or any other managed language)? I might be able to make do with a python implementation as well.

The libraries that I’ve found (e.g. x264) are written in pretty low level c (procedural with lots of macros) and assembly. Tweaking them is turning out to be far more complex than I'd thought. My project has no concern for performance or compatibility. We just want to test how some ideas will impact the perception of the outputted video.

We’d be willing to pay for or license the code if need be.

Thanks in advance!

Edit - Some important points:

  1. I don't care about performance (e.g. real time encoding) at all. It could take 10 days to encode for all I care.
  2. A wrapper isn't helpful since I want to actually modify the encoder itself.
sharoz
  • 6,157
  • 7
  • 31
  • 57
  • If you want real time performance you should look for/make your own wrapper around the c implementation – mbx Apr 20 '11 at 00:53
  • I don't care about performance at all. Simplicity of the code is all that matters - that's why I'm looking for a c# implementation. – sharoz Apr 20 '11 at 01:01

4 Answers4

2

No one would likely spend the time to develop the codec in those languages because they would be hopelessly slow for actual encoding. However, the reference implementation should be less optimized and more useful to you. It is still in C.

http://iphome.hhi.de/suehring/tml/download/

colechristensen
  • 475
  • 1
  • 3
  • 11
  • I have a feeling you're correct. I know it's a long shot, but I'll hold off on your "check" for a day in case someone knows of something. That reference implementation is more understandable though. Thanks. – sharoz Apr 20 '11 at 01:30
  • Don't assume, there are several advantages to implementing the decoding in managed code with MediaElement being the prominent one. – Jay Aug 24 '14 at 18:37
2

I don't think there is already such a port you need - you'll find wrappers for any langugae but a pure implementation does not have the critical mass. I'd recommend to port it yourself, document your port well and then start tweakening it.

mbx
  • 6,292
  • 6
  • 58
  • 91
2

If you'd want to port some encoder to C#, this should be easier to start with - about 8k LOC: http://sourceforge.net/projects/fevh264/

dadop
  • 21
  • 1
1

How about http://www.ffmpeg-csharp.com/?

NateTheGreat
  • 2,295
  • 13
  • 9
  • 3
    I believe he is looking to actually modify the codec, not just use it in a different language. It appears that your link is just a wrapper. – colechristensen Apr 20 '11 at 01:05