ofVideoPlayer crashes/freezes on RPi2 (news from Ecuador)

Hi Pedro,

you will not see any output when running the gst-master script but you should be inside the gst environment after the execution. You can test it by running ~/gst/gst-master and then running env on the same shell session . You should see a bunch of GStreamer related environment variables set. You can then navigate to your application directory, run the app and it should pick the latest versions.


hi petros, yes thanks that works - very cool ! however the application doesnt run with the latest gstreamer so back to 14.4 ! good news is that it no longer gives the same error - now it complains about libva ! will post more detail in a little while …

hi arturo,

i have installed archlinux arm7 and followed exactly the installation steps from here (http://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started-archlinux/) but the compilation of openFrameworks fails due to rt audio.

i have tried installing rtaudio again - running libtool —finish /usr/lib that i hadnt run before - but the error remains.

/home/pi/openFrameworks/libs/openFrameworks/sound/ofRtAudioSoundStream.cpp:8:21: fatal error: RtAudio.h: No such file or directory
#include “RtAudio.h”

The installation also gives a series of warnings :
warning: comparison between signed and unsigned integer expressions
warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]

many thanks

i paste here an extract from the full logs:

the test servers use a precompiled version of rtaudio we store here:


you should just need to uncompress it as root in the root folder of the filesystem and it should just work.

this is more or less what the armv7 test server does:

cd /
sudo wget http://ci.openframeworks.cc/rtaudio-armv7hf.tar.bz2
sudo tar xjf rtaudio-armv7hf.tar.bz2
sudo rm rtaudio-armv7hf.tar.bz2   

from this script: https://github.com/openframeworks/openFrameworks/blob/master/scripts/ci/linuxarmv7/build.sh

great, thanks arturo, will try that in a few hours when i get back from work … it would be good to update http://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started-archlinux/ with this info …

Yes that works on Archlinux ! Thank you so much ! Its been running continuously for nearly two hours loading, playing and stopping a different video every 3 seconds with no sign of strain.

the image is black and white and there’s an issue with sound playback but those are minor details that i’ll work on later.

