Forums > Jitter

Playing with 100 film clips . .

August 29, 2014 | 12:45 am

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!


August 29, 2014 | 2:19 am

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.


August 29, 2014 | 3:29 am

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.

– Pasted Max Patch, click to expand. –

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!


August 29, 2014 | 3:41 am

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/


August 29, 2014 | 4:41 am

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….
Simon


August 29, 2014 | 6:01 am

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?


August 29, 2014 | 9:55 am

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 ?


August 29, 2014 | 11:13 am

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…


September 5, 2014 | 12:06 am

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?
Thanks!
Simon


September 5, 2014 | 7:40 am

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?


September 5, 2014 | 11:09 am

…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.
Simon



SID
September 5, 2014 | 10:17 pm

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.


September 6, 2014 | 7:48 am

Hi SID!
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!
Simon


September 6, 2014 | 2:31 pm

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…



SID
September 6, 2014 | 6:04 pm

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.


September 7, 2014 | 2:00 am

Much appreciated!
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!

Simon C


Viewing 16 posts - 1 through 16 (of 16 total)