AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.4k stars 277 forks source link

MIME Type and UTI? #860

Open jminor opened 3 years ago

jminor commented 3 years ago

We should clarify the MIME Type and UTI that are appropriate for OTIO files.

Currently our documentation says:

TODO: Should we specify a MIME Type `application/vnd.pixar.opentimelineio+json` and UTI `com.pixar.opentimelineio` for OTIO, or just use MIME: `application/json` and UTI: `public.json`?

What is the right MIME / UTI to use? Is this something we need to register with a standards body?

meshula commented 3 years ago

It makes sense to register a mime type, although a generic binding to json is confusing, in the same way the binding to xml or txt might be. I'd recommend adopting .otio instead, in order that applications can filter directory views, and desktop environments like Apple's Finder can display an OTIO icon. As to the UTI, com.pixar.opentimelineio makes sense as these are usually bound to the originator. The alternative is com.aswf.opentimelineio.

For comparison, here is OpenEXR's MIME entry: https://www.digipres.org/formats/sources/pronom/formats/#fmt/1001 and UTI: https://escapetech.eu/manuals/qdrop/uti.html

The process for registration is documented here: http://www.iana.org/assignments/media-types/media-types.xhtml

jminor commented 2 years ago

If we someday change the internal format of .otio files to something other than JSON, should/would the MIME type or UTI change?

meshula commented 2 years ago

The mime/uti tell a compliant parser that it should be able to consume the file ~ so a change from json to binary wouldn't necessarily require new signatures. The extension isn't important either; an extension to mime-type mapping can be set, but it's not exclusive, one could declare the mime-type of foo.bar is image/x-exr and an exr parser would be expected to load and parse it. If you wanted to preserve and abandon old-otio files to old-otio-parsers such that new parsers would never see old-otio, that's the circumstance under which you'd introduce a new mime/uti signature, to avoid crossing the streams.

meshula commented 1 year ago

at first blush, txt/otio would seem to be mime type. Other suggestions welcome. another suggestion is, application/vnd.aswf.opentimelineio

jminor commented 5 months ago

See also discussion here: https://github.com/AcademySoftwareFoundation/tac/issues/541#issuecomment-1887735866