some notes on the wonderful OF archlinux rpi install guide :
( http://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started-archlinux/ )

  • Avoid Berryboot or NOOBS (their partitions may confuse the archlinux update system and create systemd problems) and follow the terminal instructions in the install guide to install on the SSD. For those RPi users new to Archlinux here is a good FAQ http://archpi.dabase.com/#to-update

  • This is more a RPi2 advice so probably doesn’t have its place in the install guide but its good to know if you are a beginner that editing boot/config.txt on the Raspberry pi 2 you can allocate memory to GPU - at least 128 Mb recommended for video - and adjust many parameters including screen size and outputs. https://www.raspberrypi.org/documentation/configuration/config-txt.md

  • I manually installed the omx package (https://aur.archlinux.org/packages/gst-omx/ ) after running the dependencies script which installs gstreamer 1.8.3. ( I dont think its in the install_dependencies.sh script - am i mistaken or is there a reason for that ?) curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/gst-omx.tar.gz / Edit PKGBUILD file * nano PKGBUILD / Edit line where it says [ arch=(‘i686’ ‘x86_64’) ] into [ arch=(‘armv7h’) ] so this arch=(‘i686’ ‘x86_64’) becomes this arch=(‘armv7h’) -----
    build in terminal: * makepkg -si

  • To avoid the OF 0.9.3 compilation error: RtAudio.h: No such file or directory #include “RtAudio.h” , download and uncompress the precompiled version of RtAudio as root in the home folder, like this:
    cd /
    sudo wget http://ci.openframeworks.cc/rtaudio-armv7hf.tar.bz2
    sudo tar xjf rtaudio-armv7hf.tar.bz2
    sudo rm rtaudio-armv7hf.tar.bz2

Thank you again for all your wonderful work and care

1 Like

Great to here that it’s finally working : )

The black and white image probably happens cause you are using OF_PIXELS_NATIVE? in that case you need to setup the application to use GLES version 2 so it can do the colorspace conversion in the graphics card. in main.cpp:

int main(){
    ofGLESWindowSettings settings;
    return ofRunApp(settings);

i added yesterday the correct solution to fix the rtaudio problem to the install guide until we integrate it in the install scripts, if you have a moment it would be great if you could add the rest of your findings to the guide, you can edit it directly in github:


when doing a make with the GLES code you recommended for the colorspace conversion ( https://github.com/Etza/trmxclient/blob/master/trmxClient/src/main.cpp ) it exits with this error - any ideas ? :

/home/pi/trmxClient/src/main.cpp: In function ‘int main()’:
/home/pi/trmxClient/src/main.cpp:13:30: error: no matching function for call to ‘ofRunApp(ofGLESWindowSettings&)’
return ofRunApp(settings);
In file included from /home/pi/openFrameworks/libs/openFrameworks/3d/ofNode.h:6:0,
from /home/pi/openFrameworks/libs/openFrameworks/3d/of3dPrimitives.h:5,
from /home/pi/openFrameworks/libs/openFrameworks/graphics/of3dGraphics.h:17,
from /home/pi/openFrame from /home/pi/openFrameworks/libs/openFrameworks/gl/ofGLRenderer.h:6,
from /home/pi/openFrameworks/libs/openFrameworks/ofMain.h:45,
from /home/pi/trmxClient/src/main.cpp:1:
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:50:5: note: candidate: int ofRunApp(std::shared_ptr)
int ofRunApp(shared_ptr OFSA);
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:50:5: note: no known conversion for argument 1 from ‘ofGLESWindowSettings’ to ‘std::shared_ptr’
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:51:5: note: candidate: int ofRunApp(ofBaseApp*)
int ofRunApp(ofBaseApp * OFSA = nullptr); // will be deprecated
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:51:5: note: no known conversion for argument 1 from ‘ofGLESWindowSettings’ to ‘ofBaseApp*’
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:52:6: note: candidate: void ofRunApp(std::shared_ptr, std::shared_ptr)
void ofRunApp(shared_ptr window, shared_ptr app);
/home/pi/openFrameworks/libs/openFrameworks/app/ofAppRunner.h:52:6: note: candidate expects 2 arguments, 1 provided
make[1]: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:202: obj/linuxarmv7l/Release/src/main.o] Error 1
make[1]: Leaving directory ‘/home/pi/trmxClient’
make: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:130: Release] Error 2

oh, sorry it should be:

int main(){
    ofGLESWindowSettings settings;
    return ofRunApp(new ofApp);

that works - but cuts about 200 pixels off the right hand part of the screen !

this is the error that i get when i play a video with sound - i guess it would be an Alsa configuration problem ? :
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device ‘default’: No such file or directory

thanks !

that’s really strange but it’s difficult to know what might be going on, the way OF draws when using openGL 1 or 2 is very different and although it usually just works there might be something in your code that behaves differently. i would look for missing push/pop when doing transformations or similar. also if it was working for you ok without the OF_PIXELS_NATIVE perhaps bring it back to that.

and no idea about the sound really, a quick search returns this: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=41230 which sounds like it could be the problem. OF uses gstreamer internally which lots of other apps use, like totem the default video player in gnome so if you can make that work OF should work, perhaps try totem and if you get the same error ask in the raspberry or arch linux forums

Thanks for the comments. Yes, its weird, also because even when i quit that code the display remains the same way !

But i went back to a copy and tried with OF_PIXELS_RGB but the performance hit is really important - NATIVE is so much faster - permitting the mixing of 2 videos in play at normal speed at the same time, RGB can do it also but the videos play back very slowly. So I am going to investigate more :slight_smile:

Ah and is there a trick, such as threading, to prevent a video in play from pausing briefly (between half and one second) when another video is loaded ?

you can use loadasync instead which won’t block the main thread

hi there is a PushMatrix here in line 40 which is popped in line 57