Using POT Builds

As many have troubles building POT from sources I also try to provide builds. Each build contains Qt libs and POT (which includes also ffmpeg internally). This article explains quickly how to use Qt + POT builds and integrate into your image. It is actually pretty simple: I’ll start from a clean Raspbian on Raspberry Pi 2. The Raspbian version for which the builds are supposed to work is always the latest one at the time of the publication.

Installing POT on a Running Device and Test

  1. Uncompress the archive and copy the Qt build into your Pi in /usr/local. Do not rename it as rpath is set.
  2. If provided, copy qtdeps into your Pi, wherever you want.
  3. Copy piomxtextures_pocplayer into your Pi, wherever you want. You’ll need this only if you want to test it. Not needed when you’ll run your application.
  4. Copy all the samples in the samples directory if you want to test those.
  5. Assign more RAM to the GPU (do this using the Pi config tool or by setting gpu_mem in /boot/config.txt to 256MB).
  6. Into your Pi add the qtdeps/lib path to the dynamic linker search path. You can do this by setting the LD_LIBRARY_PATH to that directory or by adding it to the /etc/ and running ldconfig.
  7. Now all the deps should be ok and you can try to run a sample app. Let’s start from the C++ POCPlayer:
    1. ./piomxtextures_pocplayer /some/abs/path
  8. You can also try using qmlscene. Try for instance the simple video_position.qml:
    1. /usr/local/Qt-rasp2-5.5.0/bin/qmlscene video_simple.qml file:///…/

You can also change the paths if you want, but you’ll have to see if everything keeps working or adapt the procedure for that.


There are a few features that are not available in Qt API (at least not that I know). You can control these features with env variables before running your app (changing those dynamically is not possible, but it is simple to implement if you want to contribute). These are the variables:

  • POT_HALF_FRAMERATE_MODE: if set to 1 the number of frames sent to the renderer are halved. This is needed mostly when using deinterlacing.
  • POT_TEXTURE_COUNT: number of texture to be used when buffering. Default is 4.
  • POT_DEINTERLACE_MODE: the type of deinterlacing; 0 means off, 1 means auto and 2 means on.
  • POT_DEINTERLACE_QPU: 0 or 1; indicates whether to use the QPU for deinterlacing.
  • AUDIO_OUT (I’ll soon add POT_AUDIO_OUT; AUDIO out will probably remain for backward compatibility): you can use this to set the audio output to use:
    • hdmi means output to HDMI;
    • local means output to headphones;
    • both means… well both the above;
    • default is HDMI.

Building Your Own App

You can use the Qt build to build your own app. To do this place your sysroot into /opt/rpi/sysroot and the Raspbian toolchain in /opt/rpi/gcc-linaro-arm-linux-gnueabihf-raspbian on your host and use the qmake command in /opt/rpi/sysroot/usr/local/Qt-rasp(2)-5.5.0/bin to build your application.

[More details to come for this]

Leave a Reply

Your email address will not be published.