1080p Video Playback Issue

Hi,

I am new to openFrameworks and am trying to implement a fairly simple application to switch between 4 videos using keyboard keys (keyboard controller interpreting input from buttons).

I am stuck at the first hurdle however as I can’t get the video to play back smoothly. It is tearing and jittering.

Here is the basic code I am using (based on the moviePlayerExample):

  
void testApp::setup(){  
	ofBackground(0,0,0);  
  
	fingerMovie.loadMovie("movies/Modern Sorting FINAL_6500_2pass.mov");  
	fingerMovie.play();  
	ofSetFrameRate(25);  
	ofSetVerticalSync(true);  
}  
  
//--------------------------------------------------------------  
void testApp::update(){  
    fingerMovie.idleMovie();  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
    fingerMovie.draw(0,0);  
}  

The addition of ofSetFrameRate and ofSetVerticalSync did improve the performance, but not enough unfortunately.

The videos are all 1080p, h264, 25fps Quicktime movies.

I have tested this on Windows (both vs2010 and CodeBlocks) and also in XCode.

Could anyone tell me if there is a way to improve the playback of these videos, or if this is just a limitation of openFrameworks?

Thanks very much,

Maryann

codeblock window
http://forum.openframeworks.cc/t/multiple-video-at-the-same-time.-how-to-get-better-perf-/4018/12">http://forum.openframeworks.cc/t/multiple-video-at-the-same-time.-how-to-get-better-perf-/4018/12]http://forum.openframeworks.cc/t/multiple-video-at-the-same-time.-how-to-get-better-perf-/4018/12
you can look forward this thread

Playback speeds depends on the capabilities of your computer. To get better performance, re-export the video using Motion-Jpeg or Photo-jpeg compression; try with compression rates of 70-80%.

H264 compression is pretty heavy on the CPU…that’s until we are able to decode it on the GPU. QtKit seems to be able to do that if you are on a Mac.

Then enable vertical sync (you don’t need to set the framerate, waiting for vsync should do that for you.

See this post for more:
http://forum.openframeworks.cc/t/multiple-videos-manipulation/1352/0

Hello,

In my experience, the photo-jpeg compression works quite well.

What might also help is to render the video in a slightly lower resolution. On my hardware, this was the only way I could get stutterless playback for a 1080p screen resolution. The video will be somewhat “softer”, but this is not necessarily a bad thing.

good luck

regards

david