Skip to content

Installation Guide

ReferenceType edited this page Mar 13, 2025 · 3 revisions

Installation Guide

Library Structure

image

  • The C++ H264SharpNative dll(or .so) acts as OpenH264 wrapper/facade and color format converter
  • H264Sharp.dll is .Net Standard 2.0 wrapper library for H264SharpNative and performs PInvoke to handle transcoding.
  • H264SharpNative library is resolved by DllImport attribute i.e. [DllImport(DllName, ...)]
  • Cisco dll (i.e.openh264-2.4.1-win64.dll) is resolved and loaded on runtime which uses LoadLibraryW on Windows, dlopen with RTLD_LAZY on Linux from the native side.

Installation Methods

NuGet

Install the NuGet package. All native dependencies should be automatically installed and resolved.

  • Tested on Windows, Linux, Linux ARM, Android MAUI app(x86 on emulator, Arm64 on Pixel phone).

H264Sharp
NuGet

H264SharpBitmapExtentions
NuGet

From Pre-built Binaries

  1. Download the latest release H264Sharp.dll and platform native dependencies you require from Relases.
  2. Reference H264Sharp.dll to your C# application
  3. Include the native dependencies of your target platform to executable output directory, or include on build for android.

For usage in Unity, You have to specify the absolute path for cisco openh264 dll. (i.e. StreamingAssets)

Defines.CiscoDllName64bit = "{YourPath}/openh264-2.4.1-win64.dll";
// Or
H264Encoder encoder = new H264Encoder("CiscoDllPath");
H264Decoder decoder = new H264Decoder("CiscoDllPath");
Clone this wiki locally