FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Video, Camera
(Moderator: REAS)
   figure out how many frames there are in a movie
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: figure out how many frames there are in a movie  (Read 594 times)
nuritb

Email
figure out how many frames there are in a movie
« on: Oct 26th, 2004, 7:36am »

Hi I am trying to fugure out if it is possible to know how many frames there are in a (qt) movie i am loading into processing
what i am trying to do is:
1.load a move  
2.figure out how many frames there are in that movie
3. tell the movie to go to a particular frame (lets say with mouseX..)
 
is there any code for that?
 
thanks nurit
 
fjen

WWW
Re: figure out how many frames there are in a movi
« Reply #1 on: Oct 26th, 2004, 4:42pm »

video support is pretty poor at the moment ... but here's an example of how to get _some_ properties of a BVideo (frame rate, total frames, current frame playing, current movie time):
 
http://www.florianjenett.de/p55/movie_status.zip
(this assumes your video is in track 1 of the quicktime)
 
i'm not sure if it's possible with the current implementation of BVideo to jump to a certain frame in a movie easily ... i'd guess not.
what you might be able to do is use the BVideo.movie (which is a QuickTime-Movie Object: quicktime.std.movies.Movie), set this to a certain frame and the call BVideo.readFrame(), the grab the BVideo.pixels ... but this is all undocumented.
 
best
/F
 
nuritb

Email
Re: figure out how many frames there are in a movi
« Reply #2 on: Oct 27th, 2004, 6:35pm »

thanks!!!

i tried somethings w the code but still couldnt get it to go to curent frame
 
heard that in processing 70 theres a jump function that does that?
 
fjen

WWW
Re: figure out how many frames there are in a movi
« Reply #3 on: Oct 27th, 2004, 7:21pm »

ja, the code is just an example of how to _read_ the current frame, not how to set it.
 
the new version have a new video library, not sure what's in there.
 
Pages: 1 

« Previous topic | Next topic »