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.
IndexDiscussionExhibition › Test of MovieMaker video type
Page Index Toggle Pages: 1
Test of MovieMaker video type (Read 9219 times)
Test of MovieMaker video type
May 20th, 2008, 11:27pm
 
I tried to make a QuickTime video out of an animation I made, but it was late, so I lacked time. I tried a few codecs (types) at random, and either I got an awful quality, or enormous files! Or exceptions...
So today I made a little sketch to test all the types, and I thought I could share, since a quick search on the (current) forum doesn't show such study.
I made a non-trivial (ie. gradient), animated background, and some simple objects to see how they are animated and if they leave trails (traces) on the background.
Here is the code, if you want to experiment at home:
Code:
import processing.video.*;

final int CANVAS_WIDTH = 720;
final int CANVAS_HEIGHT = 480;
//~ final int MAX_FRAME_NB = 720;
final int MAX_FRAME_NB = 120;

final color START_COLOR_TOP = #335533;
final color START_COLOR_BOTTOM = #55AA55;
final color END_COLOR_TOP = #333355;
final color END_COLOR_BOTTOM = #5555AA;

int xA, yA, xB = CANVAS_WIDTH / 4, yB = CANVAS_HEIGHT / 4;

MovieMaker mm;

color InterpolateColor(color startC, color endC)
{
return lerpColor(startC, endC, (float)frameCount / (float)MAX_FRAME_NB);
}

void DrawBackground()
{
color topColor = InterpolateColor(START_COLOR_TOP, END_COLOR_TOP);
color bottomColor = InterpolateColor(START_COLOR_BOTTOM, END_COLOR_BOTTOM);
for (int l = 0; l < CANVAS_HEIGHT; l++)
{
color sc = lerpColor(topColor, bottomColor, (float)l / (float)CANVAS_HEIGHT);
stroke(sc);
line(0, l, CANVAS_WIDTH - 1, l);
}
}

void setup()
{
smooth();
frameRate(24);
size(CANVAS_WIDTH, CANVAS_HEIGHT);

// I manually changed the name in the file and the type
mm = new MovieMaker(this, width, height, "Test-BASE.mov", 24,
MovieMaker.BASE, MovieMaker.BEST);
}

