ofVideoPlayer, general questions about performance


#1

Lately I’m writing a lot of video players using openFrameworks and noticed the performance got unreliable when playing multiple videos, sometimes with only one video.
As I’m using macOS I suppose AVFoundation have some issues. I’ve read about ofVideoPlayer possible memory leaks too.
I would prefer to use some clean solution made with openFrameworks for this specific project, instead of MadMapper or other player. Which things would you recommend me to research?

I’ve researched all the basic, codecs, second window, release instead of debug and some other parameters I’m researching right now.
Would Ubuntu or Windows help?
maybe avoiding ofVideoPlayer vector, map or inside an object?
Thank you all


#2

the video player in linux is the most stable right now. If you prefer to use it from osx you can also use the ofxGstreamer addon that enables the gstreamer video player in other platforms than linux: https://github.com/arturoc/ofxGStreamer/


#3

Thank you @arturo.
In the case this thread is useful for somebody else, i’ve used ofxGStreamer yesterday playing 4 big videos in three screens, all day long with very decent performance and no hiccups. On OS X 10.14 and 10.13.

The only detail I’ve notice is getPosition() sometimes returns a negative number. This is a no issue for my application but maybe a hint for something happening in ofVideoPlayer object.


#4

yes this is a problem where gstreamer sometimes can’t query the position cause it’s changing we could store the position internally and return the last position when it’s unknown. it didn’t happen so often before but with newer versions it happens more so it might be worth looking into that.