Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to render 1080p video on Raspberry3 with qml mutimedia
Qt 6.11 is out! See what's new in the release blog

How to render 1080p video on Raspberry3 with qml mutimedia

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 2.8k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    ascnp
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      modjo756
      wrote on last edited by
      #2

      To use GPU on raspberry with Qt, use this : carlon lucas
      You can download a functionnal image here : link text

      ? A 2 Replies Last reply
      1
      • M modjo756

        To use GPU on raspberry with Qt, use this : carlon lucas
        You can download a functionnal image here : link text

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

        @modjo756 Hey, cool! Have you tried this, I mean: Does it actually work? :-)

        1 Reply Last reply
        1
        • M Offline
          M Offline
          modjo756
          wrote on last edited by
          #4

          Yes i use it on my rasp and it work fine and the amazing guy that make it listen our problem ... I advice it for all that want to use qt on a raspberry !!!

          ? 1 Reply Last reply
          1
          • M modjo756

            Yes i use it on my rasp and it work fine and the amazing guy that make it listen our problem ... I advice it for all that want to use qt on a raspberry !!!

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

            @modjo756 Awesome! Big thanks for that hint!

            1 Reply Last reply
            2
            • M modjo756

              To use GPU on raspberry with Qt, use this : carlon lucas
              You can download a functionnal image here : link text

              A Offline
              A Offline
              ascnp
              wrote on last edited by
              #6

              @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.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                modjo756
                wrote on last edited by
                #7

                Why you don't use his image to test ? For the rest if he said to use a qt version >5.5 i can't contradict him !

                A 1 Reply Last reply
                0
                • M modjo756

                  Why you don't use his image to test ? For the rest if he said to use a qt version >5.5 i can't contradict him !

                  A Offline
                  A Offline
                  ascnp
                  wrote on last edited by
                  #8

                  @modjo756
                  ye..I find that. I'm going to rebuild my qt now.

                  My QT version is 5.4.1, can I use his image? I mean will the different version of QT cause any problem?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    modjo756
                    wrote on last edited by
                    #9

                    His image contains raspbian lite + binaries for qt5.7 cross compile. You have just to burn the image on sd card and configure your host with raspberry toolchain to cross compile ....

                    A 1 Reply Last reply
                    0
                    • M modjo756

                      His image contains raspbian lite + binaries for qt5.7 cross compile. You have just to burn the image on sd card and configure your host with raspberry toolchain to cross compile ....

                      A Offline
                      A Offline
                      ascnp
                      wrote on last edited by
                      #10

                      @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.

                      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