display thousands of images (frame by frame)
Hello
I have a folder of 6000+ images that I am trying use as source material to display each image in sequence (according to date of file creation). The sequenced display of the images needs to be very quick, as I am taking the original date of creation timeline (over two years) and compressing it down to half an hour– essentially, the viewer will see all the images displayed the same tempo that they were taken at, just scaled down to a shorter duration.
My issue is with how to deal with loading such a large amount of images without overloading CPU.
Right now I am using "insert" to place each image with a jit.movie as a single frame: [jit.movie @engine qt @codec photo-JPEG @codecquality 75 @autostart 0 adapt 1]
Then I'm sending a message "frame_true $1, bang" to skip through the frames.
This works will with under 1500 images, but above that it gets very sluggish and CPU spikes.
Does anyone have other suggestions about how to do this? I'd prefer not to have to create a series of video files, as there will be more images added to the collection later...
Many many thank yous!
you have 2 general directions you can go for a solution, load all the images into memory or read the images from disk.
to load into memory, you should use jit.matrixset. you can easily calculate the amount of memory necessary to load your files by adjusting the jit.matrixset matrixcount attribute. e.g. if I instantiate a [ jit.matrixset 6000 4 char 640 480 ] and look at the memory usage, it takes ~ 7.1 GBs of memory to load 6000 640x480 images. you can half the memory requirements by converting to uyvy prior to storing in the matrix set, using jit.argb2uyvy and then converting back on the matrixset outlet using jit.uyvy2argb.
alternatively, you can simply read the files from disk using whatever sequencing logic you are using to load them into quicktime. depending on your disk speed and the file size it may be fast enough for your needs.
Thanks you. I will give these options a try.
Thank so much!