Video playback performance in Raspberry Pi 3


#1

Hello,

I recently finished making an interactive video installation which was supposed to run on a Raspberry Pi 3. At the time I got the idea that OpenFrameworks was already working fine on the Raspberry while Cinder was still not simple to run on these little machines.

So I chose OpenFrameworks.

But, much to my surprise, OF’s video playback performance at 720p is unacceptable. I then found this addon which seemed to solve the issue. But then I started having all sorts of problems, mainly because this addon is unfinished and seems to have been abandoned.

There is also a tweak you can make on OF to make playback faster, but it’s still not fast enough for my needs (and still much slower than the OMX addon).

As a consequence, since I had a deadline, I ended up having to (temporarilly) run it in a MacMini.

This said it looks like Cinder is now working fine in Raspberry Pi 3 (I wonder if it already was at the time!..) I was considering porting it to Cinder. But before I start I’d like to know if I’ll have the same 720p playback performance problems with Cinder.

Please let me know if this is something worth trying!

Thanks in advance,
Nuno


#2

I forgot to say that all 720p videos have 25fps and that I’d like to run the app at 50fps.


#3

Hi,

the video player implementation is based on GStreamer as in OF but the main difference is that Cinder’s implementation aims to take advantage of the recent developments that have happened in GStreamer’s gl plugin.

In short this plugin provides some mechanisms for sharing and creating efficiently gl resources between the various steps of a GStreamer pipeline that is shared with a Cinder application. The downside of this approach is that the minimum version of GStreamer that properly supports this API is 1.8.2. This is fine for relatively recent flavors of *untu but the version that comes with the RPi is far behind and that is one of the reasons I created this script that setups for you a so called gst-uninstalled environment for running the latest versions of GStreamer without having to mess with your system wide gst configuration.

With a GStreamer version of at least 1.10 and the recent overhaul of the Linux video player you should be able to playback 720p files on the RPi but this would be something that needs to be tested especially if your application has also other requirements ( seeking, scrubbing, etc ). The RPi is a device/platform that still has some open issues and GStreamer on its own is moving very fast upstream so there might be some things that have changed since I last tried this process on the device so if you decide to try it out would be interesting to see what results you get and I would be happy to help wherever I can.

HTH,
Petros


#4

Hi Petros,

Thanks for the detailed explanation and for the script! The only requirement I need are:

  • pause/play
  • set some clips to loop automatically
  • replay and play from the start the videos which don’t loop automatically

I’m not very familiar with Linux so I’m not sure I’ll be able to successfully run your script and compile all that is needed. But I’ll try and will let you know.

Cheers,
Nuno