I'm hoping someone can hlep me with some video optimization.
I've been writing a sketch that takes a library of video files and displays them simultaneously on a 3 x 3 grid.
I want them to be able to load the videos from on the fly, based on a conceptual layer of relationships to each other.
One class is "Clip", which describes the meta data for the video. like frames, name, length, current frame.
Another class is "Relationship" which connects the clips, so if one clip is in playback, it looks to the relationship object of that clip to see if other clips should be triggered in playback.
These relationship objects also have values which can be adjusted on the fly through the interface. E.g. If clip A is playing, there's a 50% chance of a clip B being played on an adjecent grid co-ordinate.
The idea being that once a network of relationships for the clips are defined, videos can be "chained" on the fly depending on the relationship objects.
The current implementations initalises all the clips on start up, loading all the frames for each video in the "clip" object, so that when it comes to playback everything runs smoothly. This works with a small library of clips.
Unsurprisingly i'm running out of memory as things scale up. And load times are a killer.
What's the best way to cache load clips as needed?
i've been doing it rather nastily as small gif animations. Recorded and played back using the gifAnimation library. 320x240. Priority is smooth playback over resolution. Especially since all the videos are in a grid, things get big anyway.
Tried unsuccessfully to use GSVideo, but maybe i need to give it another crack.
I'm also using the NApplet library too, so i can have seperate windows for the interface and playback. But this means i could only get it working in Processing 1.2.1. Also because of these libraries i'm running P2D.
Have tried various forums without much luck so far.
Any ideas, thoughts, links, resources would be much apprecitated!