movie bank from andrew benson tutorial
I was looking at Andrew Benson’s last tutorial (The Video Processing System, Part 4) and his bright idea to preload 2 seconds of each movie to speed up the loading via poly~. The only drawback is that each time I drop another folder the current video that was running stops. I searched the archives and found some stuff about jsmoviebank-example but there’s the same problem.
Anybody got a tip to prevent the current movie to stop ?
well, the whole idea behind a poly~ based movie bank is that you load the poly~ once at init time. perhaps you should create one poly~ structure for each folder of movies you have?
You might find asyncread to be helpful. If the issue is actually the loadram or some other method call, I might suggest you stagger your loadram messages to happen every N milliseconds, so that they don’t all execute at once. This could give you less of a complete system stoppage.
Hope this helps.
Thanks for your answers and sorry for the lack of feedback but my internet was down. I’ve choose your solution robtherich. I use two poly object. It’s not really pratical for now but it works as you can see in the patch provided.
@joshua could you explain what do you mean by stagger ? english is not my native language and I don’t understand it in the context.
The only way to avoid burps in video output when you load a movie is to have super fast hardware that makes it less noticeable.
For performance with a limited number of files, the best option is just to load all of them at once and then choose between them. This is the poly method, but you can also achieve the same thing with multiple quicktime objects.
If you’re trying to navigate files freely and load them on the fly, there is no solution, only degrees of freeze. Building something to do a simple slideshow is a nightmare.
A raid array, or solid state drive would probably give you the least noticeable jerks. I noticed a huge difference between using an external USB 2.0 drive from my old laptop, and using an internal, 7200 speed SATA drive on my new one.
Perhaps some day there can be a solution where multi-threading keeps file loading out of the hair of the rest of Jitter. It would be nice to kick the Quicktime API to the curb and seek a less finicky partner for movie playback.
By using two poly like robtherich said, there’s no freeze. Using andrew method, I preload 2 seconds of the beginning and of the end of each movies I’ve got in a folder in the first poly and then read from this one. Then I can load another folder but this time with the second poly. When it’s done I can read movies with this second poly and load another folder with the first. Etc…
I don’t notice any freeze but I have to test it with different effects.