how to start a movie from the last frame
Nov 14 2016 | 3:19 pm
i want to start two movies which read the same file simultaniously> one playing forward >> one playing backward<< when i bang the two mov objects the one who is set to play backward (rate -1) always starts from frame 0 and then jumps to the last frame and goes on. is there a way to prevent this behaviour and start the movie from the last frame directly?? thank you
- Nov 15 2016 | 5:02 pmdid you try sending the frame message with the last frame as it's argument prior to starting playback in reverse? you can get the last frame by subtracting 1 from the framecount attribute value.with video related questions, it's very important we know which OS you are on, and if you've modified the default video engine, as each OS and engine combination has a different backend with different behavior.
- Nov 16 2016 | 5:07 amhello thanks for the answer. i am on mac osx and i think it runs avf enginge! so to understand the data flow: jit.mov gets the filepath > then it can calculate the framcount> then it needs to subtract>and then start the playback?? that means i cannot switch between files without a pause?? also what is the difference between playlist and using a umenu or a list of filepath with an mov object? it seems that with a playlist you can swith directly between vids whereas with a movie object it always stops for a little while? here is a patch which demonstrates my problems:
- Nov 17 2016 | 4:46 amoh i forgot to hook up the "frame" message to the movie! no matter which order i try and also when i work with start stop messages i cannot make it work the way i want it to work.
- Nov 17 2016 | 6:00 amMake a jit.movie object. Read in a movie file. When the file is done opening, jit.movie will send out a 'read' message of its own. Use that to trigger a 'getframecount' message. Subtract 1 from the framecount, go to that frame, set rate to -1 (backward), and start the movie (and start banging it).P.S. Any time you open a file of any kind, you're introducing an unknown delay. If timing is critical, you need to work out a scheme to open the files in advance of needing to use them.
- Nov 17 2016 | 6:22 amthanks for the answer! hmmm when i use countdown.mov i can clearly see that it shows 10 and then jumps to 1 at least in my system... so there is no way to make smooth transition between selecting files unless they are preloaded? is a playlist kinda preloading? cause with a playlist at least it makes smooth transitions between selecting different mov files!
- Nov 17 2016 | 9:16 pmhi Linden. this stuff is a little tricky with the AVF engine, because much of its behavior is asynchronous which means it's not so straight forward to trigger a series of actions using messages.the first change to make to your patch, is to use "asyncread" rather than "read" to load your files. you then use the "read" notification, as demonstrated by christopher above, to perform other actions. the "read" message in AVF is there for legacy behavior with older patches that use jit.movie, but should be avoided if possible.the second change to make is that you must use the "seeknotify" notification after sending your frame request, to start frame output. this is a special behavior of jit.movie with the avf engine that accounts for asynchronous seeking behavior, meaning you can't send a seek request (e.g. the "frame" message) and immediately bang the object expecting to get that exact frame.i've modified the patch slightly to show how to achieve your stated goals.and yes, if you want to avoid the pause you either preload the videos, with a jit.movie object for each file (which is how jit.playlist works), or use two jit.movie objects and ping-pong back and forth between them.