|
Author |
Topic: spoofed some video. (Read 985 times) |
|
Jeff Berg Guest
|
spoofed some video.
« on: Dec 17th, 2002, 4:07am » |
|
Hello everyone. I discovered proce55ing through http://www.bodytag.org Being curious I immediately started playing around with it. Using a series of jpegs, and the delay method, I managed to approximate video using only few lines of code. The draw back is the jpeg conversion to bitmap inside the applet. 160 frames ends up being 2megs, no matter how large I make the jpeg files. Is there anyway around this? is there some type of compression within the applet I can use? anyhow, So here it is, http://www.pixelplay.org/jeff/pro55/applet/ By the way, this is only my second attempt at proce55ing. This was my first: http://www.pixelplay.org/jeff/pro55/ Cheers!
|
|
|
|
fry
|
Re: spoofed some video.
« Reply #1 on: Jan 2nd, 2003, 6:21pm » |
|
yeah, i see this as starting to be a problem.. unfortunately, i think java uses the uncompressed version of the image internally as well (at least it used to with 1.1) so i think you're getting double-taxed, for the p5 pixel array + java image representation + the java unpacked pixels. i don't know of a good solution (i'd love to hear any suggestions), since p5 is doing all pixel-level stuff for rendering.. that is, i need the raw pixels of the image, and unpacking them is slow, too slow to do for each frame of video in your example.
|
|
|
|
Jeff Berg Guest
|
Re: spoofed some video.
« Reply #2 on: Jan 2nd, 2003, 9:03pm » |
|
Thanks for the reply. I see so to unpack compressed data would be to processor intensive in an applet. Makes sense. I'm far to ignorant of java to begin to suggest an approach to the problem. With the anticipation of hooks to quicktime coming, the issue may be moot anyhow. Just if anyone is curious I modified the code to "tween" the video onto the "stage". You can see I had to compensate for the file naming convention the jpegs had. It was more interesting to find a work around in the code for me than to rename my files. It was an opportunity to see how file name strings can be created by the code. float n = 1; float a = 0.0f; float rect_size; float i; float j=1; void setup() { size(250, 200); background(#FFCC00); stroke(#FFFFFF); fill(#990000); } void setImage(){ n++; BImage a; if(n<10){ a = loadImage("movie000"+int(n)+".jpg"); image(a,25,25); }else if(n<100){ a = loadImage("movie00"+int(n)+".jpg"); image(a,25,25); }else if(n<161){ a = loadImage("movie0"+int(n)+".jpg"); image(a,25,25); }else{ n=1; } } void loop() { if(j>0){ j=j-.01; }else{ j = 0; } rotateX((j)); delay(10); setImage(); } void mouseReleased() { j=1+.2; }
|
|
|
|
|