We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Best-Behaved Codec for QT playback on OSX
Page Index Toggle Pages: 1
Best-Behaved Codec for QT playback on OSX? (Read 670 times)
Best-Behaved Codec for QT playback on OSX?
Feb 19th, 2006, 5:02pm
 
I have a ~7200 frame pre-rendered background movie I want to play behind sections of my patch. I rendered it frame by frame and compiled the frames into an h.264-encoded quicktime .mov. It plays fine through the quicktime player, but jerks and jumps a bit in my sketch.  The sketch just creates a new Movie object, then uses it as the texture on a big polygon behind everything else in the scene.

Am I stuck with the jumpy playback, or is there a codec that'll behave nicer with p5? Also, would re-coding things not to map it to a polygon help matters? I'm not sure how to do that and still be able to draw 3d objects in front, though.. thoughts?

I'm on a 1.33ghz  G4 powerbook with 1.25 gb of RAM.

Cheers,
Ryan
Re: Best-Behaved Codec for QT playback on OSX?
Reply #1 - Feb 19th, 2006, 6:37pm
 
this should be the fastest way to do it:

1) use P3D as the renderer
2) have the size of the video be the same as the size of the sketch (assuming it's near that anyway..)
3) set the video image using background(video)

even faster would be to peek at how the video library reads a movie file, and do your own version of the read() function that instead copies directly to g.pixels[] instead of first to its own buffer that has to be re-copied again via background().
Re: Best-Behaved Codec for QT playback on OSX?
Reply #2 - Feb 20th, 2006, 3:18am
 
Thanks for the tip, Fry.  This doesn't work in OpenGL mode, correct?  I suppose this is the point where I can be thankful that I didn't actually finish all the custom shaders and other things I kept telling myself were going to happen for this project, so switching to P3D from GL shouldn't be much of a speed/functionality hit. Wink
Re: Best-Behaved Codec for QT playback on OSX?
Reply #3 - Feb 20th, 2006, 2:39pm
 
right.. in opengl it would require a different way to hack it to work, which would be a bit more complex since you'd have to take over how gl does the texturing, which off the top of my head, probably wouldn't be very easy to do.

basically neither opengl (the texturing/pixel stuff) or qtjava are built for speed right now.
Page Index Toggle Pages: 1