1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
7\page multimediaoverview.html
8\title Multimedia Overview
9\brief A set of APIs for working with audio, video and camera devices.
10\ingroup explanations-graphicsandmultimedia
12Multimedia support in Qt is provided by the \l{Qt Multimedia} module. The Qt
13Multimedia module provides a rich feature set that enables you to easily take
14advantage of a platform's multimedia capabilities, such as media playback and
15the use of camera devices.
19Here are some things you can do with the Qt Multimedia APIs:
22\li Access raw audio devices for input and output.
23\li Play low latency sound effects.
24\li Play 3D spatial audio.
25\li Play media files in playlists (such as compressed audio or video files).
26\li Record audio and compress it.
27\li Use a camera, including viewfinder, image capture, and movie recording
28\li Decode audio media files into memory for processing.
31\section1 Multimedia Components
33The Qt Multimedia APIs are categorized into three main components. More
34information specific to each component is available in the overview pages. You
35can also take a look at some \l{Multimedia Recipes}{recipes}.
38\li \l {Audio Overview}
39\li \l {Video Overview}
40\li \l {Camera Overview}
41\li \l {Spatial Audio Overview} (Technology Preview)
44\section1 Multimedia Recipes
46For some quick recipes, see this table:
55 \li Playing a sound effect
61 \li \l{Spatial Audio Panning Example}{audiopanning}
62 \li SpatialSound, AudioEngine
63 \li QSpatialSound, QAudioEngine
65 \li Playing encoded audio (MP3, AAC etc)
66 \li \l{Media Player Example}{player}
70 \li Playing raw audio data with low latency
71 \li \l{Audio Output Example}{audiooutput}
75 \li Accessing raw audio input data
76 \li \l{Spectrum Example}{spectrum},
77 \l{Audio Source Example}{audiosource}
81 \li Recording encoded audio data
82 \li \l{Audio Recorder Example}{audiorecorder}
83 \li \l{CaptureSession}, \l{AudioInput}, \l{MediaRecorder}
84 \li QMediaCaptureSession, QAudioInput, QMediaRecorder
86 \li Discovering audio and video devices
87 \li \l{Audio Devices Example}{audiodevices}
88 \li \l{MediaDevices}, \l{audioDevice}, \l{cameraDevice}
89 \li QMediaDevices, QAudioDevice, QCameraDevice
92 \li \l{Media Player Example}{player},
93 \l{QML Media Player Example}{mediaplayer}
94 \li \l MediaPlayer, \l VideoOutput, \l Video
95 \li QMediaPlayer, QVideoWidget, QGraphicsVideoItem
97 \li Capturing audio and video
98 \li \l {Camera Example}{camera},
99 \l {QML Video Recorder}{recorder}
100 \li \l CaptureSession, \l Camera, \l AudioInput \l VideoOutput
101 \li QMediaCaptureSession, QCamera, QAudioInput, QVideoWidget
104 \li \l {Camera Example}{camera},
105 \l {QML Video Recorder}{recorder}
106 \li \l CaptureSession, \l Camera, \l ImageCapture
107 \li QMediaCaptureSession, QCamera, QImageCapture
110 \li \l {Camera Example}{camera},
111 \l {QML Video Recorder}{recorder}
112 \li \l CaptureSession, \l Camera, \l MediaRecorder
113 \li QMediaCaptureSession, QCamera, QMediaRecorder
118The Qt Multimedia APIs build upon the multimedia framework of the underlying
119platform. This can mean that support for various codecs, or containers will vary
120between machines. This support depends on what the end user has installed.
121See \l{Supported Media Formats} for more detail.
123\note Qt Multimedia APIs depend on functionality provided by QCoreApplication,
124and multimedia objects created using the Qt Multimedia APIs can only be used
125during the lifetime of this application object. It is therefore important to
126create a QCoreApplication, QGuiApplication, or QApplication before accessing
127any of the Qt Multimedia APIs. If the application object is recreated, make
128sure that any Qt Multimedia objects are also recreated.
130\section1 Changes from Previous Versions
132If you previously used Qt Multimedia in Qt 5, see
133\l{Changes to Qt Multimedia} for more information on what has changed, and what
134you might need to change when porting code to Qt 6.
136\section1 Reference Documentation
139 \li \l{Qt Multimedia C++ Classes}{C++ Classes}
140 \li \l{Qt Multimedia QML Types}{QML Types}