Comments (6)
原因是, EAF Browser是基于PyQt, PyQt里面用的是 QtWebEngine, QtWebEngine 是基于 chromium 内核, Qt默认是没有添加视频编码器支持的。
解决方案就是先编译Qt, 再用Qt编译好的 qmake 编译PyQt, 编译Qt的时候需要给 configure 命令传递 -webengine-proprietary-codecs
参数才行, 参考链接:
https://www.reddit.com/r/qutebrowser/comments/np12t3/build_with_codecs_how_to/
https://doc.qt.io/qt-6/qtwebengine-features.html
https://wiki.qt.io/Building_Qt_5_from_Git
https://gist.github.com/Fedott/597ed343b6596e7ee01d
https://gist.github.com/Francesco149/b46b68aa928f4fda279792554bb4ccaf
https://www.jianshu.com/p/2a42d11a2987
https://ilmvfx.wordpress.com/2022/02/22/maya2020-pyside2-qwebengine-propreitary-codecs-mp4-ogv/
因为最近比较忙, 编译 QtWebEngine 非常耗费时间, 你可以根据上面链接, 先自己折腾一下, 编译完成以后就可以播放所有视频了。
from eaf-browser.
下面是 ChatGPT 的一些回答, 针对 ArchLinux, 你可以参考一下。
1. 安装依赖
在Arch Linux上,你可以使用以下命令来安装依赖:
sudo pacman -Syu
sudo pacman -S base-devel
sudo pacman -S openssl python python-pip
以上命令将更新你的系统,安装基本开发工具和其他必需的软件包。
2. 下载并解压Qt源代码
从Qt的官方网站下载源代码,然后将其解压到一个目录,例如 ~/qt6:
wget https://download.qt.io/archive/qt/6.5/6.5.0/single/qt-everywhere-src-6.5.0.tar.xz
tar xf qt-everywhere-src-6.5.0.tar.xz -C ~/
mv ~/qt-everywhere-src-6.5.0 ~/qt6
3. 配置和编译Qt
进入Qt的源代码目录并进行配置。在这个步骤中,你可以添加-webengine-proprietary-codecs参数来启用专有的编解码器。
cd ~/qt6
./configure -opensource -confirm-license -webengine-proprietary-codecs
然后开始编译Qt。这可能需要一段时间,具体取决于你的系统性能。
make -j$(nproc)
4. 安装Qt
编译完成后,你可以安装Qt。这将把Qt的库和工具(如qmake)安装到默认的安装路径。
sudo make install
5. 编译PyQt
最后,你可以使用新安装的Qt编译PyQt。首先,你需要下载PyQt的源代码。
wget https://www.riverbankcomputing.com/static/Downloads/PyQt6/6.5.0/PyQt6-6.5.0.tar.gz
tar xzf PyQt6-6.5.0.tar.gz
cd PyQt6-6.5.0
然后,你需要安装PyQt的依赖,sip。在PyQt6中,sip被替换为pyqt-builder和pyqt-sip。你可以使用pip来安装这两个包:
pip install pyqt-builder pyqt6-sip
然后运行configure.py脚本,使用--qmake参数指定新编译的qmake的路径:
python configure.py --qmake ~/qt6/qtbase/bin/qmake
然后你可以像之前一样编译和安装PyQt:
make -j$(nproc)
sudo make install
from eaf-browser.
你是什么操作系统?
from eaf-browser.
是Ubuntu22.04
from eaf-browser.
给 EAF 打了一个补丁, EAF 在 Arch 下会自动用 pacman 安装 PyQt 来解决 EAF Browser 无法看 B 站视频的问题。 其他 Linux 发行版要确保 Qt 编译参数里面有 -webengine-proprietary-codecs
, 同时保证软件仓库里的 PyQt 和 Qt 版本是匹配的。
当然, 如果你用的 Linux 发行版不支持这些, 最简单的方法就是换 Arch Linux 吧。 ;)
from eaf-browser.
默认是 PyQt 不支持HTML5 视频, 需要各OS通过修改编译参数来解决(因为开发者编译 Qt 也无法分发, 用户自己编译太费劲)。
目前最好的方法就是换 ArchLinux。
from eaf-browser.
Related Issues (20)
- How to modify keybind in eaf-browser-caret-mode-keybinding
- 已经安装 youtube-dl,还是出现提示 Please install youtube-dl to use this feature. HOT 11
- multi-session browser
- adblock
- braveblock does not support apple m1/m2 HOT 2
- eaf-browser adblock: easylist.txt UnicodeDecodeError HOT 1
- 看不了优酷视频 HOT 7
- overflow HOT 6
- 无法登录google HOT 1
- [wishlist] save current web page to a file ? HOT 2
- [leetcode.cn] Ooops, page crashed HOT 1
- 用 J/K 翻页的时候会触发 zoom HOT 2
- 建议open_link的时候能根据历史访问记录模糊搜索 HOT 1
- 没有记录网页的登录状态 HOT 1
- EAF Browser Crash on macos HOT 3
- eaf-browser bilibili HOT 1
- Adding support for firefox/chrome addons HOT 1
- 部分正则表达式在 python 3.12 中出现错误 HOT 1
- bookmark doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eaf-browser.