Problem with video updating to screen on Raspberry Pi

ssue with video playing on raspberry pi. - i’m using ofVideoplayer to open a video file then a piece of code to select a frame to play to loop video back and forth. the whole app works fine but the video only refreshes to the screen when the gui i have built is shown… other parts of the display drawn to screen still update at the same frame rate. identical code on OSX works fine. have tried all I can think of to change or force updates, change draw order etc - any suggestions gratefully received.

void ofApp::update(){
    if (loopNumber>=loopMax){
    //--clock updates
    time_t t = time(0);   // get time now
    struct tm * now = localtime( & t );
    clockSec = now->tm_sec;
    //  clockMin = now->tm_min;
    clockMin = easedFrame % 60;
    clockHrs = easedFrame/60;
    // clockHrs = now->tm_hour;
    clock.update(clockSec, clockMin, clockHrs);
    float thisNow = ofGetElapsedTimef();
    if (ofGetElapsedTimef() > endTime) {// start a loop left to right
        initTime = ofGetElapsedTimef();
        endTime = initTime + duration;
        playForward = !playForward;
        if (playForward){
            startRange= 0;
            endRange = movieDuration;
        } else {
            startRange= movieDuration;
            endRange = 0;
            loopNumber ++;
    easedFrame=ofxeasing::map_clamp(thisNow, initTime, endTime, startRange, endRange, &ofxeasing::cubic::easeInOut);


void ofApp::draw(){
    if (fade) xFade(); // if fade selected in gui then call xfade function
    momentMovie.draw(0,0,800,480); //draw frame of movie
    if ( showGui ) gui.draw();
    if (showClock)clock.draw( clockRadius, clockPosLeft, clockPosTop );

If gui.draw(); makes it work, what’s inside it? :slight_smile:

Note: you can add ``` on a line before and after your code to make it look nice in the forum.

void ofxBaseGui::draw(){
		needsRedraw = false;
	currentFrame = ofGetFrameNum();

which suggests render(); is the culprit, but this does not resolve what the way to resolve the problem is with drawing ofVideo in pi rather than making a dirty hack to force it. What would you suggest?

Best way to test is just with a simple player and see if it plays/locates/stops starts correctly.

You actually got ofVideoPlayer playing video ok? I’ve found it pretty useless.
I get movies with green/grey stripes stripes down the side and they don’t locate properly. work fine
in osx etc.

tried ofxOMXPlayer but that has its own set of nightmares., although it does play at better frame rates,
although ironically thats not what I need.


in actuality i am not ‘playing’ the video, i’m opening the stream and retrieving frames at a rate set by an easing algorithm to ‘play’ the frames at a varying sine-wave like rate. when I ‘play’ (speed = 100%) it AFAIKR performs correctly but the setting of the .


appears to be failing on the Pi unless the gui is drawn (running fine on osx)

debugging further, the video does not update when calling hidecursor() even if the gui is showing. but stops when hiding the gui even if cursor is showing…
inside ofxGui::draw() is a call to render() but IO cant trace this any further - I need to solve this urgently (or make a dirty hack around it) for an upcoming show - any suggestions gratefully received !