Image Importer

Image importer speed up?

vaportrail's picture

Hi! I have a problem with the image importer patch. In my composition I have a basic directory scanner -> image downloader -> billboard chain+syphon client. In the folder there are several thousands of images, all max 1440x1080, medium to low jpeg settings. The goal is to show them smooth at 30fps and record it with syphon recorder at FullHD/30p.

However, the composition does not run steady at 30fps. Photos from my digital camera run at max. 20fps, whereas other images (screenshots, isight photos, etc) run at 30fps. Everything runs really fast, but the difference in speed between the different kind of images are really noticeable. Moreover, I sometimes get a "black frame" when loading the next image happens a little too slow, and that also shows up in the video recorded with syphon. In some cases there are even some glitch effects in the syhpon video or the recording breaks.

I have an 2011 MacBook Pro, running Snow Leopard with 8gb ram and a AMD Radeon HD 6750M Graphic with 1gb.

Is there a way to speed up the image importing process and balance everything? There is an option called "Maximum Cache size"in the image importer patch, but it only caches the past images. Quartz Crystal works fine, but it is necessary to run everything in realtime.

thanks for your help, Sebastian

Image Cache location

mattgolsen's picture

Can anyone point me to where the native Image Importer cache is located?

Embedding Movies in Quartz Composer : Image Structures

gtoledo3's picture

It is possible to embed a movie in Quartz Composer, by following these steps:

  1. Convert the movie to an image sequence.

  2. Convert that sequence to a multipage document (like a pdf or gif).

  3. Place an Image patch on the surface of the QC Editor.

  4. Select the Image patch. Go to Settings, using the Patch Inspector. Under Image Options, select Extract All Images. Choose Import From File, choose your file, then select Open to load it into the Image patch.

    Now, the Image patch will output a structure of all frames from your movie/image sequence. By connecting a Structure Index to the output of the Image patch, and then connecting the output of the Structure Index patch to a Billboard (or other patches that render an input image), one will render the first frame in the sequence.

  5. Connect an Image Dimensions patch to the output of the Structure Index. Connect the Width and Height outputs to the Width and Height Inputs of the Billboard patch. To obtain both Width and Height Inputs for the Billboard patch, select the Patch Inspector, go to Settings, and select Custom Size.

    One should now have a Billboard rendering the first frame of the Image Sequence, referencing said Image for it's Width and Height.

  6. Now, select another Structure Index. Connect the output of the Image Patch to this Structure Index, and the output to the existing Billboard.

    By using an Interpolation or LFO patch, one could play through frames, but a good starting point for movie playback is to create a looper macro with definable FPS. There are multiple ways to achieve this. An easy way is to :

  7. Take the Patch Time, and multiply by an Operand using the Math patch, which will become the Frame Rate of the playback.

  8. Then, take a Math Expression patch and enter "a % b" into Settings.

    In this case, "a" will take the output of the Math patch. Place a Structure Count patch on the Editor, connect the input to the output of the Image patch, and the output Count to input "b" on the Math Expression patch.

  9. Take the second Structure Index that you created, and which should be connected to the Billboard, and connect the output Result of the Math Expression patch to the Index input of the Structure Index. Enter in the desired playback rate, by changing the multiplicative Operand on the Math Patch. Publish this input and call it Frame Rate.

...and you're done! One should have a qtz that is playing back an embedded movie, with ability to define the rate of playback.

For an example of this, reference the attached file.


I've tested this with multi-page pdf's and gif images, though I'm guessing that multi-page tiff would likely work as well.

For creating your own from scratch, it's easy to convert movies to Image Sequences using Quicktime's Export to Image Sequence ability. From that point one, can use a utility program to create a gif, or use Preview to convert to pdf.

I would think it would be possible to merge a pdf document by using Preview, and according to some unofficial documentation I've read, but when I drop multiple pdf's onto the sidebar in Preview, it doesn't give me a "bound"/merged document. I've used an older free utility called "pdfsam", which will successfully create a merged pdf document with correct ordering.

For the sake of size (and cost of quality), one may want to reopen the merged pdf in Preview and Save using the "Reduce File Size" Quartz Filter option.

The creation of Image Sequence from movie, to merged pdf or gif file seems like something that should be scriptable, to avoid having to use various applications to prep the Image document, but I haven't investigated the automation of that process yet.