I uploaded a simple video to OF using an example video. Now I am trying to replace it with my own video (which I exported with quicktime using their web export). The file is a mov 640 x 360, 436 kb. The example video was 320 x 240, 260 kb.
The code works with the example video file but not mine.
Any thoughts on what I might be doing wrong either with export of footage or code etc?
Thanks!
#include “testApp.h”
//--------------------------------------------------------------
void testApp::setup(){
ofEnableAlphaBlending();
player.loadMovie(“mina.mov”);
player.play();
player.setLoopState(OF_LOOP_NONE);
}
//--------------------------------------------------------------
void testApp::update(){
// player.setFrame(mouseX);
}
//--------------------------------------------------------------
void testApp::draw(){
player.update();
int sampleX = ofClamp(mouseX,0,player.getWidth()-1);
int sampleY = ofClamp(mouseY,0,player.getHeight()-1);
ofColor sample = player.getPixelsRef().getColor(sampleX, sampleY);
ofBackground(sample);
ofSetColor(255,0,255,128);
player.draw(0, 0, ofGetWidth(), ofGetHeight());
}
//--------------------------------------------------------------
void testApp::keyPressed(int key){
if(key == ’ '){
if(player.isPlaying()){
player.stop();
}
else {
player.play();
}
}
}
//--------------------------------------------------------------
void testApp::keyReleased(int key){
}
//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){
}
//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
}
//--------------------------------------------------------------
void testApp::windowResized(int w, int h){
}
//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){
}
//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
}