OS X Chromium with proprietary codecs
Preface
Chromium is an open-source web browser project that provides the source code for the proprietary Google Chrome browser. Taking into consideration some privacy issues (for example it does not contain RLZ identifier), Chromium might be an interesting alternative to Google Chrome web browser.
Here's a link to Wikipedia's comparison between Google Chrome and Chromium web browsers.
Why this How-to?
There are several places on the Internet where we can download Chromium build. Unfortunately, due to some licensing issues, those builds does not/can not contain several important audio-video codecs Google Chrome has. That makes those builds rather useless. But there's a good news too. Licensing allows to compile our own build of Chromium with those codecs. The only obstacle is that finding any information on how to do that successfully is rather difficult task.
This document shows how to compile OS X Chromium with all proprietary codecs.
Before we start
Read Google's instruction called Checking out and building Chromium for Mac. It describes all of the main steps necessary to make a Chromium build.
Below I will show you how to modify those steps to incorporate proprietary codecs to our build.
Building Chromium with proprietary codecs
-
Ensure that unicode filenames aren't mangled by HFS and clone the depot_tools repository:
git config --global core.precomposeUnicode true git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
-
Add depot_tools to the end of your PATH:
export PATH="$PATH:`pwd`/depot_tools"
-
Create a chromium working directory:
mkdir chromium && cd chromium
-
Fetch the code and its dependencies (this should take approx. 20-30 minutes).
fetch --no-history chromium
-
Go to src directory
cd src
-
Create a build directory with all necessary arguments:
gn args out/Default
This will open a default text editor. Now comes the important part. Type in the following arguments:
proprietary_codecs = true is_debug = false ffmpeg_branding = "Chrome"
Save and exit the file. This will generate
./out/Default/args.gn
file.Alternatively we may want to list all of available arguments first:
gn gen out/Default gn args out/Default --list
The complete list of gn arguments (as of 8 July 2018) is here
-
Build Chromium
ninja -C out/Default chrome
Once it is built, our
Chromium.app
is in a./out/Default/
directory. We can move it to/Applications
folder
Useful links
https://chromium.woolyss.com - one of the best sources of information regarding Chromium