LCEVC in Chromium
This section describes the V-Nova LCEVC integration into Chromium.
Note: The Chromium build integrated with V-Nova LCEVC is a fork from the Chromium open source project. The integration is currently still in beta and is not aligned with all versions of the main project. Please contact us for more details if you are interested in deploying with your solution.
Chromium is a Google-maintained open-source browser project. LCEVC Chromium is a derived work by V-Nova Ltd, that adds support for playing back streams enhanced with MPEG-5 Part 2 LCEVC using HTML5 video elements, Media Source Extension or Encrypted Media Extensions.
Media playback in Chromium encompasses a large array of technologies, so by necessity, this will provide only a brief outline. Inside the Chromium source media/ directory resides the components for media demuxing, software and hardware video decode, audio output, as well as audio and video rendering. (source)
Specifically, under the playback heading, media/ contains the implementations of components required for HTML media elements and extensions:
The following diagram provides a simplified overview of the media playback pipeline and where LCEVC is integrated.
Chromium architecture with LCEVC
As seen in the previous figure, the LCEVC integration point receives the encoded image frame (plus the enhancement data) after being demuxed by the FFmpeg demuxer (HTML video element pipeline), chunk demuxer (Media Source Extensions pipeline), and from CDM in the Encrypted Media Extensions pipeline.
The following figure shows the design of the unmodified versus LCEVC integrated video pipeline which can be applied to Chromium in the DemuxerStream object.
Unmodified versus LCEVC-enhanced decoding pipelines in Chromium
The V-Nova LCEVC Chromium integration adds support for;
- LCEVC H264 in an MP4 container
- LCEVC VP8 & VP9 in a WEBM container
- DRM Protected Content
The V-Nova LCEVC Chromium integration affects the media module in the following manner:
- media/filters/DecoderStream: Receives the encoded data and returns the decoded frame. Modified to pass LCEVC enhancement data to the LCEVC Decoder Integration Layer (DIL) and to use the DIL to generate the final video frame.
- media/lcevc/LcevcDecoderContext: handles DIL component integration.
This integration is a fork from the Chromium open source project. The solution provides a way to dynamically load the LCEVC libraries. These libraries should be available in the following manner:
- Windows: the DLLs must be located in the executable directory or available through the PATH environment path
- Linux: Add the .so files location to the LD_LIBRARY_PATH environment variable.
This integration detects the input format and adds the enhancement to every video played using the Chromium video pipeline, so no other modification is needed.
In Windows, Chromium requires Visual Studio 2017 (>=15.7.2) to build, but VS2019 (>=16.0.0) is preferred and Windows SDK debug tools. Visual Studio can also be used to debug Chromium, and VS2019 is preferred for this as it handles Chromium's large debug information much better. The clang-cl compiler is used but Visual Studio's header files, libraries, and some tools are required. Visual Studio Community Edition should work if its license is appropriate for you. You must install the "Desktop development with C++" component and the "MFC/ATL support" sub-components.
Full details of build prerequisites and instructions for Windows and Linux can be are provided by Chromium project here:
You can then continue preparing your environment by installing the depot_tools. These are tools for working with Chromium development.
The code for the Chromium project can be retrieved by using the fetch tool from depot_tools, as described in
- https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md#Get-the-code or
Once the repository has been fetched, go into the Chromium git repository (in the
srcsub-directory), add the LCEVC-Chromium git repository as a remote, fetch and checkout its
mainbranch, then sync the dependencies by using the following command:
gclient sync -D --force --reset --with_branch_heads
The binary libraries from the LCEVC SDK should then be copied to
media/lcevc_dependencies, and the header files to
You can create any number of build directories with different configurations. To create a build directory:
gn gen out/Default
- You only have to run this once for each new build directory.
- You can replace Default with another name, but it should be a subdirectory of out.
In order to include support for H264, you need to enable proprietary codecs. Also, to enable DRM and EME (Encrypted Media Extensions) with Widevine you need to add the following lines in the out/Default/args.gn file
# Set build arguments here. See `gn help buildargs`.
ffmpeg_branding = "Chrome"
proprietary_codecs = true
enable_widevine = true
When building for Production, you should disable DCHECK as it stops Chromium execution when some validations are not met. This DCHECK is usually disabled in release distributions.
To disable DCHECK and create a Release build you should add the following lines in the out/Default/args.gn
is_debug = false
dcheck_always_on = false
In order to use the V-Nova DLLs, you need to add this folder to the system path or copy all the DLLs to the chromium/src/out/Default folder.
In order to use the V-Nova .so files, you need to add this folder to the /usr/lib folder or add the dependency folder to the LD_INCLUDE_PATH.
To build chromium, run the following command:
autoninja -C out/Default chrome
or, to produce installer packages:
autoninja -C out/Default chrome/installer/mini_installer
for Windows, or
autoninja -C out/Default chrome/installer/linux:unstable.deb
for Debian-like Linux systems etc.
- Windows 10
- Linux: Ubuntu 18.04, Ubuntu 20.04, Debian 10, Debian 11