linux arm64 Qt6/PySide6 WebEngine 支持 webrtc -h264 编译参考

hellozp 2024-08-05 16:33:01 阅读 52

背景

客户端程序,需要运行在国产化机器上,程序里有web模块,并且需要播放webrtc的视频

使用的qt6开发,默认的浏览器插件qtwebengine是不支持webrtc,需要自己手动编译源码

编译版本

QT 6.7.1

成果

运行环境

银河麒麟V10  aarch64 

参考文档

Supported Platforms | Qt 6.7

 Qt WebEngine Platform Notes | Qt WebEngine 6.7.1

Ubuntu 20.04 环境下编译 qtwebengine 6.4.0 以支撑MP4解码 - 简书 (jianshu.com)

can't build webengine on linux arm64, error msg: Error: selected processor does not support `xpaclri | Qt Forum

总结需要安装库:

 apt install bison build-essential clang flex gperf 

 apt install libatspi2.0-dev libbluetooth-dev libclang-dev libcups2-dev libdrm-dev 

 apt install libegl1-mesa-dev libfontconfig1-dev libfreetype6-dev 

 apt install libgstreamer1.0-dev libhunspell-dev libnss3-dev libopengl-dev 

 apt install libpulse-dev libssl-dev libts-dev libx11-dev libx11-xcb-dev 

 apt install libxcb-glx0-dev libxcb-icccm4-dev libxcb-image0-dev 

 apt install libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev 

 apt install libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-util-dev 

 apt install libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb1-dev 

 apt install libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev 

 apt install libxfixes-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev 

 apt install libxkbfile-dev libxrandr-dev libxrender-dev libxshmfence-dev 。、

 apt install libxshmfence1 llvm ninja-build 

 apt install  python-is-python3 python3

 apt install libdbus-1-dev 

 apt install ffmpeg 

 apt install libasound2-dev libbz2-dev libcap-dev libpci-dev libudev-dev libxtst-dev libxss-dev 

 apt install libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev libavutil-dev

 apt install libavformat-dev libavcodec-dev libevent-dev

需要pip安装html5lib

Python3 install pip

pip install html5lib

注意:

严格参考官方文档的支持环境可行性!!!

1、不支持静态编译

2、Linux 6.7版本以后才支持arm64,并且需要在Debian系统下。

3、GCC10+,CMake20+,nodejs20+  ,这些看系统升级的版本,达不到需要源码编译安装

注意nodejs源码编译安装会很耗时,10个小时以上

debain升级后的GCC 10.2.1可以用,不用升级

4、只要不报错,继续执行就可以。顺利的话大概需要8个小时以上

5、WARNING: System GBM is disabled. The bundled minigbm supports Intel only, you might need to install libgbm to avoid rendering issues.

需要安装 apt-install libgbm-dev

6、WARNING: SensorFW support currently not enabled with cmake

暂时没管

备注

编译完后目录如下:

把整个目录覆盖到QT目录下即可

编译好的资源下载:

linuxarm64Qt6/PySide6WebEngine支持webrtc-h264资源-CSDN文库

补充支持的属性:  (红色为关键项)

Building for: linux-g++ (arm64, CPU features: cx16 neon)

Compiler: gcc 12.1.0

Build options:

  Mode ................................... release

  Optimize release build for size ........ no

  Fully optimize release builds (-O3) .... no

  Building shared libraries .............. yes

  Using ccache ........................... no

  Unity Build ............................ no

  Using new DTAGS ........................ yes

  Relocatable ............................ yes

  Using precompiled headers .............. yes

  Using Link Time Optimization (LTCG) .... no

  Using Intel CET ........................ no

  Target compiler supports:

    ARM Extensions ....................... NEON

  Sanitizers:

    Addresses ............................ no

    Threads .............................. no

    Memory ............................... no

    Fuzzer (instrumentation only) ........ no

    Undefined ............................ no

  Build parts ............................ libs tools

  Install examples sources ............... no

Qt modules and options:

  Qt Concurrent .......................... yes

  Qt D-Bus ............................... yes

  Qt D-Bus directly linked to libdbus .... yes

  Qt Gui ................................. yes

  Qt Network ............................. yes

  Qt PrintSupport ........................ yes

  Qt Sql ................................. yes

  Qt Testlib ............................. yes

  Qt Widgets ............................. yes

  Qt Xml ................................. yes

Support enabled for:

  Using pkg-config ....................... yes

  Using vcpkg ............................ no

  udev ................................... yes

  OpenSSL ................................ yes

    Qt directly linked to OpenSSL ........ no

  OpenSSL 1.1 ............................ yes

  OpenSSL 3.0 ............................ no

  Using system zlib ...................... yes

  Zstandard support ...................... no

  Thread support ......................... yes

