Playing multiple video files in jitter
Hello Jitter Community!
I am relatively new to MAX/MSP/Jitter, and am working my way through the tutorial. I have a relatively firm understanding of how everything works, but I am stumped by what I think should be a video problem.
I have a series of short (<5 second) videos. Let's call them m1.mov, m2.mov and m3.mov. I would like to load these into jitter, specifically into ram using the loadram command. I would then like to play the videos back, only one at a time. For instance in a sample circuit, the user would press 1 to play m1, 2 to play m2 and 3 to play m3. Seems simple enough, yet I'm having a problem preloading all of the movies into jitter.
So far I have used the commands read m1.mov, then append m2.mov, append m3.mov (followed by loadram). This gives me one big file, but it is difficult to get it to play only m1.mov.
I have been trying to get the addtrack to do the same thing as append, but no luck. In my mind, addtrack should add the extra movies as tracks (like a cd has track 1, 2 and 3) and then I can just say ‘play track 2’ somehow. But so far this has not worked, nor have I been able to find much info in the documentation about how to select and play only 1 track.
Does anyone have an idea how this could easily be implemented? Seems like it should be straight forward, but so far no luck.
Thanks in advance for any input!!
Thanks for the reply! I’ll test it out Monday when I have access to my computer with MAX on it. Does your elegant solution preload the videos into memory? I’ll check the circuit on Monday.
Thanks again for your help!
To open the movies automatically, just trigger the ‘read’ messages with a loadbang object. To read the full movies into RAM instead of reading them off of disk, just replace the ‘read’ messages with ‘loadram’ messages.
load a movie into RAM when finished reading …
----------begin_max5_patcher---------- 411.3ocuT0saBBCE9Z3onoWyLTPDX2smiEio.cZMPqiV1Xy369fCv7mIntnb yogSOkuexW6VSCbjrjovnmQuhLL1ZZX.spaXz9sANiVFmRUvX3nBsVJvVMaI KzoLs9qMrl+ANhJVhQya2dCUGuhKVtHmEqalvIb5DaKjia.rX2U+8L7D.GYz 5mH9c3HJx3hJj.NP12rA+lt0M2YZVWrtRwjwTJ5RVGJZVIvRbpjljSy5UkCq POmZQQlBZyCpDudTnWGFuIEZAMCP.+RNmldVs6bv3J92v3gUHbVGoii4LESn oZtTbDO8.p4VedjcaAM+e3iB1mUp4O1nhkhxYzjgSKVWxOC7AdFNCVraLT+y an92neRtA+z4NlvFzVFzNHAgWc7x8Qltte4j0b8j20SxjevY8ZJUCsHipy4k WLwzYQyf2XHjfgRLjQJw.XiS4hSeuEDPc+iMNkrHOtS7sQazdEjvTZt.tSev L0umbvPq3IILX+N9kwS1H4BcKG5419ckR9iJkNwA5gSiKkpPibAFMtlj6C1i p9Xm4O.dyzde -----------end_max5_patcher-----------
Forums > Jitter