Binaries for Hardware Accelerated Qt Multimedia Backend on Raspberry Pi (4.4.0)

This is a package containing binaries for PiOmxTextures 4.4.0. The relevant improvements here over 4.3.0 are:

  • Fixed horizontal tearing effect.
  • Fixed leaks when starting/stopping and restarting video.
  • Added support for 3.5mm analog audio output. It is now possible to select which one to use (hdmi, analog or both) by setting a AUDIO_OUT env variable (possible values are both, local and hdmi; default: hdmi).
  • Fixed garbage at the beginning of the video.
  • Merged code from omxplayer code base to revision 74aac. This includes update to ffmpeg 2.6.
  • Other minor fixes and improvements.
  • Port to Qt 5.4.1.

The package contains:

  • piomxtextures_pocplayer: sample player which includes tests for animations, loops and commands. Have a look at the sources to understand how it works.
  • Qt-rasp-5.4.1.tar: the entire tree of Qt 5.4.1 binaries built for Raspbian (firmware
       b71d7b6, rpath is set to /usr/local/Qt-rasp-5.4.1).
  • Qt-rasp-5.4.1_host.tar: the utility to be used on the host when cross-building (built for x86 Kubuntu 13.10).

Current version of the package is 4.4.0: download.

To have a quick look, just place Qt-rasp-5.4.1 in /usr/local into your Pi. Now you can test running qmlvideo, qmlvideofx or piomxtextures_pocplayer from the Qt Multimedia examples. Something similar to this should come up:

To build using the host tools:

  1. Place the Qt libs provided in /usr/local in your Pi filesystem.
  2. Place the sysroot of your Pi into /opt/rpi/sysroot (you should then have Qt libs into /opt/rpi/sysroot/usr/local/Qt-rasp-5.4.1).
  3. Place the host tools in /usr/local.
  4. Place the Linaro toolchain (https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian) in /opt/rpi (which means you should have /opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian).
  5. You should be done. 

I tested on a Ubuntu 15.04 64 bit and the procedure worked, just be sure to use the 64 bit toolchain (in the same position) and add compatibility libs (qmake is a 32 bit binary).

Bye! 😉

NOTE: Please note that the provided binaries contain both the gstreamer plugin (the default unaccelerated Qt multimedia plugin) and the PiOmxTexures (POT) plugin. You’ll have to ensure that your app uses POT to run and not gstreamer. To avoid confusion, you can simply remove (or move away) the gstreamer plugin from the default path (/usr/local/Qt-rasp-5.4.1/plugins/mediaservice).