Common build options:

  Linker can resolve circular dependencies  no

  CMake policy CMP0099 is supported ...... yes

Qt Core:

  backtrace .............................. yes

  DoubleConversion ....................... yes

    Using system DoubleConversion ........ no

  CLONE_PIDFD support in forkfd .......... yes

  GLib ................................... yes

  ICU .................................... no

  Using system libb2 ..................... no

  Built-in copy of the MIME database ..... yes

  Application permissions ................ yes

  Defaulting legacy IPC to POSIX ......... no

  Tracing backend ........................ <none>

  OpenSSL based cryptographic hash ....... no

  Logging backends:

    journald ............................. no

    syslog ............................... no

    slog2 ................................ no

  PCRE2 .................................. yes

    Using system PCRE2 ................... yes

Qt Sql:

  SQL item models ........................ yes

Qt Network:

  getifaddrs() ........................... no

  IPv6 ifname ............................ no

  libproxy ............................... no

  Linux AF_NETLINK ....................... yes

  DTLS ................................... yes

  OCSP-stapling .......................... yes

  SCTP ................................... no

  Use system proxies ..................... yes

  GSSAPI ................................. no

  Brotli Decompression Support ........... yes

  qIsEffectiveTLD() ...................... yes

    Built-in publicsuffix database ....... yes

    System publicsuffix database ......... yes

Core tools:

  Android deployment tool ................ yes

  macOS deployment tool .................. no

  Windows deployment tool ................ no

  qmake .................................. yes

Qt Gui:

  Accessibility .......................... yes

  FreeType ............................... yes

    Using system FreeType ................ yes

  HarfBuzz ............................... yes

    Using system HarfBuzz ................ no

  Fontconfig ............................. yes

  Image formats:

    GIF .................................. yes

    ICO .................................. yes

    JPEG ................................. yes

      Using system libjpeg ............... yes

    PNG .................................. yes

      Using system libpng ................ yes

  Text formats:

    HtmlParser ........................... yes

    CssParser ............................ yes

    OdfWriter ............................ yes

    MarkdownReader ....................... yes

      Using system libmd4c ............... no

    MarkdownWriter ....................... yes

  EGL .................................... yes

  OpenVG ................................. no

  OpenGL:

    Desktop OpenGL ....................... yes

    OpenGL ES 2.0 ........................ no

    OpenGL ES 3.0 ........................ no

    OpenGL ES 3.1 ........................ no

    OpenGL ES 3.2 ........................ no

  Vulkan ................................. no

  Session Management ..................... yes

Features used by QPA backends:

  evdev .................................. yes

  libinput ............................... no

  HiRes wheel support in libinput ........ no

  INTEGRITY HID .......................... no

  mtdev .................................. no

  tslib .................................. yes

  xkbcommon .............................. yes

  X11 specific:

    XLib ................................. yes

    XCB Xlib ............................. yes

    EGL on X11 ........................... yes

    xkbcommon-x11 ........................ yes

    xcb-sm ............................... no

QPA backends:

  DirectFB ............................... no

  EGLFS .................................. yes

  EGLFS details:

    EGLFS OpenWFD ........................ no

    EGLFS i.Mx6 .......................... no

    EGLFS i.Mx6 Wayland .................. no

    EGLFS RCAR ........................... no

    EGLFS EGLDevice ...................... yes

    EGLFS GBM ............................ no

    EGLFS VSP2 ........................... no

    EGLFS Mali ........................... no

    EGLFS Raspberry Pi ................... no

    EGLFS X11 ............................ yes

  LinuxFB ................................ yes

  VNC .................................... yes

  VK_KHR_display ......................... no

  QNX:

    lgmon ................................ no

    IMF .................................. no

  XCB:

    Using system-provided xcb-xinput ..... no

    GL integrations:

      GLX Plugin ......................... no

        XCB GLX .......................... no

      EGL-X11 Plugin ..................... no

  Windows:

    Direct 2D ............................ no

    Direct 2D 1.1 ........................ no

    DirectWrite .......................... no

    DirectWrite 3 ........................ no

Qt Widgets:

  GTK+ ................................... no

  Styles ................................. Fusion Windows

Qt Testlib:

  Tester for item models ................. yes

  Batch tests ............................ no

Qt PrintSupport:

  CUPS ................................... yes

Qt Sql Drivers:

  DB2 (IBM) .............................. no

  InterBase .............................. no

  MySql .................................. no

  OCI (Oracle) ........................... no

  ODBC ................................... no

  PostgreSQL ............................. no

  SQLite ................................. yes

    Using system provided SQLite ......... no

  Mimer .................................. no

Further Image Formats:

  JasPer ................................. no

  MNG .................................... no

  TIFF ................................... yes

    Using system libtiff ................. yes

  WEBP ................................... yes

    Using system libwebp ................. yes

