Saturday, March 19, 2016

Binaries for Hardware Accelerated Qt 5.6.0-rc1 Multimedia Backend on Raspbian Jessie Lite (POT 5.2.2)

This is a new build including a video probe to monitor frames being rendered. I also included a plugin to access video probe functionalities from QML. You can use it like this:

POT_VideoProbe {
   source: mediaPlayer
   onVideoFrameProbed: console.log("Frame probed!")
}

where mediaPlayer is an element of type MediaPlayer. Modifying the frame is not probably possible at the moment.
Have fun! Bye ;-)

Download PiOmxTextures 5.2.2 for Raspbian Jessie Pi2 here (extraction code is: 2bd6, md5:
   8be82eee7498e63e63ecbe17cb3eb7ef).

29 comments:

  1. Hi

    I have cross-compiled my application, but when I run it on RPi I get: "EGL Error : Could not create the ego surface : error = 0x300b". Do you know why I get this error ?

    thanks
    Bogdan

    ReplyDelete
    Replies
    1. Is a minimal app working? Are the samples in the repo working?

      Delete
  2. Actually is an older version of piomxtextures_pocplayer. I see that you set shared openGL context to true

    QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
    QGuiApplication app(argc, argv);

    ReplyDelete
    Replies
    1. Older? Use the same version provided in the package.

      Delete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Hello.
    I'm having problem with your test application.
    I'm running ./piomxtextures_pocplayer /home/pi/POT/big_buck_bunny_480p_h264.mov and the application looks like it is working properly but no video is displayed.
    Tested the same video with omxplayer and it works..

    Can you help me?

    ReplyDelete
    Replies
    1. Click with the mouse and the control bar should appear. It does not start immediately because I always forget to add autostart.

      Delete
  5. Thanks for the response, but it's not it.
    It still doesn't display anything even when I press "Play/Pause".
    I can see that the "Buffer created " and progress bar is moving from left to right, but that's it. Screen is black.
    Here you can see the console log: https://gist.github.com/lewicki-pk/56d77b5bf6d7c1ccd2a5acfe0e0c52eb

    Any idea?

    ReplyDelete
    Replies
    1. Ah there was someone else reporting the same problem, very weird. I used this build recently on a new Pi but I had no issue. Logs seem perfectly normal. Are you using Jessie? Did you update to the latest available firmware?

      Delete
  6. I am using Jessie (not Lite, but regular). After I wrote to you I have also checked with other videos (from www.sample-videos.com) and they work properly, but one other video (which I used for testing) did not. This really is weird. (BTW. Great project!)

    ReplyDelete
  7. Hi,
    As always, I like to compile my self every new release.
    Just after running "make" on the "piomxtextures_src" folder I get this error:
    "piomxtextures_src/omxplayer_lib/DllSwResample.h:41:42: fatal error: libswresample/swresample.h"

    I have made the compilation on my old Wheezy image, which do not have any missing dependency (at least, it works well last time I compile your project).
    Do you have suggestion/hint?
    Thanks,

    ReplyDelete
    Replies
    1. Seems not a complete error line... maybe you are missing ffmpeg?

      Delete
    2. I have run the compile_ffmpeg.sh successfully.

      The complete line is this:

      In file included from /home/atron/opt/pi/piomxtextures_src/omxplayer_lib/OMXAudioCodecOMX.h:27:0,
      from /home/atron/opt/pi/piomxtextures_src/omxplayer_lib/OMXPlayerAudio.h:35,
      from /home/atron/opt/pi/piomxtextures_src/omx_playeraudio.h:30,
      from /home/atron/opt/pi/piomxtextures_src/omx_mediaprocessor.cpp:38:
      /home/atron/opt/pi/piomxtextures_src/omxplayer_lib/DllSwResample.h:41:42: fatal error: libswresample/swresample.h: No such file or directory
      compilation terminated.
      make[1]: *** [omx_mediaprocessor.o] Error 1
      make[1]: *** Waiting for unfinished jobs....
      make[1]: Leaving directory `/home/atron/opt/pi/piomxtextures_qt_driver/mediaplayer'
      make: *** [sub-mediaplayer-make_first] Error 2

      Delete
    3. Well, I have just realized that something strange happens when I run "make" on the drivers folder. This message is shown:

      Project MESSAGE: Building for RPi1...
      WARNING: Cannot open substitute for output '/mnt/rpi/usr/local/qtrpi/lib/cmake/Qt5Multimedia/Qt5Multimedia_OpenMAXILPlayerServicePlugin.cmake'

      I don't known why it says "Building for RPi1..." when I have specified set
      "prepare_3rdparty.sh ~/opt/qt5 pi2".

      Delete
    4. No idea sorry. I don't even have that cmake file. Your env seems different so no idea.

      Delete
    5. No problem. I will try it with a fresh image.
      Thanks!

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

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

      Delete
  8. Hello!
    I tried to install POT 5.2.2 and I faced with problem:

    pi@raspberrypi:~/PiOmxTextures_5.2.2_pi2_jessiel_5.6.0-rc1 $ /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "video1.mp4" video_simple.qml
    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).
    qt.qpa.input: X-less xkbcommon not available, not performing key mapping
    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"


    The same error when I run:
    /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "video1.mp4" video_simple.qml

    pi@raspberrypi:~/PiOmxTextures_5.2.2_pi2_jessiel_5.6.0-rc1 $ /usr/local/Qt-rasp2-5.6.0-rc1/bin/qmlscene "video1.mp4" video_sile.qml
    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).
    qt.qpa.input: X-less xkbcommon not available, not performing key mapping
    defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"



    I use clear Raspbian 2016-05-10-raspbian-jessie-lite from https://www.raspberrypi.org/downloads/raspbian/

    ReplyDelete
    Replies
    1. I setted up

      export QT_DEBUG_PLUGINS=1

      and found this:
      Got keys from plugin meta data ("org.qt-project.qt.mediaplayer")
      QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/PiOmxTextures_5.2.2_pi2_jessiel_5.6.0-rc1/mediaservice" ...
      loaded library "/usr/local/Qt-rasp2-5.6.0-rc1/plugins/mediaservice/libopenmaxilmediaplayer.so"
      QLibraryPrivate::loadPlugin failed on "/usr/local/Qt-rasp2-5.6.0-rc1/plugins/mediaservice/libopenmaxilmediaplayer.so" : "Cannot load library /usr/local/Qt-rasp2-5.6.0-rc1/plugins/mediaservice/libopenmaxilmediaplayer.so: (libsmbclient.so.0: cannot open shared object file: No such file or directory)"
      defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
      QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-rasp2-5.6.0-rc1/plugins/accessible" ...
      QFactoryLoader::QFactoryLoader() checking directory path "/home/pi/PiOmxTextures_5.2.2_pi2_jessiel_5.6.0-rc1/accessible" ...

      Delete
    2. After fixing problems with dependencies problem solved

      Delete
  9. Hello Luca, can you tell is OMXCameraSurface element working and bugfree ?

    ReplyDelete
    Replies
    1. Worked in the past. But I discontinued that part for the moment.

      Delete
    2. Thanks, maybe you can advise how can I show live feed from camera in my qml application?

      Delete
    3. You can try gstreamer. Was working more or less.

      Delete
    4. My binaries include gstreamer support for Qt. You can use the camera plugin which is included.

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

    ReplyDelete
  11. Hi,
    I've deleted my previous post in order to add more information.
    After compiling the qtmultimedia module I've built the piomxtextures_qt_driver and rsync.
    Then, when I tested the video feature I got this:

    (videotest:835): GStreamer-CRITICAL **: gst_object_ref_sink: assertion 'GST_IS_OBJECT (object)' failed
    (videotest:835): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed

    So, I decided to remove all the gstreamer lib from the plugins folder. After that I get this:

    08:40:05.370 INFO: POT build Jun 11 2016 04:26:25.
    08:40:05.376 INFO: Initializing GPU context in media processor...
    bash: line 1: 1297 Segmentation fault DISPLAY=':0.0' /opt/videotest/bin/videotest
    Application finished with exit code 139.

    I first impressions are that I do not build the project correctly. What I am doing wrong?
    Thanks,

    ReplyDelete
    Replies
    1. God damm it...
      I missed that. Sorry.

      QGuiApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
      QGuiApplication app(argc, argv);

      Delete