Multimedia Overview

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.

Features

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.

Multimedia Components

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.

Multimedia Recipes

For some quick recipes, see this table:

Limitations

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.

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.

Reference Documentation

QML Types

The QML types are accessed by using:

 import QtMultimedia

Multimedia Classes

QAudio

Contains enums used by the audio classes

QAudioBuffer

Represents a collection of audio samples with a specific format and sample rate

QAudioDecoder

Implements decoding audio

QAudioDevice

Information about audio devices and their functionality

QAudioFormat

Stores audio stream parameter information

QAudioInput

Represents an input channel for audio

QAudioOutput

Represents an output channel for audio

QAudioSink

Interface for sending audio data to an audio output device

QAudioSource

Interface for receiving audio data from an audio input device

QCamera

Interface for system camera devices

QCameraDevice

General information about camera devices

QCameraFormat

Describes a video format supported by a camera device

QGraphicsEffect

The base class for all graphics effects

QGraphicsVideoItem

Graphics item which display video produced by a QMediaPlayer or QCamera

QImageCapture

Used for the recording of media content

QMediaCaptureSession

Allows capturing of audio and video content

QMediaDevices

Information about available multimedia input and output devices

QMediaFormat

Describes an encoding format for a multimedia file or stream

QMediaPlayer

Allows the playing of a media files

QMediaRecorder

Used for encoding and recording a capture session

QMediaTimeRange

Represents a set of zero or more disjoint time intervals

QMediaTimeRange::Interval

QMediaTimeRange::Interval class represents a time interval with integer precision

QPlatformAudioSink

Base class for audio backends

QPlatformAudioSource

Access for QAudioSource to access the audio device provided by the plugin

QSoundEffect

Way to play low latency sound effects

QStaticText

Enables optimized drawing of text when the text and its layout is updated rarely

QVideoFrame

Represents a frame of video data

QVideoFrameFormat

Specifies the stream format of a video presentation surface

QVideoSink

Represents a generic sink for video data

QVideoWidget

Widget which presents video produced by a media object