How to render 1080p video on Raspberry3 with qml mutimedia
-
Hi,
I'm trying to rendering 1080p video on Raspberry 3. I'm using Qt5.4.1 with gstreamer0.10, and here is my code.import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtMultimedia 5.0
import QtQuick.Layouts 1.1
Rectangle {
property string source
id:mediarect
width:320
height:240
anchors.fill:parent
color: "transparent"
MediaPlayer {
id: mediaPlayer
source: mediarect.source
autoPlay: true
loops: MediaPlayer.Infinite
}
VideoOutput {
id: video
anchors.fill: mediarect
anchors.left: parent.left
anchors.leftMargin: 0
anchors.right:parent.right
anchors.rightMargin: 0
source: mediaPlayer
}}
The problem is that it seems only use CPU, so when rendering 1080p video, my Raspberry pi is struggling ,the video is awful and CPU usage is up to 100%.
It seems that I do not use the hardware accelaration.So does anybody know how to use Raspberry pi GPU hardware accelaration?
btw, I heard that gstreamer1.0 or gst-omx can solve the problem, but I don't know how to choose gstreamer1.0 as backend. -
@modjo756
Thanks for your reply. I am trying his POT now, but when I building POT component, I get an error"make[2]: *** [omx_videosurfaceelement.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/lxy/Downloads/qt+omx/piomxtextures_src/omx_camerasurfaceelement.cpp:44:21: fatal error: libv4l2.h: No such file or directory
compilation terminated.
Makefile:5006: recipe for target 'omx_camerasurfaceelement.o' failed
make[2]: *** [omx_camerasurfaceelement.o] Error 1
make[2]: Leaving directory '/home/lxy/Downloads/qt+omx/openmaxil_backend/3rdparty/build-PiOmxTextures/piomxtextures_qt_driver/mediaplayer'
Makefile:42: recipe for target 'sub-mediaplayer-make_first' failed
make[1]: *** [sub-mediaplayer-make_first] Error 2
make[1]: Leaving directory '/home/lxy/Downloads/qt+omx/openmaxil_backend/3rdparty/build-PiOmxTextures/piomxtextures_qt_driver'
Makefile:73: recipe for target 'sub-piomxtextures_qt_driver-make_first' failed
make: *** [sub-piomxtextures_qt_driver-make_first] Error 2
"Luca says it is maybe caused by QT version. My qt version is 5.4.1, he says it should be >5.5. So what should I do?
I find that he test his ffmpeg in qt 5.4.0, but not declare the POT request QT version. And he also says after 5.1.0, we do not need to patch qmultimedia patch, which means POT can build on the QT which version is at least >5.1.0. But why now it should be >5.5? Do you know how to deal with it? I realy realy realy don't want to rebuild my Qt. Cause you know it is a rough and awful experience.
-
@modjo756
Thanks for your reply.
I have tried to built his POT for this two month.. But still failed.
You said he has a raspbian lite with qt5.7 already cross-compiled? Really? Could you please provide the link to download that raspbian lite? I would be really appreciated if it works! I am almost giving up and almost trying to change the board.