77 thoughts on “Binaries for Hardware Accelerated Qt Multimedia Backend on Raspberry Pi (4.4.0)”

  1. lrzip is too heavy for the Pi, it requires much ram. Decompress and extract on your PC and then copy the files to your Pi in the proper destination directory.

  2. can you please give me the direct download link to Qt-rasp-5.4.1.tar and Qt-rasp-5.4.1_host.tar

  3. the command finally worked i have installed lrzip and have been trying to decompress the file for over 8 hours but my raspberry pi keeps freezing on either 40 or 70%. i have 3 gb free on my pi is it because i dont have enough space?

  4. if im cross compiling an application using visual gdb will i STILL need a toolchain to open that .exe file on pi? (im sorry if was a really dumb question) , as this link is broken: "git clone git://gitorious.org/cross-compile-tools/cross-compile-tools.git" and its the only link given on every site that i have searched to install qt 5.0 on my raspberry pi i am stuck and i really have no idea what i should do.

    i do have qt 4.8 installed on my pi but there arent any qtmultimedia libraries for that version on raspberry pi. if you know of any way i would appreciate the help.

  5. That guide seems to also build Qt itself. You don't need that as I provided it. However you'll still need a proper toolchain to build an application.

  6. I tried installing qt5.0 using this link:
    http://wiki.qt.io/RaspberryPi_Beginners_Guide but in this guide the link "git clone git://gitorious.org/cross-compile-tools/cross-compile-tools.git" seems to be broken. So Now I am directly installing qt5.4.1 from the package you have given above.
    Shall I be facing any problems as I don't have qt 5.0 installed or will the package you provided be sufficient???

  7. my problem is this: i use sudo apt-get install lrzip it doesnt work says aborted. i have the command to unzip and untar but how can i until i get lrzip installed.

  8. If you are not able to google for lrunzip you'll probably be stuck forever…
    lrunzip the file so you'll get an uncompressed tar file. After that, do what anyone else does to untar a tar archive. You'll get what is inside. Commands used a lrunzip and tar.

  9. i cant even extract the zipped file thats why i asked if i was installing it correctly. i seem to be doing something wrong because it just wont recognize the commands im using. i dont even know if after installing qt on pi the code i wrote will work correctly. i have been looking for a proper way for ages and the only relevant site i found was your blog. but im stuck on suck minor issues ::( please do reply

  10. i have set my default audio device as a usbsoundcard and written a code on qt 5.4.1 windows for reading audioinput from a mic and playing it using qaudiooutput. it works fine on windows once i download qt 5.4 on my pii will i need to make changes to the code i wrote originally?

  11. how do i unzip these files when i download lrzip using sudo apt-get install lrzip it install correctly then when i use the command lrzuntar filenam.tar.lrz it says "no such commands exists"

  12. Hi Carlon, where am I find PiOmxTextures shared object files for this binaries? ya will I need to compiled PiOmxTextures for this binaries?

  13. I set gpu_mem = 128 and it worked for some seconds than I paused the video and when start again it stopped. I had increased that value to the max value and no luck again 🙁

  14. Last time I tried QtWebKit on Pi was at least an year ago. I remember there was a crash when a color depth < 24 was used. You can find an article on this blog. Not sure if that helps.

  15. I've also tried running the webkitqml/flickrview example in the binaries but I get the same WARNING message and nothing loads in the browser.

    Have you tried this before?
    Is there any suggestion you can give me in order to get QtWebKit running in the same tool as the piomxtextures player?

    Again thanks a lot!

  16. I've also tried running the webkitqml/flickrview example in the binaries but I get the same WARNING message and nothing loads in the browser.

    Have you tried this before?
    Is there any suggestion you can give me in order to get QtWebKit running in the same tool as the piomxtextures player?

    Again thanks a lot!

  17. Thanks a lot for this amazing job you've done, it has been a life saver for me. I'm quite new in c++ programming and I'm trying to develop a player with an overlay transparent web page to run in my rasp 2.

    I have been able to compile your source code of the piomxtextures_pocplayer and play around with it successfully. The next step I'm trying to accomplish is to add an overlay with QtWebKit on top of the player and I did this by adding a couple of lines in the main.qml:
    > #import QtWebKit 3.0
    >Rectangle {
    > …
    > WebView {
    > url: "http://www.google.com&quot;
    > x: 100
    > y: 100
    > width: 150
    > height: 90
    > }
    > …
    >}

    But i get the following WARNING: WARNING: The web process experienced a crash on 'http://www.google.com/&#39;.

    And the web page doesn't render, I see the video playing perfectly but no web page.

  18. 20:50:06.209 VERBOSE: Opening qrc:///home/pi/big_buck_bunny_1080p_surround.avi…
    20:50:06.248 ERROR: Failed to open source.
    20:50:06.250 VERBOSE: Processing post play()…
    20:50:06.252 DEBUG: Entering: void OpenMAXILPlayerControl::playInt().
    20:50:06.253 VERBOSE: Play
    20:50:06.255 VERBOSE: Cleaning textures…

  19. unfourtenly no luck

    —————-
    20:35:08.716 INFORMATION: Showing media: /home/pi/big_buck_bunny_1080p_surround.avi.
    20:35:08.722 VERBOSE: Can't find extension for .
    20:35:08.723 VERBOSE: Can't find extension for image/jp2.
    20:35:08.725 VERBOSE: Can't find extension for image/vnd.microsoft.icon.
    20:35:08.726 VERBOSE: Can't find extension for image/x-dds.
    20:35:08.728 VERBOSE: Can't find extension for image/x-icns.
    20:35:08.729 VERBOSE: Can't find extension for image/x-mng.
    20:35:08.731 VERBOSE: Can't handle this media, sorry.
    —————-

  20. piomxtextures_pocplayer sample in archive work fine.
    If I try do play, that no luck too 🙁

    20:18:09.716 VERBOSE: Can't handle this media, sorry.

    —————————————-
    ./pio_poc –play /home/pi/VID_20140204_162554.mp4
    QML debugging is enabled. Only use this in a safe environment.
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    20:18:07.533 VERBOSE: Instantiating player service…
    20:18:07.535 VERBOSE: Instantiating QMediaService…
    20:18:07.541 DEBUG: Entering: OpenMAXILPlayerControl::OpenMAXILPlayerControl(QObject*).
    20:18:07.544 VERBOSE: Metadata update requested.
    Requesting control for org.qt-project.qt.metadatareadercontrol/5.0…
    Requesting control for org.qt-project.qt.mediaavailabilitycontrol/5.0…
    Requesting control for org.qt-project.qt.mediaplayercontrol/5.0…
    20:18:07.552 DEBUG: Entering: virtual void OpenMAXILPlayerControl::setMediaPlayer(QMediaPlayer*).
    Requesting control for org.qt-project.qt.medianetworkaccesscontrol/5.0…
    20:18:07.556 DEBUG: Entering: virtual QMediaPlayer::State OpenMAXILPlayerControl::state() const.
    20:18:07.557 DEBUG: Entering: virtual QMediaPlayer::MediaStatus OpenMAXILPlayerControl::mediaStatus() const.
    20:18:07.558 DEBUG: Entering: virtual QMediaPlayer::MediaStatus OpenMAXILPlayerControl::mediaStatus() const.
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    20:18:07.813 DEBUG: MetaData request for key: Title.
    20:18:07.815 DEBUG: MetaData request for key: SubTitle.
    20:18:07.816 DEBUG: MetaData request for key: Author.
    20:18:07.818 DEBUG: MetaData request for key: Date.
    20:18:07.820 DEBUG: MetaData request for key: AlbumTitle.
    20:18:07.822 DEBUG: MetaData request for key: AlbumArtist.
    Requesting control for org.qt-project.qt.videorenderercontrol/5.0…
    20:18:07.976 DEBUG: Entering: virtual void OpenMAXILVideoRendererControl::setSurface(QAbstractVideoSurface*).
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    20:18:09.090 DEBUG: Renderer thread is: 0x1c4e4a8.
    20:18:09.712 INFORMATION: Showing media: –play.
    20:18:09.716 VERBOSE: Can't handle this media, sorry.
    20:18:09.803 VERBOSE: Can't find extension for .
    20:18:09.805 VERBOSE: Can't find extension for image/jp2.
    20:18:09.807 VERBOSE: Can't find extension for image/vnd.microsoft.icon.
    20:18:09.809 VERBOSE: Can't find extension for image/x-dds.
    20:18:09.812 VERBOSE: Can't find extension for image/x-icns.
    20:18:09.814 VERBOSE: Can't find extension for image/x-mng.
    ————

  21. Yes, problem was in path. I have different sysroot folder location and after created symlink from my sysroot location directory to /opt/rpi/sysroot Qt tool added fine. But I faced with other problem. I open as project only for piomxtextures_pocplayer directory and cross-compile is OK. But I get black screen and no more 🙁 .
    ——–Qt App Output——————————————
    QML debugging is enabled. Only use this in a safe environment.
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    18:16:41.289 VERBOSE: [0;37mInstantiating player service… [0m
    18:16:41.290 VERBOSE: [0;37mInstantiating QMediaService… [0m
    18:16:41.296 DEBUG: [0;34mEntering: OpenMAXILPlayerControl::OpenMAXILPlayerControl(QObject*). [0m
    18:16:41.298 VERBOSE: [0;37mMetadata update requested. [0m
    Requesting control for org.qt-project.qt.metadatareadercontrol/5.0…
    Requesting control for org.qt-project.qt.mediaavailabilitycontrol/5.0…
    Requesting control for org.qt-project.qt.mediaplayercontrol/5.0…
    18:16:41.304 DEBUG: [0;34mEntering: virtual void OpenMAXILPlayerControl::setMediaPlayer(QMediaPlayer*). [0m
    Requesting control for org.qt-project.qt.medianetworkaccesscontrol/5.0…
    18:16:41.308 DEBUG: [0;34mEntering: virtual QMediaPlayer::State OpenMAXILPlayerControl::state() const. [0m
    18:16:41.309 DEBUG: [0;34mEntering: virtual QMediaPlayer::MediaStatus OpenMAXILPlayerControl::mediaStatus() const. [0m
    18:16:41.310 DEBUG: [0;34mEntering: virtual QMediaPlayer::MediaStatus OpenMAXILPlayerControl::mediaStatus() const. [0m
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    18:16:41.536 DEBUG: [0;34mMetaData request for key: Title. [0m
    18:16:41.538 DEBUG: [0;34mMetaData request for key: SubTitle. [0m
    18:16:41.540 DEBUG: [0;34mMetaData request for key: Author. [0m
    18:16:41.541 DEBUG: [0;34mMetaData request for key: Date. [0m
    18:16:41.543 DEBUG: [0;34mMetaData request for key: AlbumTitle. [0m
    18:16:41.544 DEBUG: [0;34mMetaData request for key: AlbumArtist. [0m
    Requesting control for org.qt-project.qt.videorenderercontrol/5.0…
    18:16:41.685 DEBUG: [0;34mEntering: virtual void OpenMAXILVideoRendererControl::setSurface(QAbstractVideoSurface*). [0m
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    18:16:42.767 DEBUG: [0;34mRenderer thread is: 0x1bd3780. [0m
    18:16:43.409 VERBOSE: [0;37mCan't find extension for . [0m
    18:16:43.411 VERBOSE: [0;37mCan't find extension for image/jp2. [0m
    18:16:43.413 VERBOSE: [0;37mCan't find extension for image/vnd.microsoft.icon. [0m
    18:16:43.414 VERBOSE: [0;37mCan't find extension for image/x-dds. [0m
    18:16:43.415 VERBOSE: [0;37mCan't find extension for image/x-icns. [0m
    18:16:43.416 VERBOSE: [0;37mCan't find extension for image/x-mng. [0m
    ———–End————————

  22. Again seems related to the paths, but I don't remember seeing that. All I can say is to use the paths I wrote before and ensure qmake.conf has proper permissions.

  23. I located hots directory in /usr/local and /mnt/raspi-rootfs/usr/local. Also I add to Qt Kit mkspec as /usr/local/Qt-rasp-5.4.1/mkspecs/devices/linux-rasp-pi-g++. That fix privios error but I get new error message:
    ——————–
    Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=
    Could not read qmake configuration file /usr/local/Qt-rasp-5.4.1/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
    Error while parsing file /home/myuser/git/pi/piomxtextures_pocnplayer/piomxtextures_pocplayer.pro. Giving up.
    ——————–
    I think all problem in Qt Version settings. If I choose qt 5.5.0 error is gone, but project compiling without PiO multimedia plugins.

    My be you have idea how can properly configure Qt version from you binary host deirectory?

  24. I read the Qt documentation and add the Kit to Build & Run settings section. But when I add a Qt version, I get error: "Qt version not properly installed". When I try open piomxtextures_pocplayer project I get following error:
    ———————
    Could not find qmake configuration file devices/linux-rasp-pi-g++.
    Error while parsing file /home/myuser/git/pi/piomxtextures_pocplayer/piomxtextures_pocplayer.pro. Giving up.
    Could not find qmake configuration file devices/linux-rasp-pi-g++.
    Error while parsing file /home/myuser/git/pi/piomxtextures_pocplayer/piomxtextures_pocplayer.pro. Giving up."
    —————————————-

    Please could you explain whats I do wrong? :((

  25. I'm beginner in Qt and I need develop my app with qml hw video rendering. I downloaded archive and test sample. Sample working fine. But I don't understand how to configure host for cross compiling. I'm configure Qt according guide on Qt site (Rpi Cross-compilling guide). Could you explain how include/configure Qt-rasp-5.4.1_host (my OS Linux Mint 17.1 x64)?

  26. Hi Luca,
    Yestarday was a bad day… Sorry for my explanation.
    Generally, I like to build me self qt package (just for customization). If I build your library on a development Pi, could I used on a clean Raspbian image by moving only the generated "*.so" files? Just like we do with the Qt libraries en case we want to deploy on another Pi.
    Hope it's clear now.

    As always, thanks for your great job!
    Regards!

  27. I also get the color reduction problem, especially visible on background gradient.
    I don't have this problem using omxPlayer using the exact same video file.
    (btw, you code delivers a better framerate and no tearing).
    Any idea?

  28. No problemo, so you use cross-compilation when targetting the Raspberry Pi?
    I'd actually like to debug directly on the RPi itself.

  29. Hi,
    I could successfully use your binaries to make performance testing before investigating the code, and since you provided the whole Qt 5.4.1 dev tree, I'd like to use it to compile the Qt examples myself.
    I installed QtCreator on my Raspberry Pi 2 + Raspbian, but I can't get it to accept Qt 5.4.1 version because it seems to miss qmake binary…
    Did you succeed in building directly on the Raspberry or did you always use cross-compilation?
    Cheers

  30. You don't seem to be opening any file at all… Are you sure you're actually seeing a video?
    Provide a URI as the first param of the piomxtextures_pocplayer command. Or access the control bar clicking the down arrow on your keyboard or clicking with the mouse button on the surface.

  31. Hi. I have a problem with hardware acceleration on my Raspberry Pi
    I made everything from this post, but my video files still lagging (about 0-2 fps)

    Here is output of the programm:
    pi@raspberrypi ~/Desktop/QtApp $ ./piomxtextures_pocplayer
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    15:28:52.651 VERBOSE: Can't find extension for .
    15:28:52.652 VERBOSE: Can't find extension for image/jp2.
    15:28:52.654 VERBOSE: Can't find extension for image/vnd.microsoft.icon.
    15:28:52.655 VERBOSE: Can't find extension for image/x-dds.
    15:28:52.656 VERBOSE: Can't find extension for image/x-icns.
    15:28:52.657 VERBOSE: Can't find extension for image/x-mng.
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged

  32. I'm really impressed how this project has been improved in few month. Thank you very much for making this bigger everyday.
    I suggest you make an application as programmer at Digia ;).

  33. yeah, i just figured it out, deleting the file /usr/local/Qt-rasp-5.4.1/plugins/mediaservice/libgstmediaplayer.so fixed it. However how to correctly instruct QT to use libopenmaxilmediaplayer.so?
    (deleting the comment in the wrong branch)

  34. Hi, i'm trying to test the provided binaries and i have no luck making it work. (I am going to compile it anyway but I want to check the speed with your bineries and mine compiled version, just to make sure i didnt screw something up). I run the POC player and i get this:

    ./piomxtextures_pocplayer –loop /home/pi/video.mp4
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).

    (piomxtextures_pocplayer:2188): GStreamer-CRITICAL **: gst_object_ref_sink: assertion 'GST_IS_OBJECT (object)' failed
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged

    (piomxtextures_pocplayer:2188): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
    QDeclarativeAudio::itemChange
    QMediaPlayer::onItemChanged
    21:48:21.652 INFORMATION: /home/pi/video.mp4 added to the playlist.
    21:48:21.656 INFORMATION: Play count: 1.
    21:48:21.658 INFORMATION: Opening video file: /home/pi/video.mp4

    a white scree and nothing happens. Also when i try to open a file with media – clicking on it produces no result. Any ideas?
    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *