QtMultimedia module from the Qt Toolkit that provides a rich feature set to easily take advantage of a platform's multimedia capabilites and hardware.
Questions tagged [qtmultimedia]
235 questions
3
votes
3 answers
How to find video resolution and aspect ratio of QMediaPlayer video?
This seems too simple, I must be overlooking something?
How do I find the native video size or aspect ratio from a video file being displayed by a QMediaPlayer?
The video Resolution, PixelAspectRatio, etc., should be in the MetaData, but I wait for…

Paul Shubert
- 31
- 1
- 2
3
votes
2 answers
Unable to loop video using QML MediaPlayer
I am trying to create a simple video player that just plays a specified video on loop. While the video plays as expected, it does not loop.
The following is the code I am using:
import QtQuick 2.0
import QtMultimedia 5.0
Rectangle
{
width :…

balajeerc
- 3,998
- 7
- 35
- 51
3
votes
1 answer
Invalid/undefined mediaobject property of QML Camera
I'm trying to create a QML item, defined in C++, that would intercept frames from a QML Camera before they are displayed by a VideoOutput. Something like:
Window {
Camera {
id: camera
}
MyFrameinterceptor {
id:…

user981733
- 430
- 4
- 9
3
votes
1 answer
How to get the total time of an audio file?
How to get the total time of an audio file? I am trying this:
QMediaPlayer* audioPlayer = new QMediaPlayer();
audioPlayer->setMedia(QUrl::fromLocalFile("F:/Audio/mysong.mp3"));
audioPlayer->duration(); // return 0
but all the time the function…

user3430722
- 345
- 1
- 5
- 12
3
votes
1 answer
multimedia module cannot be found in Qt for android
I use MediaPlayer qml type to play a music.I just put one single qml file for this project.And It runs perfect on windows.
When I build it an android. Debug says module "QtMultimedia" plugin "declarative_multimedia" not found for Release and…

zzy
- 1,771
- 1
- 13
- 48
3
votes
2 answers
Why QML MediaPlayer/VideoOutput doesn't work for me?
I'm trying to play test video with qml by this code:
import QtQuick 2.2
import QtMultimedia 5.0
Item {
width: 300
height: 300
MediaPlayer {
id: player
source: "C:\\Downloads\\video.mp4"
}
VideoOutput {
…

marshall
- 265
- 3
- 11
3
votes
1 answer
QtQuick: cannot playback any video on embedded linux
I cross compiled Qt 5.2.1 for TI AM335x board using the toolchain provided by TI together with their SDK 6.00.00.
Unluckily I am not able to reproduce any video in QML...
The debug console tells:
defaultServiceProvider::requestService(): no service…

Morix Dev
- 2,700
- 1
- 28
- 49
3
votes
2 answers
How to get length of a song using Qt 5.1?
How can I get the length of a song in Qt 5.1 API? I think I can read it using Length metadata but I'm not sure if this metadata will be available for all audio files.

Donotalo
- 12,748
- 25
- 83
- 121
2
votes
0 answers
How can I set subtitle on QML MediaPlayer?
Subtitle support added to Qt6 Multimedia and we can show a subtitle on MediaPlayer very simple. But I can't use this feature in QML, setSubtitleText seems not find in QML or at least not callable.
MediaPlayer {
id: mediaPlayer
Button{
…

fristhon
- 21
- 1
- 6
2
votes
0 answers
How to use QtMultimedia on Qt 6.3.0?
I tried to add some sound effects to my project, and when I tried "QT += multimedia", the compiler told me it was an unknown module in qt, like this
How can I fix this problem? Thanks a lot!

Zhou Yi
- 21
- 1
2
votes
1 answer
Qt: QAudioInput vs QAudioRecorder
I am using Qt Multimedia 5 to analyze audio (FFT, LUFS, and dBFS, etc.) from audio input device.
To get audio data, there are two main options, QAudioRecorder and QAudioInput.
They can all read audio data with PCM (QAudioInput use QBuffer and…

Creepercdn
- 52
- 1
- 5
2
votes
1 answer
How to install Qt with multimedia on Windows
I'd installed QT for Windows but when I try to use
QT += multimedia in the .pro file it showed me that this module was unknown. I checked Qt online installer for additional modules but there was no such a component there. How can I get Qt with…

neo
- 75
- 5
2
votes
1 answer
PyQt5 select which audio device output will play
This simple code will have a GUI button that, when pressed, will play example.mp3 to the default audio output device.
import sys
from PyQt5 import QtCore, QtMultimedia
from PyQt5.QtMultimedia import QAudio, QAudioDeviceInfo
from PyQt5.QtWidgets…

BrainDead
- 786
- 7
- 16
2
votes
1 answer
play gtts buffer with QtMultimedia.QAudioOutput directly
I want to play sounds with QtMultimedia.
In the case of QMediaPlayer, I could play mp3 file , it is made from gTTS.
(I think it is okay but I don't like the file remains unless I excute codes for deleting it.)
I make a mp3 file with gTTS module and…

Haru
- 1,884
- 2
- 12
- 30
2
votes
0 answers
Cannot read bytes while recording audio using QAudioInput
I am using QAudioInput to record audio from the system default input device.
I get a callback from QIODevice::readyRead that bytes are ready for read, but reading the bytes return an array of \0 's, equal to the size of the…

Yiannis Mpourkelis
- 1,366
- 1
- 15
- 34