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.
Pages: 1 2 3 4 5
faster Movie class (Read 33655 times)
Re: faster Movie class
Reply #15 - Dec 9th, 2007, 6:15pm
 
thank you!

but

you have to use fm.speed ()  !
Re: faster Movie class
Reply #16 - Jan 10th, 2008, 1:15pm
 
can somebody explain to me how the jump instance is supposed to work?
and or if there is a funktion where you can jump to the end of the movie since i am trying to make the loop also work in reverse (speed = -1).
Re: faster Movie class
Reply #17 - Jan 10th, 2008, 1:17pm
 
and still i have trouble playing movies with more than 300mb even though i reserved 1000mb memory, i get java.outofmemory error messages.
how is that possible??
Re: faster Movie class
Reply #18 - Jan 10th, 2008, 3:39pm
 
Without using a profiler I can't really tell you. The movie as such should not eat all that memory, because the whole movie is never loaded, just frames. Do you maybe store frames or process lots of frames somewhere? What is the resolution of the movie. Otherwise we might have amemory leak, maybe someone with a profiler and some spare time can check this?

Anyhow, in general playing very big movies is problematic, as the implementation, due to having to deal with processing, is still suboptimal, and I myself fell back to a pure java solution with lots of glue and magick back on the project I devloped fm for.
Re: faster Movie class
Reply #19 - Jan 10th, 2008, 3:42pm
 
dermarc, do you mind posting some sourcecode?
Re: faster Movie class
Reply #20 - Jan 10th, 2008, 3:50pm
 
void setup ()
{
 myMouseWheel = new MyMouseWheel();
 frame.addMouseWheelListener(myMouseWheel);
 
 
   //size(1152,768);
   size (800,300);
   
   fma = new FasterMovie(this, "round_web.mov", false);
   fma.loop();
   
   //fmb = new FasterMovie(this, "muede_small.mov",false);
   //fmb.loop();
   
   fill (0);
   noStroke ();
   background( 0 );
   

 
}

void draw ()
{
 
 if (myMouseWheel.wasMoved==false){
   wheelspeed = 0 ;
   count++;
    }
  else
 {
   //fmb.speed(0);
   fma.speed(wheelspeed);
   image( fma, 400, 0, 400, height );
   //if ( mImage != null ) image( mImage, 400,0, 400, height );
   count = 0;
 }

if (count>=12){
   rect (400,0, 400, height);
   //fmb.speed(1);
   //image( fmb, 0,0, 400, height );
   fma.speed(0);
 
  }
 


mcount++;


   myMouseWheel.loop();
 
   
   println (wheelspeed);
}

void movieImageAvailable ( PImage _movieImage )
{
   mImage = _movieImage;
}
Re: faster Movie class
Reply #21 - Jan 10th, 2008, 4:11pm
 
first of all thank you guys!

i have to use processing, scince it is for processing class so...
and if it just does not work with the big one, then i have to let it go,
but anyhow.

scince i am just studying it. what is a profiler??
i posted the code i used, leaving out the fastermovie and a mousewheellistenerclass.
i don't think i stored any frames, scince i am basically just variating the speed.
which all works fine. on a 150mb video even on 1152x768
but i liked to have a bigger around 450mb playing when stopped.
i did a test: i simply played the 450mb without anything else..
out of memory...

anyhow i need to finish till saturday with or without big one.
and whoever is curious on the results and in berlin is welcome to join the show:
http://incom.org/code/kommunikation/kommunikation.php?2,3,23,28173,18,28219
Re: faster Movie class
Reply #22 - Jan 10th, 2008, 4:18pm
 
ok, so to probelm is "only" the big files? mh, have you tried to split your big movie into some smaller parts and loading them separately when needed?

gruss
Re: faster Movie class
Reply #23 - Jan 10th, 2008, 4:35pm
 
no i didn't tried that jet, since then i would need to have smooth transitions. but i will try to preload them somehow...

the reverse loop thing is still open too.
any ideas how the FasterMovie.jump works?
Re: faster Movie class
Reply #24 - Jan 10th, 2008, 6:12pm
 
I think big files aren't a problem, it's rather big framesizes, but I am not sure. btw, tray going to even more ram and see what happens, especially, when do you get the error, always at the same point or, f.e., the later the more ram you add? In the latter case a memory leak is rather likely.

As for reverse/jump/speed: check out the source code and corresponding qtjava reference docs Smiley.
Re: faster Movie class
Reply #25 - Jan 10th, 2008, 9:15pm
 
what exactly do you mean by "memory leak"??

the jump problem was my fault, tried to play and paused at the same time.
fixed it. thank you!
Re: faster Movie class
Reply #26 - Jan 10th, 2008, 9:22pm
 
Hmm, I suppose in the java world these belong to the myth section, but I have had them there too, so let's clear the myth:

Memory leaks commonly happen in non-garbage collected environments (i.e. plain old c et.al.) when you allocate memory but never free it, leaving amounts of orphaned memory around, that the system can't use, because you haven't told it you don't use it anymore. These usually kreep in in some repetitive tasks and slowly "leak" the available memory to zero.

In java these are rarer, but possible, if somehow you keep referencing old objects, but never use them. It does happen in complicated code, or when using lots of libraries.

Best

Daniel
Re: faster Movie class
Reply #27 - Jan 10th, 2008, 9:33pm
 
ok, then a memory leak is not a problem or in the fastermovie class, scince i am doing the tests always just by trying to play them.
Re: faster Movie class
Reply #28 - Jan 10th, 2008, 9:51pm
 
hmm, well, it could be _inside_ the faster movie class. noone said me (or extrapixel) are perfect programmers Smiley
Re: faster Movie class
Reply #29 - Jan 11th, 2008, 1:34pm
 
hmm well, but anyway. you did a nice job there!

next problem.

i tried to cut everything into pieces.
the little loading gap. is ok for me. BUT

even thou i am clearing the old pieces, all pieces that have been executed still seem to run in the background.

this is what i did. maybe it is totally stupid, since i am VERY new to this. So maybe there is a better way.

fmb.stop;
fmb = null;
cont++;
fmb = newFasterMovie (this,"muede"+cont+".mov,false);
fmb.play;

as i said. even thou i am tring to clear the fmb with null, you can hear the sound of the old pieces overlaying and the more pieces are loaded, the performance slows down.

so how can i COMPLETLY erase the opbject fmb out of the memory??







Pages: 1 2 3 4 5