Re: Re: Storing header backups, and other important stuff

Lasse Karkkainen <[email protected]> Wed, 03 Jul 2002 20:12:31 +0300
Newsgroups gmane.comp.video.mcf.mplayer
Message-ID <[email protected]>
> There's a drawback to this, because this info won't be available to the 
> player, if it plays the file as a stream (e.g. inet-streaming), where seeking 
> in the file is not possible.

If the whole file is available, then those headers are available too. 
Can be found by seeking to EOF: Main Footer is there and it contains all 
information.

> So maybe there should be two different variations, one with stats at the 
> beginning, if writing like that is possible and one with file stats at the 
> end, if data is multiplexed to an unseekable stream.

There is always a Main Header copy at the beginning. If Linear Write 
(LW) is used, some information (total file length, etc) may be missing. 
But, if LW is used in the primary copy of Main Header, there must be a 
full version of Main Header in Main Footer.

In other words: if your file is fully downloaded (and is not broken), it 
will contain that info in some seekable position.

Good players should support backward-seeking even on streams/broadcasts.

- Tronic -