Questions tagged [qmediaplayer]

The QMediaPlayer class is a part of the Qt framework. It allows playing of media sources.

The QMediaPlayer class is a high level media playback class. It can be used to playback such content as songs, movies and internet radio. The content to playback is specified as a QMediaContent object, which can be thought of as a main or canonical URL with additional information attached. When provided with a QMediaContent playback may be able to commence.

211 questions
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
1 answer

QMediaPlayer setPlaybackRate > 1 causes high-pitched audio

I'm creating an app that plays podcasts in PyQt5. It retrieves the MP3 from a URL and plays it using QMediaPlayer. The issue I'm running into is when I wish to play these podcasts back at a faster speed. Using setPlaybackRate(rate) I change the rate…
Ricky Kresslein
  • 372
  • 1
  • 13
2
votes
1 answer

How can i play music using QByteArray data?

I have a QByteArray which created like this: QByteArray data; QFile file("/path/to/music.mp3"); if (file.open(QIODevice::ReadOnly)) { data = file.readAll(); } And i get it somewhere else, how could i play it using QMediaPlayer without save it…
Anthony
  • 98
  • 7
2
votes
1 answer

How QMediaContent able to show a video when urllib unable to download?

I have a Qt application to show videos from urls using: player = QMediaPlayer() ... player.setMedia(QMediaContent(QUrl(video.url))) ... But unable to download the video using the same url with urllib.request, response code is always 200 but…
err69
  • 317
  • 1
  • 7
2
votes
2 answers

pyqt5: second video does not play: concurrent QMediaPlayer issue?

I am basically building a GUI with pyqt5 supposed to incorporate two videos. To do this, I use QMediaPlayer in combination with QVideoWidget, one for each class. The point is: while the first video plays as expected, the second one refuses to play.…
Romain Legrand
  • 107
  • 1
  • 7
2
votes
1 answer

Qt QGraphicsView not playing any video

I have a very simple QT 5.11.0 application with a graphicsview that i would like to play a video in. Here is my code, it compiles, loads and displays a blank graphicsview. #include "Demo_TeleLink.h" Demo_TeleLink::Demo_TeleLink(QWidget *parent) …
Chris
  • 74
  • 7
2
votes
0 answers

QMediaPlayer play no sound when winmm.dll in my program

i have used QMediaPlayer to play some sound,it worked well. then i used some third device and it`s dll api depends on the windows winmm.dll, and then my QMediaPlayer played no sound when i join the winmm.dll to my program. i dont know why. i thought…
Jian Liu
  • 21
  • 2
2
votes
0 answers

PyQt5 treeview and mediaplayer crash

this is code with player only work fine ; with treeview only also work but together the app crash immediately if i click on radio button to show the treeview. But if i click open button and the file explorer appear than it work and i can use…
seghier
  • 167
  • 1
  • 2
  • 11
2
votes
2 answers

QMediaPlayer - play a sound loaded into memory

Case 1. I managed to play a sound with QMediaPlayer like this: QMediaPlayer* media = new QMediaPlayer(); media->setMedia("sound.mp3"); media->play(); Case 2. Everything is ok also if I load the sound into memory and play it like this: QFile…
Junior
  • 507
  • 5
  • 19
2
votes
6 answers

QVideoWidget: Video is cut off

I want to play a video in a Qt Application. This is my code so far: #include #include #include #include #include #include using namespace std; const int WIDTH = 1280; const…
Stefan
  • 418
  • 5
  • 13
2
votes
1 answer

how to play a voice from QByteArray in Qt

I want to play a music from QByteArray with so I can use it in many cases as to retrieve a sound from database or transfer it over network using Tcp etc.. So I use these lines of code QFile file("E:\\amr.mp3"); // sound…
user5484156
2
votes
0 answers

Failed to start Video surface

When I start four QMediaplayer in qt5 to play 'v4l2:///dev/video0' and so on. It plays the video on screen but at terminal it gives: Failed to start Video surface I am not able to understand why I get this message. Any help will be appreciated.
dilip yadav
  • 123
  • 1
  • 10
2
votes
0 answers

How to play video by internet link with QT using QMediaPlayer object

I want to play video using QMediaplayer with internet link. I tried to do this by passing internet link to "setMedia" function but error occured: "DirectShowPlayerService::doRender: Unresolved error code 80040218" Example Code is: #include…
Gio
  • 21
  • 1
2
votes
1 answer

Changin mp3 speed in Qt and C++ [QMediaPlayer]

I'm trying to develop a little application in which you can load a mp3 file and play it in variable speeds! (I know it already exists :-) ) I'm using Qt and C++. I already have the basic player but I'm stuck with the rate thing, because I want to…
mais88
  • 31
  • 7
2
votes
0 answers

Modify audio output stream of QMediaPlayer

I'm trying to port an audio player from Qt4 to Qt5, and from Phonon to QtMultimedia. Everything works fine with a QMediaPlayer, except that I can't find any way to modify the audio stream between the output of QMediaPlayer and the system sound. I…
Sylvain V
  • 194
  • 1
  • 7
1 2
3
14 15