openframeworks / openframeworks/openFrameworks

ofVideoPlayer (AVFoundation) nextFrame update

Open
#3,750 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug macOS prelim-analysis section-video
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Latest git on OS X 10.9, using nextFrame with update does not seem to update the frames.
Although if you switch the order of nextFrame and update it works. Am I missing something or is it an issue with the OS X video player?

Simple test app:

#include "ofMain.h"

class ofApp : public ofBaseApp
{
  public:
    void setup();
    void update();
    void draw();

    ofVideoPlayer fingerMovie;
};

void ofApp::setup()
{
    ofBackground(255,255,255);

    fingerMovie.load("movies/fingers.mov");
    fingerMovie.setLoopState(OF_LOOP_NORMAL);
    fingerMovie.play();
    fingerMovie.setPaused(true);
}

void ofApp::update()
{
    fingerMovie.nextFrame();
    fingerMovie.update();
}

void ofApp::draw()
{
    ofSetHexColor(0xFFFFFF);
    fingerMovie.draw(20,20);

    ofSetHexColor(0x000000);
    ofDrawBitmapString("frame: " + ofToString(fingerMovie.getCurrentFrame()) + "/" +
                       ofToString(fingerMovie.getTotalNumFrames()), 20, 380);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided sample app and reproduce the behavior in ofVideoPlayer's AVFoundation path, comparing nextFrame() followed by update() with the reversed order. Confirm whether the displayed frame and getCurrentFrame() advance as expected, then document or test the behavior once the correct update sequence is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.