Playing with 100 film clips . .
Hi, I’m trying to create a patch that can handle around 100 high solution film clips and my Mac Pro 2.66 GHz Quad-Core Intel Xeon with 8 GB ram and Max 6.1.8 just crashes all the time. The data is around 1 GB in all and I know, it’s a lot. But is it impossible or is there simply something wrong with my patch? I’m new to Jitter, but know Max/Msp pretty well.
I have been reading about GL, Hap codec and everything around the Jitter forum, but can’t figure it out.
Please help, it’s suppose to be used for a performance with full orchestra and a solo pianist.
The piano player will trigger all the clips with a midi controller, but always just playing one video clip at a time.
Thanks a lot!
You might want to check if you are running out of ram.
If you are using 32bit Max the limit is err 2GB (or is it 4?)
And though your video is 1GB when it is in Ram it is uncompressed so is far bigger.
Saying all this I thought reading a movie into quicktime only loads the first few frames into ram so it might not be down to this at all!
Check it out in the activity monitor.
I made a video piano a few years back!
Thinks which might help you are using a ssd, using a ramdisk, using Resolume(cos its really easy!)
Its definitely possible though.
I don’t know your particular case but keep in mind the distance the audience will be from the screen, at which point they are able to discern individual pixels…
You can make the movies as small as possible (in the sense that they still look fantastic when projected).
Having said that I have had good experience triggering HD (1920×1080) video on a laptop harddisk. It played on a 32" screen mounted on the wall so I wanted native resolution. I looked up the patch I made (a bit messy, it’s from a few years ago…). Mostly it is going the uyuv route instead of RGB (this needs half the data) and doing as much as possible on the GPU.
----------begin_max5_patcher---------- 2341.3oc6bt0aiiaEG+4jOEDFEXaA75g2E09TldAaeo.awrOTftECnkXr0Lx RdjnyktX+tWIRoDmDKZIGIah1NAiijrszg+zed34bHU90quZ1x7GTky.+.3e Bt5pe85qtxbn5CbUy9WMai7gnTYo4iMSmuZUpZ1b6akuSmpz5G2prmiYIY5Y f+Uy6lsaSRV06a9lnlCtUpiVmjs5yEpHs8aQDgKfyAAn5Wwv1We57jDatz4K +x2KBm8z4oPtQoUEeVkIWlZL.3yWXqkYux0G72t955Wl2ylYl59pKW60Rqdv XpyJpNsJPgJKVUXIApSTLad0+OLKvGkETCKPXgAFnCCiPX6E+17LcVENLu0O pxT2ImcPVf26KTl7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lGsEPrOOoTl8Qqr o8Tu2TzBv8oEfF38.h0zsA5QBEKBNvtXSHNssVbvzbGhzm1Gdf2gZTU1.5aa s06MIs.du5lHNe8ao8xOB5LZPXeyfB8s6Yr9XPuRpc4MnWwwI0fpx7FfOlAw FnmPLaAhy4Ld8LlXdVaZbdX1aJbWDzGtxNuXEcL6gedsG360dN7.BjlxaWkx Y6dS0cXxQZACUmRMCkgCI1Eecva2CIX1I3h9zdSQiS3Wdx6y.KCj07Pas7sO zcs7LDMI7DC8Ld1G6gH7K6Qb9bWh6UFEAmW64Xtu4dl4bFky3wHE1QzdHdl8 P8L6oWQcd1Lm9b257AGxTTOFNx92LL7zDu.AMA1LiYWRGjIxlwShMai8j.mF alLEZC6pZf172DplppTu2TzBn9UjPDlmYOb+xUMIvy3SneE4Jc7yLIPPr4hP dQlIjIo+XupY2YjmrInt.MHDaWrrM0Evr2D.Tlm4fqO9SdYwglTqoOAJvgmM 5D3YIB6Y0cQ3YiNJ5iZ9UAIMo1SeFMBe9jyg8pNJmZ07sS7sb616TEkMmSio Lai7K1mXH9bytIY1cMSz9rB0cIsedg4Hxhn0IZUj4wBodB3en5N600Wme65+ CwEFxpA -----------end_max5_patcher-----------
Also you have a metro set to 2, which is very fast. I would set it as high as possible in relation to the movies fps (or a least set the jit.qt.movie to unique 1).
If you have trigger problems and and SSD is not fast enough, make a RAM disk: this is a part of your RAM which will be accessible in the Finder as a disk. Here you can put your files and it will be as fast as ram! Keep in mind: it gets deleted when restarting the computer…
Hope this helps!
I also see you have preroll in you poly~
I have not needed it and this might cause your crash: http://cycling74.com/forums/topic/jit-qt-movie-preroll-crashing-consistently/
Thanks a lot, both of you! I have made a new patch and my fps rate – when a play with the clips – is around 20. Can I get it higher or does it matter?
I removed preroll, but it didn’t change a thing. And so I removed poly~, never really trusted it….
- This reply was modified 7 months by Simon Christensen.
Well these 7 year old tips are still relevant: http://abstrakt.vade.info/?p=147
You should be able to get better than 20fps though if you are only playing one clip at a time!
Encode all your clips to hap and use jit.gl.hap will make a difference.
PS You do know you’re playing those clips at 320×240?
Okay, I converted a file to hap and it grew from 5 mb to 80 mb…..
Rather much, I would say, but maybe it doesn’t matter ?
I thought adapt made the player play it at media resolution, but you can leave away the 320 240. If you play one clip at the time you should get 25fps. (try qmetro of 33).
In my example I converted the media uyuv (can’t remember the settings). Hap is also a way to go now. The files do get very big.
I never used the CPU thing… I use activity monitor from apple. Better to have these things on an other thread?
And I am not sure the highquality setting is needed.
Well if your patch doesn’t crash anymore, I think it is a win!
The link to Vade’s article is excellent, I got my inspiration from there too…
Thanks a lot for all your ideas and thoughts!
I have come up with a very simple patch; poly~ did not work with multiple files, it just crashed all the time.
HAP files was just too big for me; 100 files around 700 MB ending up with 10 GB or thereabout!
The thing is, I’m only playing one clip at a time and my fps is only between 15-20.
It’s playing and it’s ok.
But I just wanted to ask you all if there’s a chance that I can reduce the latency, it’s not really annoying, but it could be improved.
I have Overdrive off and I have attached my audio settings.
Will it improve if I load the files into RAM or any ideas?
I don’t work with audio often and I don’t know what kind of latency (how much) you are trying to reduce.
But did you try a RAMdisk? It’s fast: it’s as if your media is in RAM. See how eg here: http://bogner.sh/2012/12/os-x-create-a-ram-disk-the-easy-way/
You can preload movies in ram via quicktime/qt.movie but that action takes time, so has to be performed befor the decision to load a partical movie.
Otherwise decouple audio and video and load all the audio in Ram, then trigger the audio with the video?
…Forgot to mention, that I’m talking about the time it takes for the next movie clip to respond and not the audio….
Thanks for your reply; I must say, I’m really confused about all the things I read around in this forum!
I have tried so many things; preroll just makes it crash from time to time or doesn’t make a difference, using poly~ just crashes and so on.
But I will stick with my patch, cause’ it doesn’t crash!
I don’t think that my patch reads from RAM, but could you tell me how to preload movies into RAM?
My files are 613 mb in all: 110 movie clips.
- This reply was modified 6 months by Simon Christensen.
Hi Simon, have you tried banging a ‘loadram’ message into jit.qt.movie?
I’m not sure how it would work with multiple movies however.
I don’t know too, maybe read movie then load ram with all the files?
Don’t know if it works, I can’t see if it does load into RAM or not!
Loading a movie from disk to RAM also takes time, so won’t be instant. I don’t think you can preload all your movies in RAM because Max has a RAM limit of 2 or 3 Gb. And then it crashes… so that might be why preroll in poly~ crashed.
You can go around this problem by having the movies in RAM outside of MAX: with a RAMdisk (see link I posted earlier). Then your movies are already in RAM and then they should load fast.
An other approach would be: you know while one movie is playing what the next movie will be. Load movie2 in ram while movie1 is playing. Then the switch should also be fast.
It depends on how many movies, how many ram you have and if the movies are played sequencially…
Simon, Have you considered editing your movies together into one big movie file? You can then load that one movie into RAM beforehand, and then use MIDI to trigger the corresponding playback points (in the same manner that slider works) in your now edited together movie file.
That will mean that you will need to re-edit the movie file and change the time points for your midi triggers when you come to do different performances with different video content.
I will do the RAMdisk thing and if the musician is not satisfied with the patch and find the response time to slow, I will try the one movie thing.
Thanks everybody for being so helpful!
Forums > Jitter