[MPlayer-users] Re: divx 6

Alexander Noe' alexander.noe at s2001.tu-chemnitz.de
Sun May 7 01:13:43 CEST 2006


Michael Niedermayer schrieb:

> do they have 2 or more frames with differnt sizes in a chunk? rich said
> they are unplayable without index, not only unseekable, so my guess is yes
> and thats where you break the avi spec

That's what AVIF_MUSTUSEINDEX is for.

Here you see M$'s skills in writing, the explanation actually says 
"should use", but then the name of this flag would be kinda silly, so 
one of those is a typo, and we are working with b0rky specs. I didn't 
even notice that one so far.

You can say the existence of this flag is b0rked, but an AVI file is 
not required to be playable without the index.

> compressed video frames can vary in size -> dwSampleSize = 0
> "If it is zero, each sample of data (such as a video frame) must be in a separate chunk."

You could put several audio frames, like several MP3 frames, into one 
chunk this way, and point to each frame in the index. This would still 
be using the low overhead rule.

Also:
 >>>
dwScale

Used with dwRate to specify the time scale that this stream will use. 
Dividing dwRate by dwScale gives the number of samples per second. For 
video streams, this is the frame rate. For audio streams, this rate 
corresponds to the time needed to play nBlockAlign bytes of audio, 
which for PCM audio is the just the sample rate.
<<<

You can read it like "dwScale and dwRate can be used to redefine what 
a frame or a sample is by setting those values to something resulting 
in the definition you want to enforce". And voilà, no conflict anymore 
even with several unseparable units of viewable data (this is what you 
are referring to as 'video frame' but is subject to be redefined) in 
the same chunk...

Also, the question would be if AVIF_MUSEUSEINDEX implies that the 
index defines what a chunk is, and that the RIFF structure above must 
be maintained only because AVI files are RIFF files. It would be 
interesting to see what happens when using a garbage chunk ID for 
video/audio chunks in a file for which the flag is set...




Alex


-- 
„Der Horizont vieler Menschen ist ein Kreis mit dem Radius
Null – und das nennen sie dann ihren Standpunkt. (Albert
Einstein)“




More information about the MPlayer-users mailing list