Qt QML:

  QML network support .................... yes

  QML debugging and profiling support .... yes

  QML just-in-time compiler .............. yes

  QML XML http request ................... yes

  QML Locale ............................. yes

  QML SSL support ........................ yes

Qt QML:

  QML network support .................... yes

  QML debugging and profiling support .... yes

  QML just-in-time compiler .............. yes

  QML XML http request ................... yes

  QML Locale ............................. yes

  QML SSL support ........................ yes

Qt QML Models:

  QML list model ......................... yes

  QML delegate model ..................... yes

Qt Quick:

  AnimatedImage item ..................... yes

  Canvas item ............................ yes

  Support for Qt Quick Designer .......... yes

  Flipable item .......................... yes

  GridView item .......................... yes

  ListView item .......................... yes

  TableView item ......................... yes

  TreeView item .......................... yes

  Path support ........................... yes

  PathView item .......................... yes

  Positioner items ....................... yes

  Repeater item .......................... yes

  ShaderEffect item ...................... yes

  Sprite item ............................ yes

Qt Quick Templates 2:

  Hover support .......................... yes

  Multi-touch support .................... yes

  Calendar support ....................... yes

Qt Quick Controls 2:

  Styles ................................. Basic Fusion Imagine Material Universal

QtQuick3D:

  Assimp ................................. yes

  System Assimp .......................... no

Qt Multimedia:

  Spatial Audio .......................... yes

  Spatial Audio (Quick3D) ................ yes

  Low level Audio Backend:

    ALSA (experimental) .................. no

    PulseAudio ........................... yes

    MMRenderer ........................... no

    CoreAudio ............................ no

    Windows Media SDK .................... no

    Open SLES (Android) .................. no

    Web Assembly ......................... no

  Plugin:

    GStreamer 1.0 ........................ no

    FFmpeg ............................... no

    MMRenderer ........................... no

    AVFoundation ......................... no

    Windows Media Foundation ............. no

  Hardware acceleration and features:

    Video for Linux ...................... yes

    VAAPI support ........................ no

    Linux DMA buffer support ............. yes

    VideoToolbox ......................... no

Qt 3D:

  Assimp ................................. yes

  System Assimp .......................... no

  Aspects:

    Render aspect ........................ yes

    Input aspect ......................... yes

    Logic aspect ......................... yes

    Animation aspect ..................... yes

    Extras aspect ........................ yes

Qt 3D APIs:

  Vulkan ................................. no

Qt 3D Renderers:

  OpenGL Renderer ........................ yes

  RHI Renderer ........................... yes

Qt3D Geometry Loaders:

  Autodesk FBX ........................... no

Qt 5 Compatibility Libraries:

  iconv .................................. yes

Qt Charts Types:

  Area Chart ............................. yes

  Line Chart ............................. yes

  Spline Chart ........................... yes

  Scatter Chart .......................... yes

  Bar Chart .............................. yes

  Pie Chart .............................. yes

  Boxplot Chart .......................... yes

  Candlestick Chart ...................... yes

Qt Axis Types:

  DateTime Axis .......................... yes

Qt Bluetooth:

  BlueZ .................................. yes

  BlueZ Low Energy ....................... yes

  Linux Crypto API ....................... yes

  WinRT Bluetooth API .................... no

Qt Graphs Support:

  2D Graphs .............................. yes

  3D Graphs .............................. yes

Qt Graphs 3D:

  Bars3D ................................. yes

  Scatter3D .............................. yes

  Surface3D .............................. yes

Serial Port:

  ntddmodm ............................... no

Qt Tools:

  Qt Assistant ........................... yes

  libclang found ......................... yes

  Clang-based lupdate parser ............. yes

  Qt Designer ............................ yes

  Qt Distance Field Generator ............ yes

  Qt Linguist ............................ yes

  pixeltool .............................. yes

  qdbus .................................. yes

  QDoc ................................... no

  Qt Attributions Scanner ................ yes

  qtdiag ................................. yes

  qtplugininfo ........................... yes

WebEngine Repository Build Options:

  Build Ninja ............................ no

  Build Gn ............................... yes

  Jumbo Build ............................ yes

  Developer build ........................ no

  Build QtWebEngine Modules:

    Build QtWebEngineCore ................ yes

    Build QtWebEngineWidgets ............. yes

    Build QtWebEngineQuick ............... yes

  Build QtPdf Modules:

    Build QtPdfWidgets ................... yes

    Build QtPdfQuick ..................... yes

  Optional system libraries:

    re2 .................................. no

    icu .................................. no

    libwebp, libwebpmux and libwebpdemux . yes

    opus ................................. yes

    ffmpeg ............................... no

    libvpx ............................... no

    snappy ............................... no

    glib ................................. yes

    zlib ................................. yes

    minizip .............................. yes

    libevent ............................. yes

    libxml2 and libxslt .................. no

    lcms2 ................................ no

    png .................................. yes

    tiff ................................. yes

    jpeg ................................. yes

    libopenjpeg2 ......................... no

    harfbuzz ............................. no

    freetype ............................. yes

    libpci ............................... yes

