[vorbis] .ogg file extension for both audio and video?

Stan Seibert volsung at mailsnare.net
Sat Jul 5 04:15:48 PDT 2003



On Sat, 2003-07-05 at 10:52, lorenzo at princenet.sytes.net wrote:
> for the user.  The operating system can see by a very simple calculation what type a file is and should NEVER rely on 
> the last few letters of the file, which could be renamed or deleted entirely when a file is renamed.  Also, if a single 

Just to point out, some times this "simple calculation" is more
complicated than it looks.  Properly detecting MP3s gave me grey hair,
and the general case of determining whether a given Ogg files should be
played by a music player (audio only) or a movie player (audio/video) or
some other player (SMIL stream anyone?) would require a little work.

Not to say this is insurmountable, but it is something to keep in mind
when designing a file detection system.  In some cases, looking at the
first dozen bytes is not enough.

This also brings up the question (maybe already posed, I've not been
reading this thread very closely), what is it you are trying to
represent with the extension?  What the file IS, or what program the
file SHOULD BE OPENED WITH?  I suspect that ultimately, the latter is
what you care about. There is a one-to-one mapping between the two often
enough that it is easy to confuse the two, though.

Given that, I would be inclined to use extensions to hint to the shell
which application I want the file to be OPENED WITH, and ask that
individual applications use file contents to figure out what the file
IS, and to use the appropriate decoding routines.  That is to say, no
movie player should care what I name my Theora files (.ogg, .ogm,
.movieplayer2004, etc.), but the shell launching apps on my behalf
might.

Someone with pre-OS X knowledge of MacOS can probably remind us how they
used to address this.  I seem to recall that files had two associations,
though I don't remember how they were defined.


---
Stan Seibert

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis mailing list