Tools: How to Compile Qt6/PyQt6 with Proprietary Codecs on Ubuntu for EAF Browser - Complete Guide
If you are using the Emacs Application Framework (EAF) to browse the web inside Emacs, you might have run into an annoying issue on Ubuntu: HTML5 videos (like YouTube or video streams) refuse to play, showing a blank screen or a decoding error. This happens because the EAF Browser relies on QtWebEngine. While distributions like Arch Linux compile Qt6 with proprietary codecs enabled by default, Ubuntu's upstream packages do not include them due to licensing philosophies. To fix this, you need to compile Qt6 manually with the -webengine-proprietary-codecs flag. Below is the surgical guide to building Qt 6.5.0 from source on Ubuntu to get your EAF terminal setup fully armed for video playback. (Shoutout to my friend smallevilbeast for mapping out this build process!) ⚠️ Note: Remember to replace /home/user in the scripts below with your actual home directory path. 1. Install Dependencies Building Qt from source can be a beast depending on your hardware. Did this configuration work smoothly on your Ubuntu setup, or did you hit a missing dependency snag? Drop a comment below if you ran into any issues, and let's get it sorted! Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse
$ -weight: 500;">pip -weight: 500;">install html5lib -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install build-essential
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install ninja-build
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install openssl libssl-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libmd4c-dev libmd4c-html0-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install pkg-config
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libglew-dev libglfw3-dev libglm-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libao-dev libmpg123-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libclang-14-dev flex
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install diffstat libassimp5 libavdevice-dev libavfilter-dev libcups2-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libdraco7 libevdev-dev libinput-dev libmtdev-dev -weight: 600;">sudo -weight: 500;">apt isntall libpostproc-dev libpulse-dev libwacom-dev lintian -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install lzip lzop patchutils pkg-kde-tools t1utils xvfb
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxshmfence-dev -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-keysyms1=0.4.0-1build3
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-* libx11*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-* libxcb*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxkbcommon-x11-dev
-weight: 500;">pip -weight: 500;">install html5lib -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install build-essential
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install ninja-build
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install openssl libssl-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libmd4c-dev libmd4c-html0-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install pkg-config
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libglew-dev libglfw3-dev libglm-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libao-dev libmpg123-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libclang-14-dev flex
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install diffstat libassimp5 libavdevice-dev libavfilter-dev libcups2-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libdraco7 libevdev-dev libinput-dev libmtdev-dev -weight: 600;">sudo -weight: 500;">apt isntall libpostproc-dev libpulse-dev libwacom-dev lintian -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install lzip lzop patchutils pkg-kde-tools t1utils xvfb
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxshmfence-dev -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-keysyms1=0.4.0-1build3
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-* libx11*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-* libxcb*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxkbcommon-x11-dev
-weight: 500;">pip -weight: 500;">install html5lib -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install build-essential
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install ninja-build
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install openssl libssl-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libmd4c-dev libmd4c-html0-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install pkg-config
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libglew-dev libglfw3-dev libglm-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libao-dev libmpg123-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libclang-14-dev flex
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install diffstat libassimp5 libavdevice-dev libavfilter-dev libcups2-dev
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libdraco7 libevdev-dev libinput-dev libmtdev-dev -weight: 600;">sudo -weight: 500;">apt isntall libpostproc-dev libpulse-dev libwacom-dev lintian -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install lzip lzop patchutils pkg-kde-tools t1utils xvfb
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxshmfence-dev -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-keysyms1=0.4.0-1build3
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libx11-* libx11*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxcb-* libxcb*
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install libxkbcommon-x11-dev
-weight: 500;">wget https://download.qt.io/archive/qt/6.5/6.5.0/single/qt-everywhere-src-6.5.0.tar.xz
tar xvf qt-everywhere-src-6.5.0.tar.xz
mv qt-everywhere-src-6.5.0 qt
mkdir qt-build
mkdir -p ~/qt/qt6.5.0
cd qt-build
../qt/configure -webengine-proprietary-codecs -webengine-printing-and-pdf -webengine-pepper-plugins -xcb -prefix /home/user/qt/qt6.5.0
cmake --build . --parallel 32
cmake ---weight: 500;">install .
-weight: 500;">wget https://download.qt.io/archive/qt/6.5/6.5.0/single/qt-everywhere-src-6.5.0.tar.xz
tar xvf qt-everywhere-src-6.5.0.tar.xz
mv qt-everywhere-src-6.5.0 qt
mkdir qt-build
mkdir -p ~/qt/qt6.5.0
cd qt-build
../qt/configure -webengine-proprietary-codecs -webengine-printing-and-pdf -webengine-pepper-plugins -xcb -prefix /home/user/qt/qt6.5.0
cmake --build . --parallel 32
cmake ---weight: 500;">install .
-weight: 500;">wget https://download.qt.io/archive/qt/6.5/6.5.0/single/qt-everywhere-src-6.5.0.tar.xz
tar xvf qt-everywhere-src-6.5.0.tar.xz
mv qt-everywhere-src-6.5.0 qt
mkdir qt-build
mkdir -p ~/qt/qt6.5.0
cd qt-build
../qt/configure -webengine-proprietary-codecs -webengine-printing-and-pdf -webengine-pepper-plugins -xcb -prefix /home/user/qt/qt6.5.0
cmake --build . --parallel 32
cmake ---weight: 500;">install .
ln -s /home/user/qt/qt6.5.0 /home/user/emacs_venv/lib/python3.11/site-packages/PyQt6/Qt6
ln -s /home/user/qt/qt6.5.0 /home/user/emacs_venv/lib/python3.11/site-packages/PyQt6/Qt6
ln -s /home/user/qt/qt6.5.0 /home/user/emacs_venv/lib/python3.11/site-packages/PyQt6/Qt6