Sunday, March 19, 2017

Experimenting with Pi3 optimisations - POT 5.6.0-beta1 with Qt 5.8.0 built for armv8 with GCC 4.9.4

At the moment I still don't want to test custom firmwares or 64 bit arch builds, but I started to test a couple of new features: a new compiler from Linaro (the one provided by the foundation keeps giving me headaches), version 4.9.4 instead of 4.8, and optimised compiler flags for the Rapsberry Pi 3, which is an armv8.
In this build, Qt, ffmpeg and POT are all built with 4.9.4 Linaro toolchain and optimised compiler flags for Pi3. This will only work on Pi3.
You won't probably see much difference in GPU intensive apps, but it is a step on the road of optimisation!

Have fun! Bye! ;-)

Download the toolchain here.
Download POT 5.6.0-beta1 for Raspbian Jessie Lite Pi3 here (md5: 0eec41ef02e9369fc7e569030b8ff868).

20 comments:

  1. Great Job!!!

    Do you think that a cleat Qt build with last versions of gstreamer with IMX pluin (debian testing 2017 packages) can be good enought to implement a video software using Qt QML LGPL ?



    Have you a comercial license (non GPL) for POT?

    Regards
    Miguel

    ReplyDelete
    Replies
    1. Not sure what IMX plugin is.
      POT is GPL, but I think you can use it in commercial products, just do not distribute. The user must install after first boot.

      Delete
  2. Qt multimedia is based on gstreamer
    This is IMX plugin:
    https://github.com/Freescale/gstreamer-imx
    I will try last versions ...may be video suppoort is good enought for raspberry pi 3.

    POT is a fantastic work...but is GPL, so we can't use in comercial products (closed source)...

    QT/QML is LGPL, less restrictive

    ReplyDelete
    Replies
    1. i.MX 6? This article is related to Raspberry Pi, not i.MX 6.

      Delete
  3. sorry for my mistake, Luca...
    https://gstreamer.freedesktop.org/releases/gst-omx/1.0.0.html
    gstreamer OMX plugin, not imx :-)

    ReplyDelete
  4. Dear Luca,
    thank you very much for your great effort bringing HW accelerated Qt to the Raspberry!

    Unfortunatly I have 2 problems right now:

    1) Camera Module seems to not be present: defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.camera"

    2) When using QtWebEngine, the website (any) loads as expected, but I can not click on any link (mouseover also doesn't change to handshaped cursor)

    Both bugs do not appear in my application if I compile regular Qt following the Qt Raspi EGLFS guide. (But then of course QtMultimedia performance is really bad)

    Am I missing something?

    Thank you very much,
    André

    ReplyDelete
    Replies
    1. Hello,
      camera requires the proper plugin. You can build it. Also, look into the plugins directory, sometimes I build that as well.
      No idea for 2, sorry.
      Regards.

      Delete
    2. Ok, I will try to build it.
      Is this guide still valid?
      http://thebugfreeblog.blogspot.co.at/p/build-procedure-for-piomxtextures.html

      Seems a bit old, but I can not find another one.

      Do I understand it right, I first have to build Qt according to a crosscompile guide (https://wiki.qt.io/RaspberryPi2EGLFS)
      And then I apply your steps?

      Thank you very much!
      André

      Delete
    3. That is the latest guide I wrote. You need to build a regular Qt project depending on ffmpeg.

      Delete
    4. This comment has been removed by the author.

      Delete
    5. Dear Luca,

      I was following your project and https://github.com/Kukkimonsuta/rpi-buildqt helped me to get everything compiled for 5.8.
      However regarding qtwebengine I experience exactly the same behavior as André: I can load a page and navigate using SPACE, TAB and ENTER and even start youtube videos. But clicks and mouseover are not working in the web area.
      Did it work for you?

      Delete
    6. Not sure sorry. I'm not sure I ever used mouse interaction.

      Delete
  5. Luca, hi.
    How can i turn off warnings (not all - only video warnings)? Like: "One frame couldn't be shown.".
    And what does it means? My video is broken?

    ReplyDelete
    Replies
    1. It means the UI did not have the time to show one frame.
      You need to build the plugin disabling the macro for the warnings. You can find it in the logging header.

      Delete
  6. Hey, I don't know where to ask this, so I will try here: How can I programatically force the audio output (to local 3.5mm port) when using QML MediaPlayer with piOMXTextures backend ?

    ReplyDelete
    Replies
    1. Hello, there is an env variable you can use for that. Search that in old articles.

      Delete
  7. Hi Luca
    I am newbie and don't have much information about Linux/Unix ...
    I read your articles and get confused!
    I have just one RPi3 and i need to play video by qt program which i make it.
    My project has two section,one for playing in player(omxplayer or qtmultimedia),and other one for playing in web(by omx or qtwebengine or ...).
    Which article of your blog is suitable for me?!

    thanks

    ReplyDelete
    Replies
    1. You can use builds for the qtmultimedia driver on Raspbian (like the one on this page). Refer to the overview for an index: http://thebugfreeblog.blogspot.it/p/overview-of.html. For the web I never completed the implementation so you are on your own.

      Delete
  8. Yo! I have tested your lib on Rpi3 and it works perfectly, thanks man. Really nice job.
    But is it possible to use PoT on Raspberry Pi Zero? As far as I know Rpi0 can play FullHD video in 30 fps. Can I use precompiled binaries for it or what should I do to run Qt app with PoT on it?

    ReplyDelete
    Replies
    1. Precompiled binaries are built for armv7 or armv8. I guess zero is a armv6, so you need to build POT accordingly.

      Delete