Using methods from ofQTKitPlayer in a headless app.

I would like to run my app headless, but I am using ofQTKitPlayer to read the number of frames in various files. However as soon as I make the app headless by changing main.cpp to:

#include "ofMain.h"  
#include "testApp.h"  
int main( ){  
    testApp * app = new testApp();  
    while (1){  

I get the errors:
2013-11-07 10:20:18.231 theAppName[2086:303] error -50 creating QTOpenGLTextureContextCreate
[ error ] ofQTKitPlayer: loadMovie(): couldn’t load “/Users/me/1/”

I don’t need to draw the video or anything like that, just use the method getTotalNumFrames(). Or is there another way I could accomplish this?

I think you need an OpenGL context to use that addon. A simple alternative would be to call ffmpeg to get information about a Quicktime video.

also try using setUseTexture(false) on the videoPlayer

Is there a *simple* way with ffmpeg? As far I could see I would have to parse out the duration and fps
data from the info string output? (using $ ffmpeg -i

I tried setUseTexture(false) on the videoPlayer but get the error:

No member named ‘setUseTexture’ in ‘ofQTKitPlayer’; did you mean ‘getTexture’?

-count_frames looks like what you need