Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qmediaplayer no video
QtWS25 Last Chance

qmediaplayer no video

Scheduled Pinned Locked Moved Solved General and Desktop
qmediaplayerqt 5.6.1qvideowidgetgstreamerlinux
6 Posts 4 Posters 5.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pauleddP Offline
    pauleddP Offline
    pauledd
    wrote on last edited by pauledd
    #1

    Hi there,
    I try to playback a video with qmediaplayer but it shows only a blank window and no errors so far.
    The videofile is: ( Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360, 560 kb/s, 29.67 fps, 29.67 tbr, 11392 tbn, 59.33 tbc (default) )
    Qtmultimedia was compiled with gstreamer 1.0 support, GStreamer 1.6.3 installed. Plugins good,bad,ugly (1.0) are installed.
    The videofile itself plays fine with "gst-launch-1.0 filesrc location=~/store/tmp/out_s.mp4 ! decodebin ! autovideosink"

    main.cpp:

    #include "mainwindow.h"
    #include <QApplication>
    #include <QMediaPlayer>
    #include <QVideoWidget>
    #include <QDebug>
    
    int main(int argc, char *argv[])
    {
    	QApplication a(argc, argv);
    	QMediaPlayer* player = new QMediaPlayer;
    	QVideoWidget* vw = new QVideoWidget;
    	
    	player->setVideoOutput(vw);
    	player->QMediaPlayer::setMedia(QUrl::fromLocalFile("/home/paul/store/tmp/out_s.mp4"));
    	
    	vw->show();
    	player->play();
    	
    	qDebug() << player->state();
    
    	return a.exec();
    }
    

    project.pro :

    #-------------------------------------------------
    #
    # Project created by QtCreator 2016-07-08T16:22:05
    #
    #-------------------------------------------------
    
    QT       += core gui multimedia multimediawidgets
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    TARGET = mjpeg_test
    TEMPLATE = app
    SOURCES += main.cpp\
            mainwindow.cpp
    HEADERS  += mainwindow.h
    FORMS    += mainwindow.ui
    

    Application output:

    Starting /home/paul/store/c++/build-project-QT5_6_1-Debug/project...
    libva info: VA-API version 0.39.2
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
    libva info: Found init function __vaDriverInit_0_39
    libva info: va_openDriver() returns 0
    QMediaPlayer::PlayingState
    /home/paul/store/c++/build-project-QT5_6_1-Debug/projectexited with code 0
    

    gst-inspect-1.0 | grep 264 :

    libav:  avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
    libav:  avmux_ipod: libav iPod H.264 MP4 (MPEG-4 Part 14) muxer
    videoparsersbad:  h264parse: H.264 parser
    x264:  x264enc: x264enc
    vaapiparse:  vaapiparse_h264: H.264 parser
    vaapi:  vaapiencode_h264: VA-API H.264 encoder
    typefindfunctions: video/x-h264: h264, x264, 264
    rtp:  rtph264depay: RTP H264 depayloader
    rtp:  rtph264pay: RTP H264 payloader
    

    any ideas?

    1 Reply Last reply
    0
    • pauleddP Offline
      pauleddP Offline
      pauledd
      wrote on last edited by
      #2

      problem solved (so far) by uninstalling the gst-plugins-vaapi-0.7.0. Videofile plays now correctly.

      ? 1 Reply Last reply
      0
      • pauleddP pauledd

        problem solved (so far) by uninstalling the gst-plugins-vaapi-0.7.0. Videofile plays now correctly.

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @pauledd Hi! Please mark your threads as solved by using the "topic tools" button instead of adding [solved] or something to the title, as described here: http://forum.qt.io/topic/62700/hitchhiker-s-visual-guide-to-the-qt-forum.
        Cheers!

        1 Reply Last reply
        0
        • Dilip122D Offline
          Dilip122D Offline
          Dilip122
          wrote on last edited by
          #4

          I am having exactly the same issue but I could not found any gst-plugins-vaapi.
          Please help being specific.Thanks.

          1 Reply Last reply
          0
          • Dilip122D Offline
            Dilip122D Offline
            Dilip122
            wrote on last edited by
            #5

            I tried to remove gst-vaapi. Now the video plays but it is not hardware accelerated. I mean cpu usage is high now as compared to the command-line playback using gst-launch-1.0.
            I need hardware acceleration as well.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              chris_m
              wrote on last edited by chris_m
              #6

              Don't think this is solved, uninstalling gst-plugins-vaapi is a workaround at best.

              Bug:
              Qt Multimedia GStreamer backend doesn't support HW-accelerated video decoding
              https://bugreports.qt.io/browse/QTBUG-23761

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved