ofVideoPlayer in linux/osx, getCurrentFrame()

Hi.

I just found that ofVideoPlayer::getCurrentFrame() is something wrong.
(it’s starting with negative value)
I’m not sure it’s related with OF. but definitely different result with windows environment.

for example. …

ofVideoPlayer player 
player.load("test.mp4");
...
player.update();
if(player.getCurrentFrame() == player.getTotalNumFrames()){
         // video ended
         // this block is never run on osx / linux but windows.
}

video codec : H.264, mp4 file.

1 Like

I am on OSX and fingerMovie.getCurrentFrame() seems functional. I tried it with a .mp4 / H.264.

It did start out with a negative number, but then progressed with a choppy frame rate.
ofLog()<< fingerMovie.getCurrentFrame();

Perhaps if the fps is slow it is simply not picking up that last frame.

This post might be helpful:

1 Like

thanks for the answer!

but seems still it’s not working for me.

1 Like