The most recent MainConcept Codec SDK 16.0 release introduces many new features and improvements, such as acceleration of components, support for new coding tools, advanced GPU support and more. One of the major enhancements presented in this release is a reworked API for the most popular components. These changes further advance our Easy Video API (EVA), and form part of our continued approach to simplifying how APIs work across codecs.
At the most basic level, MainConcept EVA simplifies the integration of SDK components into customer projects. MainConcept’s customers span the industry gamut. For each of them, lowering integration costs is a significant goal. In this article we discuss the details and improvements of the new API, and how it has already proved to be helpful for both new and existing customers.
EVA is a new approach in the MainConcept Codec SDK, allowing access to hardware and software codecs through a single, unified API.
EVA combines MainConcept's industry-leading software encoding, decoding and processing technologies with the high performance of today's GPU hardware processing powered by AMD, Intel, NVIDIA and Qualcomm. A single API in each library provides support for all major GPU vendors plus MainConcept's software codec technology.
These hardware codecs have different feature sets while MainConcept's software codecs offer even more flexibility to tweak streams. Since just one API is used for integration in a customer solution instead of up to five, EVA can reduce implementation time and costs by up to 80%.
Codec | Software | NVIDIA | Intel | AMD | Qualcomm |
AVC/H.264 Video Encoder | |||||
AVC/H.264 Video Decoder | |||||
HEVC/H.265 Video Encoder | |||||
HEVC/H.265 Video Decoder | |||||
AV1 Video Encoder | |||||
JPEG XS Video Encoder | |||||
JPEG XS Video Decoder | |||||
Universal Colorspace Converter |
Table 1. Support of different codecs in each mode
With EVA, the configuration of the component, regardless of whether for GPU or CPU encoding, is carried out through a single component's API calls, allowing customers to simply switch to different modes via their code. This means that instead of supporting multiple codecs, writing different code for each codec implementation and linking different libraries, the customer only needs to implement a general pipeline once. EVA is also very useful for end users: a configured pipeline is flexible and easy to switch to between modes, according to the hardware installed on the user device.
EVA also allows you to share the hardware context across multiple components (for example, between a decoder and an encoder). This allows components to share data buffers without needing to move them to the RAM, which significantly improves performance. To achieve this, the components were switched to use a unified frame data structure. In addition to enhancing performance, this also greatly simplifies the client's API integration costs by allowing direct data transfer between components, which is especially important for video transcoding scenarios.
Using unified code to access different hardware and software implementations in one codec can greatly decrease the cost of integration. Furthermore, in the Codec SDK 16.0 release, it's possible to share the same code not only for different codec implementations, but for multiple codecs at once.
In addition to EVA, there is a major improvement to MainConcept API components: a unified API for the AVC, HEVC and VVC encoders. These codecs now have similar API calls. For multi-codec projects, this is a significant enhancement. Think about it this way, if one of the encoders is supported on the customer side, then the others can also be easily integrated in the same way. For projects targeting a single codec, this is also helpful. In addition to a simple and straight-forward API, if a customer wants to switch to another codec (for example, from AVC to HEVC), this can easily be accomplished.
The most noticeable changes are in the AVC encoder. Its API was updated and improved to provide clearer and simpler access to library functionality. Also, the AVC video encoder no longer needs a separate library for configuration files and for reading/applying settings. All functionality is now built into the encoder library itself, as is already the case for the HEVC and VVC encoders.
There are also numerous quality-of-life changes to the API, including:
These changes help to integrate codecs with minimum effort. Furthermore, if a customer uses multiple components, the same API call signatures and their behaviors also allow the creation of code for one codec, which can be reused for other codecs. Together with EVA, this constitutes an incredibly low-cost integration of the Codec SDK into various products.
Switching to a new API can be challenging and contain hidden risks. In the case of code on the customer's side, the risks are small as the compiler/interpreter will alert on issues in code. However, many customers use configuration files with encoder settings. Such files can be easily forgotten when migrating, such issues can be easily avoided by employing IDE (Integrated Development Environment). For this reason, settings names remain the same (except for a few mandatory changes) to simplify the migration process, so old configuration files can be used with the new release.
Changes in the API are always associated with difficulties for clients who use an older SDK version. With such complex changes, difficulties will inevitably arise during implementation.
To compensate for the difficulties in switching to a new API, we created a migration guide. This guide provides detailed instructions on how to switch from the old API to the new one in a simple and understandable manner. It contains a list of changes in the API, code examples, and a step-by-step plan on how to update client code to support a newer version of the SDK. The guide also compares old code with new code and points out the differences in clear and visual ways, helping the customers to migrate without problems.
In addition to this guide, Codec SDK contains many samples, which demonstrate various use cases. Also, for EVA, a new transcoding sample was developed which demonstrates how straightforward support for different GPU and CPU encoding is within an all-in-one API. It also provides an example of a simple connection between a decoder and encoder in code.
All MainConcept codecs are available as a free trial and include 60 days of email support. Going a step further, our professional services team has decades of experience and may be the perfect fit for evaluating how EVA and our unified API can streamline your processes.