How to speed up the display of a sequence of JPGs?

C's icon

I use Max 7.0.3 32bit on a Windows 7 machine with Intel Core i5 CPU 750 @ 2.67GHz and 8 GB RAM and a SSD.

I want to show a sequence of JPG images (1920 x 1080) full screen with each 50ms a new image. I use a jit.qt.movie and a jit.window to do this. It works but the problem is the speed. The loading and displaying of the images takes too much time.

With other software (e.g. the slideshow with IrfanView) loading and dispaying the images is fast enough (even with much bigger jpgs).

How can I get this to work in Max / Jitter?

Thanks!

cracklebox's icon

jit.matrixset might be useful

Christopher Overstreet's icon

or even better, if number of pix is not to high on GPU is jit.gl.textureset

C's icon

Thank you very much for the answers.

I tried to use jit.matrixset and jit.gl.textureset but the problem remains the same: loading of the images takes too much time. Any suggestions how to spped it up?

cracklebox's icon

post yer patch, sounds like you're doing something else wrong, here's a 2 minute patch to show a simple jit.matrixset approach, i can get 200+ fps out of this on a pretty crappy machine

Max Patch
Copy patch and select New From Clipboard in Max.



C's icon

Thank you for the jit.matrixset exmaple. This works fine.

The problem is I have up to 10,000 or 20,000 jpgs.

How do I load them?

And can the jit.matrixset (or the RAM of my PC) hold all these images?

Or do I have to follow another strategy?

Thanks.

Pedro Santos's icon

Are you using the read message to jit.qt.movie?
Use the "asyncread" message instead. And use "jit.qt.movie @output_texture 1".

Max Patch
Copy patch and select New From Clipboard in Max.

C's icon

Thank you for the intersting suggestion with the "asyncread" and "jit.qt.movie @output_texture 1".

But the problem as in my original post remains: The loading and displaying of the images takes too much time.

What else could I try to solve the problem?

Pedro Santos's icon

Well, an image each 50ms equals 20 frames per second. At that frame rate, I guess it would be better to encode the images as a video file with an intra-frame based codec (Photo-JPG, Apple ProRes, ...). There are a bunch of freeware utilities such as "avidemux" that can batch process a folder of images into a video file. You can even play the video file in a non-linear way using the "frame $1" message to jit.qt.movie.

Christopher Overstreet's icon

I second Pedro's suggestion. For the number of images and resolution you want, storing anything in memory (ram or GPU), is not going to be helpful and will end up causing lots of problems to. ie. if I remember right one frame at the resolution you are talking about is like 66M, because jit.matrixset uses uncompressed images. That means only like 190 images on my machine. Making a movie is probably best way to go, though.....
jit.gl.texture takes advantage of GPU jpg de-compression and I can read/display images of your specs directly into there at around 90ms. Maybe your machine is faster. I'm really not sure if the slowdown is my hard-drive, or computer.

abs11's icon

You could also try to store your jpgs as uncompressed jxf files and load them to a matrix. So no jpg decompression is needed. but you have a bigger load because of the bigger filesize. if you se a ssd that should not be a big issue.
hope it helps.
abs