Qt WebEngineCore:

  Embedded build ......................... no

  Full debug information ................. no

  Sanitizer support ...................... no

  Pepper Plugins ......................... yes

  Printing and PDF ....................... yes

  Proprietary Codecs ..................... yes

  Spellchecker ........................... yes

  WebRTC ................................. yes

  PipeWire over GIO ...................... no

  Geolocation ............................ yes

  WebChannel support ..................... yes

  Kerberos Authentication ................ no

  Extensions ............................. yes

  Support GLX on qpa-xcb ................. no

  VA-API support ......................... no

  Use ALSA ............................... yes

  Use PulseAudio ......................... yes

  Use v8 context snapshot ................ yes

  Build WebEngineDriver .................. yes

Qt WebEngineQuick:

  UI Delegates ........................... yes

Qt PDF:

  Support V8 ............................. no

  Support XFA ............................ no

  Support XFA-BMP ........................ no

  Support XFA-GIF ........................ no

  Support XFA-PNG ........................ no

  Support XFA-TIFF ....................... no

  Bitcode support ........................ no

  Use static runtime ..................... no

Qt Protobuf:

  Qt Core types support .................. no

  Qt Gui types support ................... no

  Well-known types support ............... no

Qt Protobuf tools:

  Qt Protobuf generator .................. no

Qt GRPC:

  gRPC support ........................... yes

  QML gRPC support ....................... yes

Qt GRPC tools:

  Qt GRPC generator ...................... no

Qt Opcua:

  Open62541 .............................. yes

  Support for namespace 0 NodeId names ... yes

  Internal code generator ................ no

  Open62541 security support ............. yes

  Support for global discovery server .... yes

  Data type code generator ............... yes

Qt Remote Objects:

  High Availability Manager (ham) ........ no

Qt Scxml:

  ECMAScript data model for QtScxml ...... yes

Qt Sensors:

  sensorfw ............................... no

  sensorfw_enabled_with_cmake ............ no

Qt SerialBus:

  Socket CAN ............................. yes

  Socket CAN FD .......................... yes

  SerialPort Support ..................... yes

Qt TextToSpeech:

  Flite .................................. no

  Flite with ALSA ........................ no

  Speech Dispatcher ...................... no

Qt Virtualkeyboard:

  Desktop integration .................... yes

  Built-in layouts ....................... yes

  Key navigation ......................... no

  Retro style as default ................. no

  Sensitive Debug ........................ no

  Cerence ................................ no

    Static Linking ....................... no

    Handwriting .......................... no

      Alphabetic ......................... no

      CJK ................................ no

    XT9 .................................. no

      XT9 Debug .......................... no

      XT9 9-key layouts .................. no

    Bundle resources ..................... no

      Handwriting ........................ no

      XT9 ................................ no

  Hunspell ............................... yes

    Using Hunspell copy from 3rdparty/ ... no

  OpenWnn ................................ yes

  MyScript ............................... no

  Example HWR ............................ no

  Language support enabled for:

    Arabic ............................... yes

    Bulgarian ............................ yes

    Czech ................................ yes

    Danish ............................... yes

    German ............................... yes

    Greek ................................ yes

    English GB ........................... yes

    English US ........................... yes

    Spanish .............................. yes

    Spanish Mexico ....................... yes

    Estonian ............................. yes

    Farsi ................................ yes

    Finnish .............................. yes

    French Canada ........................ yes

    French France ........................ yes

    Hebrew ............................... yes

    Hindi ................................ yes

    Croatian ............................. yes

    Hungarian ............................ yes

    Indonesian ........................... yes

    Italian .............................. yes

    Japanese ............................. yes

    Korean ............................... yes

    Malay ................................ yes

    Norwegian ............................ yes

    Dutch ................................ yes

    Polish ............................... yes

    Portuguese Brazil .................... yes

    Portuguese Portugal .................. yes

    Romanian ............................. yes

    Russian .............................. yes

    Slovak ............................... yes

    Slovenian ............................ yes

    Albanian ............................. yes

    Serbian .............................. yes

    Swedish .............................. yes

    Thai ................................. yes

    Turkish .............................. yes

    Ukrainian ............................ yes

    Vietnamese ........................... yes

    Simplified Chinese ................... yes

    Traditional Chinese .................. yes

    HongKong Chinese ..................... no

  Traditional chinese input methods:

    Zhuyin ............................... yes

    Cangjie .............................. yes

 

-- 

 



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。