Work with H.264 image encoding

H.264 is a video encoding format that provides a reduction in the bandwidth required to stream video data compared to the other encoding formats available in the APIs.

PureWeb supports H.264 image encoding for your views to some extent:

  • The C++ and .Net service APIs on Windows support software-encoded UMC (the default) and x264 (must be licensed separately).
  • The C++ service API on Linux supports only software-encoded UMC.
  • H.264 decoding is supported in the HTML5 client only at this time.

Although H.264 support is feature-complete, it has not been fully optimized, and as such, it may not be ideal for production purposes.

This section explains how to work with H.264, if you do want to use this encoding in your application.

By using H.264 with PureWeb, you will be subject to other third party licenses such as the AVC/H.264 Patent Portfolio License with MPEG-LA. Calgary Scientific does not provide you with coverage for these licenses. It is your sole responsibility to obtain such licenses and ensure that you are in compliance with them.


Use H.264 on the service

If you use the built-in UMC software encoding, there are no particular steps to follow on the service. Simply set the encoding configuration on the client as discussed further down this page.

However, we recommend using the x264 encoding if you can, as it is more performant. To use x264, you will need to obtain the files that have been built for compatibility with the PureWeb API.

To acquire the x264 dll files for PureWeb, please contact

A commercial license agreement with CoreCodec Inc. is required for use of this library. By requesting this library, you agree that your contact information will be provided to CoreCodec solely for such licensing purposes and that it is your responsibility to acquire the license.

Note that the commercial license for x264 is in addition to any other third party licenses that you will be subject to for using H.264, such as the MPEG-LA AVC/H.264 Patent Portfolio License.

More details on x264 licensing can be found here.

Installing the x264 libraries

Once you have the x264 dll files:

  1. Copy the files into your service application's directory.
  2. Ensure that they are included when rebuilding and/or deploying your application, for example by adding them during a pre- or post-build step. The service will load the files at runtime.
  3. Restart the PureWeb server.

Verifying the settings

To confirm which encoding configuration is used in your service application, look for the encoder initialization message in the log. The message should contain either "UMCEncoder" or "x264Encoder":

H264Encoder UMCEncoder: Initialized

Use H.264 on the client

H.264 decoding is supported in the HTML5 client only at this time.

It works well in Chrome, Firefox and Edge. In other browsers, including Internet Explorer, Safari, Mobile Safari and Mobile Chrome, it does not perform well, or does not work at all.

  1. Ensure that your HTML5 client's .html file contains the following code at the bottom of the file. In some of the sample applications, this code is commented out, you would have to remove the comment marks:
    <script src="/lib/pureweb/pureweb.h264.min.js"></script>
  2. Change your client's encoding configuration to H.264, as described here. (If working with x264, this will load the applicable dll files at runtime).