Login  Register

Re: AVI, Virtual Stack, >1GB boundery?

Posted by Michael Schmid on Dec 10, 2008; 11:24am
URL: http://imagej.273.s1.nabble.com/AVI-Virtual-Stack-1GB-boundery-tp3693422p3693427.html

Hi Jesper,

as far as I know AVI 2 requires use of index tables, though they seem  
to have a different (two-level) format than AVI 1 (and different  
fourCCs, 'indx' and 'ix##', not 'idx1').
   http://www.the-labs.com/Video/odmlff2-avidef.pdf
So one should be able to get the pointers to the individual frames  
from these tables, without scanning the full file. Reading the tables  
may require some programming effort, but it should make opening a  
large file as virtual stack much faster.

There seems to be some confusion in AVI 1 how to interpret the  
offsets given in the index tables (what they are relative to); and  
programs should probably check the first frame to get the way how the  
offset is calculated (hummm - one of these great format  
specifications by Microsoft that Microsoft does not adhere to; some  
sources say that the reference to the offset was changed once more in  
avifil32.dll of Vista). At least in theory, I think that this problem  
should not exist for the AVI 2 index.

Best wishes,

Michael
________________________________________________________________

On 9 Dec 2008, at 18:59, JesperSP wrote:

> Hi Johannes,
>
> I think bashing my own ability rapidly develop applications in  
> Java, as much
> as my (apparently) faulty belief that Java is slower than native  
> Win32 code
> ;-). The plugin that I modified seeks through the 20GB file to  
> locate all
> frames before it loads the first frame for the virtual stack. I  
> would be
> better if it simply loaded the first frame, and waited to scan for  
> further
> frames until these were needed (same as what MovieIO does). I could  
> try to
> program this in java, but I'm much more familiar with Delphi, so I  
> guess I
> could make faster progress trying to make the same in Delphi (I was  
> thinking
> out loud I guess).. Maybe I should take the time familiarize myself  
> with
> Eclipse (I guess Delphi is being depreciated), so that I can build  
> java
> application/plugins faster..
>
> Cheers,
> Jesper
>
>
> Johannes Schindelin wrote:
>>
>> Hi,
>>
>> On Mon, 8 Dec 2008, JesperSP wrote:
>>
>>> I have read up on the AVI file format, and "hacked the  
>>> AVI_reader.java
>>> so it recognizes the extra RIFF->AVIX segments beyond 1GB - it works
>>> great, but it does take a very long time for ImageJ to scan a  
>>> 20GB file
>>> for the pointers to all the frames. If anyone want it I can  
>>> upload it on
>>> my server, but I cannot guarantee that it'll work for all large AVI
>>> files. For the simple analysis I want to make, I'm considering  
>>> making a
>>> low-level analysis program in a faster language like Borland Delphi.
>>
>> I doubt that the speed has anything to do with the speed of the  
>> language,
>> as the problem here is seeking on the disk.
>>
>> Regardless, if you use Java 1.5 or newer, I sincerely doubt that  
>> the speed
>> difference between Java and Delphi is substantial.  Although I do  
>> hear the
>> myth that Java is slow all the time.
>>
>> In any case, making your changes public would help a few people, I  
>> guess.
>>
>> Ciao,
>> Dscho
>>
>>
>
> --
> View this message in context: http://n2.nabble.com/AVI%2C-Virtual- 
> Stack%2C-%3E1GB-boundery--tp1581053p1635055.html
> Sent from the ImageJ mailing list archive at Nabble.com.