About mimetypes and action definitions

Ilmari Heikkinen kig at misfiring.net
Sat Dec 25 13:08:05 EET 2004

On 22.12.2004, at 20:35, Christophe Fergeau wrote:

> mime types aren't really flexible enough to describe the content of a 
> multimedia container (like ogg or avi) which can contain several video 
> or audio streams encoded in different formats.

A good point.

How to fix this? It seems to be a common problem. Directories, 
tarballs, media containers, device files, xml -- all these live in a 
sort of "don't care"-limbo. New magic to handle those? "This is an 
appdir, that's a usb thumbdrive, that tarball contains an installable 
program (INSTALL, ./configure, Makefile..), these xmls use that xml 
schema, marking as text/xml/http://foo/bar/schema.xml". It doesn't have 
to be perfect, mime detection as is isn't perfect either, but it _is_ 

Re: media files, could ask e.g. gstreamer about what the multimedia 
container really is. Getting subclasses such as application/ogg/(video: 
xvid, audio: vorbis), and the actual stream formats can then be 

Then again, the easiest way to go with media files is to mark the 
things the format is usually used for and trust the handling programs 
to figure it out.


More information about the xdg mailing list