Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtmultimedia-building-from-source.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtmultimedia-building-from-source.html
6
\title Building Qt Multimedia from sources
7
\brief This document describes how to build Qt Multimedia with full
8
feature support from source code.
9
10
This page describes the process of configuring and building \l{Qt
11
Multimedia}. This description assumes familiarity with \l{Building Qt
12
Sources} which specifies build requirements for your platform, as well
13
as an overview of \l{Qt Configure Options}. For platform-specific
14
considerations related to the Qt Multimedia module, see \l{Platform
15
Notes} below.
16
17
\section1 Building from source
18
19
Building Qt Multimedia with full feature support depends on \l
20
{https://ffmpeg.org/}{FFmpeg} headers and libraries on most platforms.
21
It is possible to build Qt Multimedia without the Qt Multimedia FFmpeg
22
media backend, but this is only recommended when building for platforms
23
where the FFmpeg backend is not supported.
24
25
FFmpeg development libraries required to build Qt Multimedia can be
26
built from sources or downloaded as binary packages. Qt Multimedia can
27
use either static linking or dynamic linking to FFmpeg libraries. We
28
recommend using the same major version of FFmpeg that is listed in
29
\l{Target platform and backend notes}. For information on how to build
30
the FFmpeg development libraries, see \l{Building FFmpeg from source}.
31
32
To build Qt Multimedia with FFmpeg support, specify the \c{-ffmpeg-dir}
33
option on the configure command line when building Qt.
34
35
\badcode
36
qt-source/configure -ffmpeg-dir <FFMPEG_DIR>
37
\endcode
38
39
Here, \c{<FFMPEG_DIR>} is the directory containing the FFmpeg include,
40
lib, and bin directories. To build Qt Multimedia without FFmpeg, omit
41
the \c{<FFMPEG_DIR>} variable and specify the \c{-no-feature-ffmpeg}
42
configure option.
43
44
To build Qt Multimedia without native media backends, use
45
\c{-no-feature-xxx} to exclude the corresponding features, such as
46
\c gstreamer, \c native_windows_backend, \c native_darwin_backend or
47
\c native_android_backend.
48
49
\badcode
50
qt-source/configure -no-feature-gstreamer
51
\endcode
52
53
If you prefer not to build all Qt's submodules, you can reduce configure
54
and build times using the \c{-submodules} configure option. This will
55
configure a build that only builds Qt Multimedia and its dependencies.
56
57
\badcode
58
qt-source/configure -submodules qtmultimedia -ffmpeg-dir <FFMPEG_DIR>
59
\endcode
60
61
If you configure Qt Multimedia against FFmpeg built with shared
62
libraries (dynamic linking), the FFmpeg shared libraries must be in the
63
module loader's search path to run tests or use examples.
64
65
\note Qt Multimedia requires the FFmpeg avformat, avcodec, swresample,
66
swscale, and avutil libraries during runtime to be able to use the
67
FFmpeg media backend. If one or more of these dynamic libraries are not
68
found during application startup, the FFmpeg media backend will fail to
69
load, and the system will attempt to load the native backend. Qt
70
Multimedia doesn't support as many features on native backends.
71
72
If you don't already have these libraries in the \c{path}, specify the
73
\c{-ffmpeg-deploy} configure option. With this option enabled,
74
the necessary FFmpeg binaries will be copied to Qt's install directory
75
during the build and install steps:
76
77
\badcode
78
qt-source/configure -submodules qtmultimedia -ffmpeg-dir <FFMPEG_DIR> -ffmpeg-deploy
79
\endcode
80
81
After configuring Qt Multimedia, carefully review the configure summary
82
(found in the config.summary file). You can verify that FFmpeg is found
83
under the "Plugin" section. Then follow the regular build and install
84
steps described in \l{Building Qt Sources}.
85
86
\section1 Platform Notes
87
88
\section2 iOS
89
90
\list
91
\li When configuring Qt Multimedia with FFmpeg support, the CMake
92
configuration process looks for \c .xcframework files in the
93
supplied FFmpeg directory. Using \c .dylib binaries directly
94
is not supported. See \l{Building FFmpeg from source for iOS on macOS}
95
and \l{https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle}
96
for details on how to package FFmpeg build artifacts into
97
\c .xcframework files.
98
\endlist
99
100
\section2 Linux
101
102
\list
103
\li When configuring Qt Multimedia with FFmpeg enabled, the
104
pipewire or the pulseaudio development package is required. Without
105
one of these packages, FFmpeg will not be recognized.
106
\li When using a version of FFmpeg that is built with VAAPI support,
107
we recommend building Qt Multimedia with VAAPI support as well
108
to make hardware texture conversion possible. To configure Qt
109
Multimedia with VAAPI support, VAAPI developer libraries must be
110
installed on your system. Review the config.summary file to
111
verify that VAAPI support is enabled under the "Hardware
112
acceleration and features" section.
113
\li When configuring Qt Multimedia with the GStreamer backend, GStreamer
114
v1.20 is the minimum requirement. However, we recommend using the
115
latest stable GStreamer upstream release if possible.
116
\endlist
117
*/
qtmultimedia
src
multimedia
doc
src
qtmultimedia-building-from-source.qdoc
Generated on
for Qt by
1.16.1