本页内容

Qt Multimedia 在 Linux 上

本页面讨论在 Linux 上使用Qt Multimedia 时需要注意的事项。

音频后端要求

Qt Multimedia Linux 上的音频功能需要 PipeWire 或 PulseAudio。PipeWire 是所有现代 Linux 发行版上的推荐后端,但如果 PipeWire 不可用,则会使用 PulseAudio。实验性的 ALSA 后端将在未来的 Qt 版本中弃用。在此之前,需要社区贡献来修复该后端存在的问题。

对于在嵌入式 Linux 上使用 GStreamer 后端的应用程序,请参阅Qt Multimedia GStreamer 后端以了解额外的 PulseAudio 要求。

在 Linux 上使用 Wayland 合成器的限制

屏幕录制功能需要安装:

受 Wayland 协议的限制,当前屏幕只能通过操作系统在激活QScreenCapture 实例时显示的向导进行选择。有关更多详细信息,请参阅QScreenCapture 类文档。

硬件编解码驱动程序

在 Linux 上实现硬件加速的视频编解码需要平台专用的驱动程序。虽然在缺少必要驱动程序时,Qt Multimedia 可能会回退到软件编解码,但安装硬件支持驱动程序可以显著提高性能并降低 CPU 占用率。

请安装适用于您硬件的相应驱动程序包:

  • intel-media-va-driver — Intel 第 8 代及以上(Broadwell 2014 年及以后)、Arc A 系列及更新处理器
  • intel-media-va-driver-non-free — 带附加专有编解码器的英特尔媒体驱动程序
  • i965-va-driver — 较旧的英特尔硬件(Sandy Bridge、Ivy Bridge、Haswell)
  • mesa-va-drivers — 支持 AMD GPU 的 VA-API
  • nvidia-driver — NVIDIA 专有显卡驱动程序(例如:nvidia-driver-525 或更高版本)

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.