Login  Register

Re: Compress AVI for ImageJ

Posted by Michael Schmid on Dec 04, 2014; 10:00am
URL: http://imagej.273.s1.nabble.com/Compress-AVI-for-ImageJ-tp5010753p5010757.html

On Dec 4, 2014, at 00:44, Peter Paul Arlinghaus wrote:

> I have to analyse big Video files. About 1-3GB. This is to big for ImageJ.

Hi Peter,

If you open an (uncompressed) AVI as virtual stack, the file size does not matter, it only keeps the frame currently visible in memory. You can then view the video and perform read-only operations, such as "Analyze Particles"
An alternative: Read only part of the video (the AVI import dialog has an option to select which frames), and process it in parts.

> I'm using Ubuntu. I already tried winff and avidemux. And ist was possible to get the videos small enough, and still to have good quality.

If you want to process the whole video in ImageJ: As soon as any operations modify the frames, ImageJ must load everything into memory. In that case it won't help to compress the video on disk, because it must be uncompressed as soon as it is in ImageJ.

> But ImageJ always say that this compression can't be read. And I have tried several. How can I fix this ? which compression does ImageJ accept ?

Plain ImageJ only accepts very few compression techniques, to keep the code simple and partly related to licensing/copyright issues, but also because compression causes artifacts that should be avoided in scientific image processing.

Plain ImageJ supports the following types:
- Raw video with 8-bit or 16-bit grayscale and RGB (3 * 8 = 24 bits/pxl)
- Various color ('chroma') subsampling types, because frame grabbers or cameras often deliver these as raw format (Y422, YUYV, I420, NV12, and the like)
- PNG or JPEG compression of individual frames (the latter is also known as MJPG).

Michael

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html