Projects / active

Kiln

An H.264 encoder written entirely in C#, with no native code underneath. Baseline profile only, and on NuGet.

Status
active
Languages
C#
Kiln’s README banner: a seam of molten orange light running horizontally through a wall of dark stone blocks, throwing sparks.

Kiln exists because Proxeno needed to encode video inside a .NET process, and everything I found was either a native codec to ship for every platform or a licence I didn't want to link. Most of it was written from the spec in a few intense days in late August.

The interesting part wasn't speed. Two bugs in the deblocking filter pushed my output a little further from every real decoder with each frame, and every stream still played. I only caught them because every stream gets decoded by ffmpeg and VideoToolbox, not by anything I wrote.

The thing I'd tell anyone using it is to read the worst case before the median. On content where motion goes a different way in every part of the frame, the default preset takes 205 ms a frame at 1080p, against 27 ms on ordinary content. Set an effort cap.

It's on NuGet as Proxeno.Kiln, pre-release and Apache-2.0. The APIs will change.

  • Four slices buy about 2.2× on 1080p P-frames, not 4×. Eight buy nothing more.
  • Going from one slice to four costs 5% to 26% more bitrate, depending on content.