Video playback stability - OSX 10.9 vs 10.8 (or earlier) QTKit vs QT 7


Can anyone give a brief summary of the current state of OF video playback under OSX? I am coming back to OF after a number of years for a video project and have managed to get myself very confused and hit a few stability issues.

There seems to have been tons of discussions about different problems and suitability of different OSX versions with QT, QTKit, ofxThreadedVideo etc over the past year or two. Is there a “most stable” combination of OF / OSX / SDK versions I should use? Seems everything was great under 10.6 but I can’t run that. I am probably limited to 10.9 or 10.8 for running the app, and can only develop on 10.9.

Reason: I am writing a small app for an exhibition that repeatedly creates and closes videos and makes heavy use of setFrame(). I am developing under 10.9 and target build/SDK is 10.9. So far the most stable I have found is using ofQTKitPlayer with OF_QTKIT_DECODE_PIXELS_AND_TEXTURE ( Also wondering if ofxThreadedVideo is worth experimenting with?

Or, is using 10.6 SDK and reverting to older Quicktime 7 based playback the best route for me to take? Does that even still work with OF 8.1? (I couldn’t get it to build).

Sorry for long quesion hope someone can help.

Hey @BlueC

This is a good question :slight_smile:

Basically we are in a transition period at the moment due to the fact that Apple has been fairly inconsistent with their vision of video on the desktop.

There was a big push to QTKit but about halfway through that transition Apple decided to move to AVFoundation so that OS X code and iOS code could share the same codebase.

openFrameworks will be shortly moving to AVFoundation for video on OS X, most likely for the next major 0.9.0 release.

If you are having performance issues with the QTKit base player it might be worth checking out the ofxAvFoundationPlayer which seems to get better performance than the current player: ofxAVFVideoPlayer

However it should be noted that setFrame is a fairly intensive function with QTKit and that might be the same with AVFoundation.

My suggestion for maximal performance would be to load the videos into memory as an array of ofTextures. However this might not be possible depending on the no. of videos or the size of the video frames.

Happy to offer other suggestions if needed.

Hi @theo thanks for the informative response :slight_smile:

Ok so it seems video on OSX is in a bit of a state of transition, which really explains a lot of what I have read and found. It is a shame that we don’t have a stable video solution at present, especially as 10.6 was so solid, but it is great that OF is already working towards the new implementation.

Thanks to your explanation it is good to know that there is a valid reason for my confusion and I wasn’t just misunderstanding everything!

I guess I am more concerned about stability than performance - seektime using setFrame needs to be reasonably responsive but more than that I need to ensure the playback is rock solid. Don’t think loading them into memory is an option - I have just received the videos for the installation and to my horror they are encoded at 20.5 Mbps and file sizes are in 10+ GB range (total is about 280GB) so these are quite heavy files - I definitely need to do some more testing and hopefully find a stable solution!

If I am looking for stability over performance, is building against the 10.6 SDK a possible avenue to explore? And do you know if an app built against 10.6 will run on 10.9?

Many thanks

Hey @BlueC no problem!

Those videos sound huge!

I think getting the app to build with the 10.6 SDK and ofQuicktimePlayer should be possible.
It might be worth checking out that add-on before you do as it could end up having better performance/stability.

QuickTime SDK was designed pre HD - so you might find that a modern AVFoundation based player will be a bit more responsive at higher resolutions.

Hi @theo I has a look at AVF plugin and it is VERY fast but seems a bit unstable. Thanks for your help.

It would be great to get some more info on stability issues.
We will be likely taking a similar approach for OF 0.9.0 - so any info could be really helpful.