Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. mediaplayer
    Log in to post
    • All categories
    • P

      Unsolved Processing Every Frame in a Video File
      QML and Qt Quick • qml mediaplayer video videooutput qvideofilter • • PetrichorShark

      5
      0
      Votes
      5
      Posts
      177
      Views

      P

      @SGaist Ah, in that case, I'll give it a try. Would that also be the case with QAbstractVideoSurface, or would that one receive further-in frames if more time passes?

      Processing takes about 250ms per frame on Android right now. I'm working on ways to speed that up, but the processing fps is going to be worse than the video file's fps for some time yet.

    • R

      Unsolved Qt6 QML Multimedia: How to crop video played from MediaPlayer to VideoOutput
      QML and Qt Quick • multimedia videooutput mediaplayer video rtsp video streaming • • rklemm

      3
      0
      Votes
      3
      Posts
      141
      Views

      R

      @GrecKo It does, but it seems to be a read-only reflection of the viewport set for the video frame objects that are coming through the videoSink. When I attempt to assign to it, I get the QML error: Invalid property assignment: "sourceRect" is a read-only property. The docs do not appear to reflect the fact that sourceRect is read-only. I am using Qt 6.3.

      Looking at the source for VideoOutput (https://github.com/qt/qtmultimedia/blob/37c2d097eb5dd8671cc752dc920da11d66105905/src/multimediaquick/qquickvideooutput_p.h#L41), we can see that the Q_PROPERTY for sourceRect is read-only in both the 6.3 and dev branches.

      I have had the thought of attempting to manually set the viewport of the QVideoFrameFormat of the frames coming through the VideoOutput's videoSink, but I haven't created a working solution for that strategy yet.

    • E

      Solved QImage::Format_Invalid from MedaiPlayer QVideoFrames
      General and Desktop • filters qml mediaplayer qimage • • Einstein

      6
      0
      Votes
      6
      Posts
      372
      Views

      SGaist

      Which examples are you referring to ?

    • I

      Solved How to use QML Playlist Type save function to save playlist.
      QML and Qt Quick • playlist audio mediaplayer qml • • iamRahul

      2
      0
      Votes
      2
      Posts
      215
      Views

      I

      @iamRahul I figured it out. We need to specify full location path till the file, and specify file type in format. Then it worked for me.

      if(audioPlaylist.save("file:///C:/MyMusicPlayer/Playlists/global_playlist.m3u","m3u")) { console.log("Playlist Saved") }

      Adding the filename global_playlist.m3u and format m3u made it working for me.

    • UnitScan

      Solved Local file format
      General and Desktop • url local file mediaplayer • • UnitScan

      2
      0
      Votes
      2
      Posts
      197
      Views

      UnitScan

      Solved

      QString mediafile = playlist->media(n).request().url().toString(); QFileInfo fi(mediafile); reader->setMedia(QUrl::fromLocalFile(fi.absoluteFilePath()));
    • U

      Solved Creating an object of QVideoWidget closes my mediaplayer app .
      QML and Qt Quick • c++ qvideowidget mediaplayer • • umutgurbuz

      13
      0
      Votes
      13
      Posts
      629
      Views

      U

      @sgaist The problem was the QGuiApplication in my main.cpp , i turned it to QApplication and it works fine.

      And lastly what should i do to use my applicationwindow as my videowidget. I want my video to play on my app like normal mediaplayers, not to open another window for it. Thanks for your kind effort.

    • U

      Unsolved defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
      Installation and Deployment • mediaplayer gstreamer1.0 raspberry pi3 deployment • • umutgurbuz

      11
      0
      Votes
      11
      Posts
      1103
      Views

      U

      0_1568024286357_2019-09-09 13-17-33 ekran görüntüsü.png
      I have these versions . It does not work when i build directly on raspberry pi .

    • W

      Unsolved Help in creating custom MediaPlayer component
      Mobile and Embedded • qml objective-c cpp mediaplayer ios • • Wiru

      12
      0
      Votes
      12
      Posts
      1529
      Views

      SGaist

      Then study the gstreamer implementation for example and start from there.

      The pattern is to have a "session class" that does the work and then provide all the interfaces you support that will be using said session class.

    • K

      Solved QT Multimedia players for multiple video files
      General and Desktop • multimedia videos graphics view c++ mediaplayer • • Kinesis

      16
      0
      Votes
      16
      Posts
      3468
      Views

      K

      I got the answer . MainWindow.cpp is like that

      ui->listWidget->setFlow(QListView::LeftToRight); ui->listWidget->setMinimumSize(1050,800); ui->listWidget->setGridSize(QSize(340, 320)); ui->listWidget->setResizeMode(QListView::Adjust); ui->listWidget->setViewMode(QListView::ListMode); ui->listWidget->setWrapping(true); QDir directory = QFileDialog::getExistingDirectory(this, tr("Open Directory"),"/home", QFileDialog::ShowDirsOnly| QFileDialog::DontResolveSymlinks); directory.setNameFilters({"*.mp4" , "*.avi" , "*.flv" , "*.mwv"}); for(const QFileInfo & finfo: directory.entryInfoList()){ QMediaPlayer *mediaPlayer = new QMediaPlayer(); mediaPlayer->setMedia(QUrl::fromLocalFile(finfo.absoluteFilePath())); videoItem = new QGraphicsVideoItem; videoItem->setSize(QSize(300,240)); QGraphicsScene *scene = new QGraphicsScene(this); QGraphicsView *graphicsView = new QGraphicsView(scene); mediaPlayer->setVideoOutput(videoItem); QPushButton *m_playButton = new QPushButton(); m_playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); connect(m_playButton, &QAbstractButton::clicked, [mediaPlayer]() { switch (mediaPlayer->state()) { case QMediaPlayer::PlayingState: mediaPlayer->pause(); break; default: mediaPlayer->play(); break; } }); connect(mediaPlayer, &QMediaPlayer::stateChanged, [m_playButton, this](QMediaPlayer::State state) { switch(state) { case QMediaPlayer::PlayingState: m_playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause)); break; default: m_playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); break; } }); QSlider *m_positionSlider = new QSlider(Qt::Horizontal,this); m_positionSlider->setRange(0,mediaPlayer->duration() / 1000); connect(mediaPlayer, &QMediaPlayer::positionChanged ,[m_positionSlider, this](qint64 position){ m_positionSlider->setValue(position); }); connect(mediaPlayer, &QMediaPlayer::durationChanged ,[m_positionSlider, this](qint64 duration){ m_positionSlider->setRange(0,duration); }); connect(m_positionSlider ,&QAbstractSlider::sliderMoved, [mediaPlayer ,this] (int position){ mediaPlayer->setPosition(position); }); auto item = new QListWidgetItem("", ui->listWidget); auto widget = new QWidget; auto label = new QLabel(finfo.fileName()); auto vb = new QVBoxLayout; QBoxLayout *controlLayout = new QHBoxLayout; controlLayout->setMargin(0); controlLayout->addWidget(m_playButton); controlLayout->addWidget(m_positionSlider); vb->addWidget(label); vb->addWidget(graphicsView); vb->addLayout(controlLayout); widget->setLayout(vb); widget->setMinimumSize(320, 320); ui->listWidget->setItemWidget(item,widget); player.append(mediaPlayer); scene->addItem(videoItem); }
    • Judicael Bayoli

      Unsolved metadata in Mediaplayer are undefined
      QML and Qt Quick • mediaplayer qml metadata • • Judicael Bayoli

      1
      0
      Votes
      1
      Posts
      458
      Views

      No one has replied

    • L

      Unsolved Qt 5.6.1 from online installer and GStreamer on (K)Ubuntu 16.10 - MediaPlayer sound issue
      General and Desktop • online installe gstreamer qt5.6 qtmultimedia mediaplayer • • Larpon

      1
      0
      Votes
      1
      Posts
      917
      Views

      No one has replied

    • AmazingQt

      Unsolved mediaplayer not able to play video
      General and Desktop • media player mediaplayer video qt 5.5.1 32bit • • AmazingQt

      16
      0
      Votes
      16
      Posts
      5156
      Views

      AmazingQt

      @raven-worx Got keys from plugin meta data ("audiocapture")
      QFactoryLoader::QFactoryLoader() checking directory path "/home/MYPATH/build-desktop-system-dev-Desktop_Qt_5_5_1_GCC_32bit-Release/MY_PROJECT/mediaservice" ...
      defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

    • Fidchells_Eye

      Solved GraphicsView crash with GraphicsVideoItem.
      General and Desktop • mediaplayer graphicview qgraphicsvideoi form • • Fidchells_Eye

      3
      0
      Votes
      3
      Posts
      1087
      Views

      Fidchells_Eye

      Hey Joel

      Thanks the code lines:
      QGraphicsScene* scene = new QGraphicsScene(this);
      ui->GVpreview->setScene(scene);

      fixed the issue as I don't know how to do the scene view bit in the form editor.

    • zyend

      Unsolved QMediaPlayer not working on Windows 7 Pro x64
      General and Desktop • qt5.5 mediaplayer multimedia • • zyend

      2
      0
      Votes
      2
      Posts
      1232
      Views

      SGaist

      Hi,

      It comes from the media foundation backend.

      What do you mean by regular mp4 ? What are the streams format ?

    • jonyAL

      Solved No service found (mediaplayer) in Ubuntu 14.04
      General and Desktop • mediaplayer qml gstreamer service linux • • jonyAL

      4
      1
      Votes
      4
      Posts
      3531
      Views

      jonyAL

      Solved using version 5.4.2..
      Should to exist a bug with missing libraries for Qt 5.5 version

    • N

      Unsolved Error:no service found for - "org.qt-project.qt.mediaplayer
      General and Desktop • qtmultimedia qml qt quick mediaplayer • • Nilesh Prakash Kokane

      2
      0
      Votes
      2
      Posts
      1916
      Views

      SGaist

      Hi,

      What system is it ? What version of GStreamer do you have installed ?

    • J

      Unsolved Perform action at timed intervals when holding key down
      General and Desktop • keys mediaplayer timer • • JordanHarris

      4
      0
      Votes
      4
      Posts
      1268
      Views

      SGaist

      That's what the timer is for. If you press the key long enough then it will fire but if you release it quicker that the timeout, the timer will be cancelled, no need to measure the time between both events.

    • V

      Any way to download buffered mp3 from QMediaPlayer?
      QML and Qt Quick • mediaplayer • • virgi26

      1
      0
      Votes
      1
      Posts
      555
      Views

      No one has replied

    • J

      Audio files Meta Data extraction
      General and Desktop • qt5 mediaplayer meta dta audioplayer • • JasonB

      2
      0
      Votes
      2
      Posts
      1005
      Views

      SGaist

      Hi,

      You might be interested by QMediaObject::availableMetaData and friends

      Hope it helps