qmediaplayer no video
-
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 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?
-
@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! -
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