void draw()
{
if (frameCount > MAX_FRAME_NB)
{
mm.finish();
delay(1000);
exit();
}

DrawBackground();
fill(#88FFFF);
ellipse(xA++ * 4, yA++ * 4, 20, 20);
fill(#88AAFF);
ellipse(xB-- * 4, yB-- * 4, 20, 20);
fill(#88FFAA);
ellipse(xA * 4, yB * 4, 20, 20);
fill(#88AAAA);
ellipse(xB * 4, yA * 4, 20, 20);

fill(#8888AA);
ellipse(xA * 4 + MAX_FRAME_NB, yA * 4, 20, 20);
fill(#88AA88);
ellipse(xB * 4 - MAX_FRAME_NB, yB * 4, 20, 20);
fill(#8888AA);
ellipse(xA * 4 + MAX_FRAME_NB, yB * 4, 20, 20);
fill(#888888);
ellipse(xB * 4 - MAX_FRAME_NB, yA * 4, 20, 20);

mm.addFrame();
}

Tested with Apple QuickTime 7 for Windows (XP SP2)
ANIMATION: perfect - 1,800KB
BASE: empty! - 0
BMP: perfect, enormous! - 121,500KB
CINEPAK: Lot of artifacts on background, trail - 1,600KB
COMPONENT: Little artifacts on background, big! - 81,000KB
CMYK: empty! - 0
GIF: empty! - 0
GRAPHICS: Dithering - 16,600KB
JPEG: Good quality, reasonable size - 2,500KB
MS_VIDEO: empty! - 0
MOTION_JPEG_A: Good quality, reasonable size - 3,200KB
MOTION_JPEG_B: Good quality, reasonable size - 3,200KB
RAW: perfect, enormous! - 162,000KB
SORENSON: Little artifacts on background, small - 780KB
VIDEO: Small palette (blocky gradient), trails - 470KB
H261: Lot of artifacts on background - 460KB
H263: Lot of artifacts on background - 330KB
H264: Sketch fails (exception quicktime.std.StdQTException[QTJava:7.4.5g],-8960=codecErr,QT.vers:7458000) after writing 120KB

Writing big files slows down a lot the animation...

I hope this will help people.
Re: Test of MovieMaker video type
Reply #1 - Jun 21st, 2008, 2:34pm
 
yeah this is cool. thank you. h264 doen't work for me too. seems to be xp that doesn't play along
Re: Test of MovieMaker video type
Reply #2 - Sep 13th, 2008, 4:07am
 
Thank you...
this is very complete.
I use moviemaker to make a video file out of a example file.
I have tried both codec JPEG and ANIMATION:

mm = new MovieMaker(this, width, height, "drawing.mov", 10, MovieMaker.JPEG, MovieMaker.HIGH);

mm = new MovieMaker(this, width, height, "drawing.mov", 10, MovieMaker.ANIMATION, MovieMaker.HIGH);

Both works finely.
Only sometime, when change from [JPEG] tp {ANIMATION], it fails to make a video file in its folder. (ie. no file generated).

The [ANIMATION] setting seems to have smaller file size.

The movie file (video) that is generated by this has a ".m" instead of ".mov".
Other than this, it fails to be played back by quick tim player if I change it's ".m" to ".mov".
However, to my surprise, it can be played back by [KMPLAYER] without changing its ".m".
Re: Test of MovieMaker video type
Reply #3 - Nov 3rd, 2008, 1:01am
 
fwiw i've been messing with MovieMaker today and have the same issue with h264...difference being i'm on a mac. maybe the problem is not os specific.
Re: Test of MovieMaker video type
Reply #4 - Nov 3rd, 2008, 11:31am
 
Thanks - this will be useful. h264 wasnt working for me either but I thought it was a problem with quicktime on my pc
Re: Test of MovieMaker video type
Reply #5 - Nov 13th, 2008, 3:26am
 
Doesn't work for me on xp either.  Thanks for this post.
Re: Test of MovieMaker video type
Reply #6 - Nov 14th, 2008, 6:48pm
 
I'm also having issues with MovieMaker, specifically using H264. I'm running Intel MackBook Pro, OS X 10.4.11. Processing 0156.

This seems to work:
movie = new MovieMaker(this, width, height, "SomeMovieName.mov", 30, MovieMaker.ANIMATION, MovieMaker.HIGH);

But this doesn't, which is required for proper streaming on Vimeo:
movie = new MovieMaker(this, width, height, "SomeMovieName.mov", 30, MovieMaker.H264, MovieMaker.HIGH);

Any help is much appreciated!
Re: Test of MovieMaker video type
Reply #7 - Dec 25th, 2008, 9:41pm
 
I've found that the combination of MovieMaker.H264 and MovieMaker.WORST will work when reading from Capture and writing using MovieMaker. Of course, the quality is awful... From what I can tell, no other quality settings will work for that codec.
Re: Test of MovieMaker video type
Reply #8 - Dec 26th, 2008, 5:06am
 
H264 doesn't work for me in 64-bit Vista either.  Didn't realize it was such a common problem.

On a side note, I started saving movies to a RAM disk today.  In my sketch, it improved the framerate from 12fps to 15fps.  If I'm not saving a movie, the sketch runs at 24fps.
Re: Test of MovieMaker video type
Reply #9 - Jan 6th, 2009, 2:27am
 
Great info! Bummer about H264 for the time being, hopefully in a future release. Until then I'm sticking with ANIMATION or JPEG. Thanks for the info!
Re: Test of MovieMaker video type
Reply #10 - Jan 13th, 2009, 1:20pm
 
I guess H.264 doesn't work because MovieMaker is using old Sequence APIs (not newer Session APIs):

http://developer.apple.com/qa/qa2006/qa1470.html

So we need someone to update the library code.  

Cheeeeeers
Re: Test of MovieMaker video type
Reply #11 - Jan 14th, 2009, 5:27am
 
I just found QTJava doesn't support Session APIs.  Moreover,

http://www.mailinglistarchive.com/quicktime-java@lists.apple.com/msg00969.html

>Re: QTJava will be depreciated next year.
>I am currently attending 2008 Apple WWDC conference.
>Apple announced today they will release new OS (10.6
>Snow Leopard) in year 2009.  Instead of QuickTime 7.X,
>QuickTime X will accompany the new OS.  Apple also
>officially announced today that QTJava will be
>deprecated  once QuickTime X becomes available.

Ooooops!!!

Re: Test of MovieMaker video type
Reply #12 - Aug 26th, 2009, 7:15pm
 
ohyeahq wrote on Jan 14th, 2009, 5:27am:
>Re: QTJava will be depreciated next year.
>I am currently attending 2008 Apple WWDC conference.
>Apple announced today they will release new OS (10.6
>Snow Leopard) in year 2009.  Instead of QuickTime 7.X,
>QuickTime X will accompany the new OS.  Apple also
>officially announced today that QTJava will be
>deprecated  once QuickTime X becomes available.


Looks like i can confirm that - running a developer build here (most likely the actual OS since it's due out this Friday and this was released only a few weeks ago). Trying to create a new movie object explodes rather nastily.  Undecided
Re: Test of MovieMaker video type
Reply #13 - Aug 31st, 2009, 10:55am
 
Is there an alternative plan outside of QTJava for Snow Leopard users?
Page Index Toggle Pages: 1