[theora] X-Content-Duration HTTP header
conrad at metadecks.org
Wed Dec 30 07:02:34 PST 2009
2009/12/30 Gregory Maxwell <gmaxwell at gmail.com>:
> On Wed, Dec 30, 2009 at 2:54 AM, Chris Double <chris at cd.pn> wrote:
>> On 12/30/2009 5:58 PM, Ralph Giles wrote:
>>> I've created http://wiki.xiph.org/ContentDuration as a place to work on a draft.
>> RFC 3803 seems to be for a Content-Duration header. Unfortunately it is
>> integer value of seconds only.
> The floating point values being used in X-Content-Duration can't
> *exactly* express many durations, for example 130 frames at 30 fps.
> Very close but not quite exact may be suitable for scaling a seek bar
> in a browser, but it's not hard to imagine applications where the
> *exact* duration is needed.
> Should an opportunity be taken to support a rational number for
> duration like is used for FPS?
sure, if we're basically making a new header we can make it better.
Durations, timestamps etc. are usually best expressed as
timespec:hh:mm:ss::ff with the framerate given in the timespec (eg.
The rationale for using a floating point number here was only that it
is simpler to generate and parse correctly -- being human-readable is
less important for HTTP headers (eg.
However a big rational number (eg. 16717/30 for the above) is pretty
useless for humans, and more so when it's a large duration multiplied
by something like 30000/1001. At least with a decimal number you can
eyeball it and get some idea of the actual duration when testing an
So if we want to express duration with frame accuracy, I think we
might be better off going with a full breakdown in hh:mm:ss::ff.
More information about the theora