A set of APIs for working with audio, video, radio 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 and radio devices.
Here are some examples of what can be done with 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
Tune and listen to radio stations
Use a camera, including viewfinder, image capture, and movie recording
Play 3D positional audio with Qt Audio Engine
Decode audio media files into memory for processing
Accessing video frames or audio buffers as they are played or recorded
For some quick recipes, look at the overviews above and consult this table:
Playing a sound effect
Playing low latency audio
Playing encoded audio (MP3, AAC etc)
Audio , MediaPlayer
Accessing raw audio input data
Recording encoded audio data
Discovering raw audio devices
MediaPlayer , VideoOutput , Video
MediaPlayer , VideoOutput
Listening to the radio
Radio , RadioData
Accessing camera viewfinder
Camera , VideoOutput
Camera , VideoOutput
3D sound sources
AudioEngine , Sound
The Qt Multimedia APIs build upon the multimedia framework of the underlying platform. This can mean that support for various codecs or containers can vary between machines, depending on what the end user has installed.
For developers wishing to access some platform specific settings, or to port the Qt Multimedia APIs to a new platform or technology, see Multimedia Backend Development .
Changes from Previous Versions¶
If you previously used Qt Multimedia in Qt 4, or used Qt Multimedia Kit in Qt Mobility, please see Changes in Qt Multimedia for more information on what changed, and what you might need to change when porting code.
The QML types are accessed by using:import QtMultimedia 5.8
A convenience type for showing a specified video.
Add audio playback to a scene.
Add media playback to a scene.
Access viewfinder frames, and take photos and movies.
An interface for capturing camera images.
An interface for exposure related camera settings.
An interface for flash related camera settings.
An interface for focus related camera settings.
An interface for camera capture related settings.
Controls video recording with the Camera.
Provides a global object with useful functions from Qt Multimedia.
Defines an item in a Playlist.
For specifying a list of media to be played.
Access radio functionality from a QML application.
Access RDS data from a QML application.
Simple control over torch functionality.
The SoundEffect type provides a way to play sound effects in QML.
Render video or camera viewfinder.
The following types are accessed by using Qt Audio Engine :
Defines a linear attenuation curve for a Sound.
Defines a non-linear attenuation curve for a Sound.
Control all active sound instances by group.
Organize all your 3d audio content in one place.
Control global listener parameters.
Load audio samples, mostly .wav.
Define a playback variation for sounds. So each time the playback of the same sound can be a slightly different even with the same AudioSample.
Define a variety of samples and parameters to be used for SoundInstance.
Play 3d audio content.
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 StereoFrame class provides a simple wrapper for a stereo audio frame.
The QAudioDecoder class allows decoding audio.
The QAudioDeviceInfo class provides an interface to query audio devices and their functionality.
The QAudioFormat class stores audio stream parameter information.
The QAudioInput class provides an interface for receiving audio data from an audio input device.
The QAudioOutput class provides an interface for sending audio data to an audio output device.
The QAudioProbe class allows you to monitor audio being played or recorded.
The QAbstractAudioDeviceInfo class is a base class for audio backends.
The QAbstractAudioOutput class is a base class for audio backends.
The QAbstractAudioInput class provides access for QAudioInput to access the audio device provided by the plugin.
The QAudioSystemPlugin class provides an abstract base for audio plugins.
The QSound class provides a method to play .wav sound files.
The QSoundEffect class provides a way to play low latency sound effects.
The QCamera class provides interface for system camera devices.
A FrameRateRange represents a range of frame rates as minimum and maximum rate.
The QCameraExposure class provides interface for exposure related camera settings.
The QCameraFocusZone class provides information on zones used for autofocusing a camera.
The QCameraFocus class provides an interface for focus and zoom related camera settings.
The QCameraImageCapture class is used for the recording of media content.
The QCameraImageProcessing class provides an interface for image processing related camera settings.
The QCameraInfo class provides general information about camera devices.
The QCameraViewfinderSettings class provides a set of viewfinder settings.
The QMediaContent class provides access to the resource relating to a media content.
The QMediaPlayer class allows the playing of a media source.
The QMediaPlaylist class provides a list of media content to play.
The QMediaPlaylistReader class provides an interface for reading a playlist file.
The QMediaPlaylistNavigator class provides navigation for a media playlist.
The QMediaPlaylistProvider class provides an abstract list of media.
The QMediaResource class provides a description of a media resource.
The QMediaBindableInterface class is the base class for objects extending media objects functionality.
The QMediaControl class provides a base interface for media service controls.
Provides identifiers for meta-data attributes.
The QMediaObject class provides a common base for multimedia objects.
The QMediaService class provides a common base class for media service implementations.
The QMediaServiceProviderHint class describes what is required of a QMediaService.
The QMediaServiceProvider class provides an abstract allocator for media services.
The QMediaTimeInterval class represents a time interval with integer precision.
The QMediaTimeRange class represents a set of zero or more disjoint time intervals.
The QMultimedia namespace contains miscellaneous identifiers used throughout the Qt Multimedia library.
The QRadioData class provides interfaces to the RDS functionality of the system radio.
The QRadioTuner class provides an interface to the systems analog radio device.
The QAudioRecorder class is used for the recording of audio.
The QAudioEncoderSettings class provides a set of audio encoder settings.
The QVideoEncoderSettings class provides a set of video encoder settings.
The QImageEncoderSettings class provides a set of image encoder settings.
The QMediaRecorder class is used for the recording of media content.
The QAbstractVideoBuffer class is an abstraction for video data.
The QAbstractPlanarVideoBuffer class is an abstraction for planar video data.
The QAbstractVideoFilter class represents a filter that is applied to the video frames received by a VideoOutput type.
The QVideoFilterRunnable class represents the implementation of a filter that owns all graphics and computational resources, and performs the actual filtering or calculations.
The QAbstractVideoSurface class is a base class for video presentation surfaces.
The QVideoFrame class represents a frame of video data.
The QVideoProbe class allows you to monitor video frames being played or recorded.
The QVideoSurfaceFormat class specifies the stream format of a video presentation surface.
The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject.
The QVideoWidget class provides a widget which presents video produced by a media object.
© 2020 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.