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
pip install html5lib
sudo apt install build-essential
sudo apt install libx11-dev
sudo apt install ninja-build
sudo apt install openssl libssl-dev
sudo apt install libmd4c-dev libmd4c-html0-dev
sudo apt install pkg-config
sudo apt install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt install libglew-dev libglfw3-dev libglm-dev
sudo apt install libao-dev libmpg123-dev
sudo apt install libclang-14-dev flex
sudo apt install diffstat libassimp5 libavdevice-dev libavfilter-dev libcups2-dev
sudo apt install libdraco7 libevdev-dev libinput-dev libmtdev-dev
sudo apt isntall libpostproc-dev libpulse-dev libwacom-dev lintian
sudo apt install lzip lzop patchutils pkg-kde-tools t1utils xvfb
sudo apt install libxshmfence-dev
sudo apt install libxcb-keysyms1=0.4.0-1build3
sudo apt install libx11-* libx11*
sudo apt install libxcb-* libxcb*
sudo apt install libxkbcommon-x11-dev
2.Compile
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 --install .
3.Replace PyQt6-Qt6
ln -s /home/user/qt/qt6.5.0 /home/user/emacs_venv/lib/python3.11/site-packages/PyQt6/Qt6
Let's Chat
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!
Happy hacking! 🚀
Top comments (0)