-
-
Notifications
You must be signed in to change notification settings - Fork 249
libcamera Chromium support (deprecated)
This content is archived. The Chromium support has not progressed in some time, and much of the community are using a v4l2-loopback solution, which is effective until we get wider application support built in.
Built in support is more likely to come through pipewire video integration into browsers.
Chromium integration is being developed, and a development tree is available at: https://github.com/libcamera-org/chromium/ This is not yet available in a packaged form, and requires building Chromium from source. This is no small undertaking, community support in packaging this for a binary release is welcome.
Building chromium is documented at https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md
The steps are replicated here to demonstrate all commands required to build on a clean ubuntu-20.04 based build system, specifically building the required branch for libcamera integration.
This will require approximately 50 GB of free disk space, and may be expected to take between 4-8 hours or more to complete depending on your system.
Obtain the sources:
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH="$PATH:${HOME}/depot_tools"
$ mkdir ~/chromium && cd ~/chromium
$ fetch --nohooks chromium
$ cd src
Make sure we have all dependencies:
$ sudo apt upgrade -y
$ sudo apt install gnome-keyring libva-dev libdri2-dev mesa-common-dev \
python python2.7 libx11-xcb-dev
$ sudo ./build/install-build-deps.sh --unsupported
$ gclient runhooks
Use the custom Surface Chromium Branch:
$ git remote add github https://github.com/libcamera-org/chromium.git
$ git fetch github
$ git checkout -b surface github/surface
$ gclient sync -D
Build:
$ gn gen out/Default \
--args="is_debug=false is_component_build=true symbol_level=0 \
enable_nacl=false blink_symbol_level=0 use_gold=false \
use_sysroot=false is_clang=true clang_use_chrome_plugins=false \
use_lld=false is_clang=true use_custom_libcxx=true \
libcxx_abi_unstable=false use_gnome_keyring=false \
use_libcamera=true"
$ autoninja -C out/Default chrome
And then we can run and test:
$ out/Default/chrome
- Home
- Installation and Setup
-
Supported Devices and Features
- Surface Book 1
- Surface Book 2
- Surface Book 3
- Surface Laptop Studio
- Surface Laptop Studio 2
- Surface Laptop 1
- Surface Laptop 2
- Surface Laptop 3
- Surface Laptop 4
- Surface Laptop 5
- Surface Laptop 6
- Surface Laptop Go 1
- Surface Laptop Go 2
- Surface Laptop Go 3
- Surface Laptop SE
- Surface Go 1
- Surface Go 2
- Surface Go 3
- Surface Go 4
- Surface 3
- Surface Pro 1
- Surface Pro 2
- Surface Pro 3
- Surface Pro 4
- Surface Pro 5
- Surface Pro 6
- Surface Pro 7
- Surface Pro 7+
- Surface Pro 8
- Surface Pro 9 (Intel)
- Surface Pro 10
- Surface Studio 1
- Surface Studio 2
- Surface Studio 2+
- Surface Dock
- Device Independent Information
- Known Issues / FAQ
- Links and Associated Projects
- Testers and Contributing