On 10/2/06, Tim Starling <t.starling(a)physics.unimelb.edu.au> wrote:
[snip]
In MediaWiki, we can detect the file type on upload
and store it in the
DB. Then we can use that information in the DB to output the appropriate
HTML, if indeed a different player is required. But there is a clear
benefit to the ability to distinguish audio from video, after the user
downloads the file to their computer. In fact, I'm surprised .ogg is
used for video so widely given the obvious benefit of a discriminated
type, in this environment. Even if you use the same player for both
audio and video, it's nice to know what's what when you're looking at a
big list of files.
Well there are tens of thousands of permutations of things that can go
inside an ogg container..
Any combination of any number of streams made from:
Theora (compressed video)
Tarkin (compressed video)
Dirac (compressed video)
UVS (YUV 4:2:2 uncompressed video)
Vorbis (lossily compressed audio (up to 256 channels))
Speex (lossily compressed audio, tuned for speech)
Flac (losslessly compressed audio)
PCM (uncompressed audio)
Writ (efficient subtitles)
Annodex (realtime XML stream)
MIDI
Plus a number of less supported things
MPEG4 (via xvid, often called OGM)
MP3
AAC
DTS
Ogg can multiplex any number of these streams in any mixture. A proper
player is able to play only the streams it understands and skip the
rest (although quite a few explicitly catch that case and abort... but
the reference libogg stuff does the right thing).
So, would you propose that each permutation get its own extension?
Which subset?
Proper desktop systems have been doing the right thing for ages now,
for example the Gnome file manager doohicky (nautilus) correctly shows
a thumbnail and movie strip views on video files, while it shows a
music icon on audio files.
Even Windows Vista can happily differentiate files with file magic...
Extensions are just too inflexible to match up with reality... Ogg
isn't at all the only container to give up on that.. for example, what
extension does a PDF of layed out ascii have? A PDF of scanned pages?
A PDF of postscript algorithms that computes fractals?