Created
February 14, 2012 04:45
-
-
Save kitschpatrol/1823610 to your computer and use it in GitHub Desktop.
Recording Video from OpenFrameworks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofxQtVideoSaver.h" | |
... | |
// in your class definition | |
ofImage recordingImage; | |
ofxQtVideoSaver saver; | |
... | |
// in setup function, start recording | |
saver.setCodecType(0); // Animation Codec | |
saver.setCodecQualityLevel(OF_QT_SAVER_CODEC_QUALITY_NORMAL); | |
saver.setup(ofGetWidth(), ofGetHeight(), "recording-" + ofToString(ofGetUnixTime()) + ".mov"); | |
... | |
// in draw loop, save frames | |
recordingImage.grabScreen(0, 0, ofGetWidth(), ofGetHeight()); | |
saver.addFrame(recordingImage.getPixels()); | |
... | |
// before you quit, finish up | |
saver.finishMovie(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi kitschpatrol, I'm getting
use of undeclared identifier 'OF_QT_SAVER_CODEC_QUALITY_NORMAL'
when attempting to use this code. Any suggestions?