A set of APIs for working with audio, video and camera devices.
Multimedia support in Qt is provided by the Qt Multimedia module. The Qt Multimedia module provides a rich feature set that enables you to easily take advantage of a platform’s multimedia capabilities, such as media playback and the use of camera devices.
Here are some things you can do with the Qt Multimedia APIs:
Access raw audio devices for input and output.
Play low latency sound effects.
Play media files in playlists (such as compressed audio or video files).
Record audio and compress it.
Use a camera, including viewfinder, image capture, and movie recording
Decode audio media files into memory for processing.
The Qt Multimedia APIs are categorized into three main components. More information specific to each component is available in the overview pages. You can also take a look at some recipes .
For some quick recipes, see this table:
Playing a sound effect
Playing encoded audio (MP3, AAC etc)
Playing raw audio data with low latency
Accessing raw audio input data
Recording encoded audio data
Discovering audio and video devices
Capturing audio and video
The Qt Multimedia APIs build upon the multimedia framework of the underlying platform. This can mean that support for various codecs, or containers will vary between machines. This support depends on what the end user has installed. See Supported Media Formats for more detail.
Changes from Previous Versions#
If you previously used Qt Multimedia in Qt 5, see Changes to Qt Multimedia for more information on what has changed, and what you might need to change when porting code to Qt 6.
The QML types are accessed by using:
The QAudio namespace contains enums used by the audio classes.
The QAudioBuffer class represents a collection of audio samples with a specific format and sample rate.
The QAudioDecoder class implements decoding audio.
The QAudioDevice class provides an information about audio devices and their functionality.
The QAudioFormat class stores audio stream parameter information.
Represents an input channel for audio.
Represents an output channel for audio.
The QAudioSink class provides an interface for sending audio data to an audio output device.
The QAudioSource class provides an interface for receiving audio data from an audio input device.
The QPlatformAudioSink class is a base class for audio backends.
The QPlatformAudioSource class provides access for QAudioSource to access the audio device provided by the plugin.
The QSoundEffect class provides a way to play low latency sound effects.
The QCamera class provides interface for system camera devices.
The QCameraFormat class describes a video format supported by a camera device.
The QCameraDevice class provides general information about camera devices.
The QImageCapture class is used for the recording of media content.
The QMediaPlayer class allows the playing of a media files.
The QMediaDevices class provides information about available multimedia input and output devices.
Describes an encoding format for a multimedia file or stream.
The QMediaTimeRange::Interval class represents a time interval with integer precision.
The QMediaTimeRange class represents a set of zero or more disjoint time intervals.
The QMediaCaptureSession class allows capturing of audio and video content.
The QMediaRecorder class is used for encoding and recording a capture session.
The QVideoFrame class represents a frame of video data.
The QVideoFrameFormat class specifies the stream format of a video presentation surface.
The QVideoSink class represents a generic sink for video data.
The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaPlayer or QCamera.
The QVideoWidget class provides a widget which presents video produced by a media object.