<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<rfc ipr="full2026">
  <front>
    <title abbrev="Temporal URI Fragments">Syntax of temporal URI fragment specifications</title>

    <author initials="S.P." surname="Pfeiffer" fullname="Silvia Pfeiffer">
        <organization abbrev="CSIRO">Commonwealth Scientific and
        Industrial Research Organisation CSIRO,
        Australia</organization>
        <address>
           <postal>
              <street>Locked Bag 17</street>
              <city>North Ryde</city>
              <region>NSW</region>
              <code>2113</code>
              <country>Australia</country>
           </postal>
           <phone>+61 2 9325 3141</phone>
           <email>Silvia.Pfeiffer@csiro.au</email>
           <uri>http://www.cmis.csiro.au/Silvia.Pfeiffer/</uri>
        </address>
    </author>

    <author initials="C.D.P." surname="Parker" fullname="Conrad D. Parker">
        <organization abbrev="CSIRO">Commonwealth Scientific and
        Industrial Research Organisation CSIRO,
        Australia</organization>
        <address>
           <postal>
              <street>Locked Bag 17</street>
              <city>North Ryde</city>
              <region>NSW</region>
              <code>2113</code>
              <country>Australia</country>
           </postal>
           <phone>+61 2 9325 3133</phone>
           <email>Conrad.Parker@csiro.au</email>
           <uri>http://www.cmis.csiro.au/Conrad.Parker/</uri>
        </address>
    </author>

    <date month="June" year="2003"/>

    <abstract>
      <t>This document specifies a syntax for temporal offsets and
      intervals as URI fragments. Such fragment identifiers are useful
      to directly access temporal offset points and intervals in
      time-continuous resources such as audio and video. The URI
      fragment syntax specified in this document is comformant to the
      Generic URI Syntax as specified in <xref target="URI">RFC
      2396</xref>.
      </t>

      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described
      in <xref target="KEYWORDS">RFC 2119</xref>.
      </t>

    </abstract>

  </front>
  
  <middle>
    
    <!--**************-->
    <!-- INTRODUCTION -->
    <!--**************-->
    <section title="Introduction">
      
      <t>Many resources on the Internet are time-continuous data such
      as audio or video files or streams. This document describes a
      standard way of addressing temporal offsets into and temporal
      intervals of such resources through a temporal URI fragment
      syntax. In this way, points of interest and intervals in
      time-continuous files or streams can be directly accessed.  The
      aim is to make it simple to incorporate infrastructure into the
      Web which supports the browsing and searching of time-continuous
      media. The interpretation of the temporal fragment is however
      dependent on the URI scheme in use and the content type of the
      resource referenced.
      </t>

    </section>
    
    
    <!--*********************************-->
    <!-- Temporal fragment specification -->
    <!--*********************************-->
    <section title="Temporal fragment specification">
      
      <t>Fragments are generally specified in a URI after the
      crosshatch ("#") character. The format of fragment identifiers
      specified in this document is conformant to the <xref
      target="URI">URI RFC 2396</xref> for fragment identifiers, but
      retricts their use to an interpretation on the user agent
      only. See section 5 for a proposed alternative usage.
      </t>

      <t>Temporal fragments start with the reserved character "@",
      representing the time-continuous resource "at" a certain
      temporal offset. The "@" character is reserved and this
      specification is giving it a reserved purpose. Having the "@"
      character at the start simplifies parsing of a temporal fragment
      specification, helping to e.g. distinguish between a fragment
      given by name as "#smpte-25" and a fragment given as a temporal
      offset as "#@smpte-25=01:01:01:01".
      </t>

      <t>The specification of a temporal fragment offset itself is
      given as a name-value pair, where the name specifies a time
      scheme to use and the value is the time specification
      itself. The syntax is closely related to the specification of
      relative timestamps of the RTSP protocol parameters as given in
      <xref target="RTSP">RFC 2326</xref>.
      </t>
      
      <t>Temporal intervals can be specified as well. This is achieved
      by adding the reserved character "-" and another time
      specification that adheres to the time scheme used for the
      specification of the first time point.
      </t>

      <t>The BNF for temporal fragment offsets and temporal intervals
      is:
      </t>

      <artwork><![CDATA[
temporal-fragment = "@" [ timescheme "=" ] timespec ["-" timespec]

timescheme     = *unreserved

timespec       = *uric
	]]></artwork>
      
      <t>There are several time schemes that can be used. The default
      time scheme is "npt" (normal play time). The available time
      schemes and their specifications are described in the next
      section.
      </t>

    </section>

    
    <!--**************-->
    <!-- Time schemes -->
    <!--**************-->
    <section title="Time schemes">

      <t>A time scheme is a short identifier for a type of time
      specification. The following general time schemes are specified
      in this document. Further time schemes are expected to emerge
      and should probably be registered through IANA (XXX this needs
      to be discussed XXX).

	<list style="symbols">
	  <t>"npt" (Normal Play Time; base of seconds as used in the
	  <xref target="RTSP">RTSTP standard</xref>)
	  </t>
	  <t>"smpte" (Society of Motion Picture and Television
	  Engineers time codes as specified in the <xref
	  target="SMPTE">SMPTE time and control code standard</xref>)
	  </t>
	  <t>"utc" (Universal Time Code giving wall-clock time as
	  specified in the <xref target="ISO8601">ISO 8601
	  standard</xref>).
	  </t>
	</list>
      </t>

      <t>Thus, the available time schemes are:
          <list style="empty">

	  <t>NPT time has a second or subsecond resolution. It is
	  specified as H:M:S.h (npt-hhmmss) or S.h (npt-sec), where
	  H=hours, M=minutes, S=second and h=fractions of a
	  second. Negative values are not allowed.
	  </t>

	  <t>Specification as BNF:</t>
      <artwork><![CDATA[
npt-spec    =  "npt=" npt-time
npt-time    =  npt-sec | npt-hhmmss
npt-sec     =   1*DIGIT [ "." *DIGIT ]
npt-hhmmss  =   npt-hh ":" npt-mm ":" npt-ss [ "." *DIGIT ]
npt-hh      =   1*DIGIT
npt-mm      =   1*2DIGIT
npt-ss      =   1*2DIGIT
        ]]></artwork>

	  <t><xref target="SMPTE">SMPTE time codes</xref> are
	  optimized for frame level accuracy.  SMPTE is specified as
	  HH:MM:SS:FF, where HH=hours, MM=minutes, SS=second,
	  FF=frames. The drop-frame algorithms for calculating the
	  exact times can be found in the references SMPTE
	  standard. Negative values are not allowed.
	  </t>

          <t> "smpte-24=" SMPTE time with a 24 fps basis</t>
          <t> "smpte-24-drop=" SMPTE time with a 24/1.001 fps basis</t>
          <t> "smpte-25=" SMPTE time with a 25 fps basis</t>
          <t> "smpte-30=" SMPTE time with a 30 fps basis</t>
          <t> "smpte-30-drop=" SMPTE time with a 30/1.001 fps basis</t>
          <t> "smpte-50=" SMPTE time with a 50 fps basis</t>
          <t> "smpte-60=" SMPTE time with a 60 fps basis</t>
          <t> "smpte-60-drop=" SMPTE time with a 60/1.001 fps basis</t>
	  <t>Specification as BNF:</t>
      <artwork><![CDATA[
smpte-spec  = smpte-type "=" smpte-time
smpte-type  = "smpte-24" | "smpte-24-drop" | "smpte-25" |
              "smpte-30" | "smpte-30-drop" | "smpte-50" |
              "smpte-60" | "smpte-60-drop"
smpte-time  =  smpte-hh ":" smpte-mm ":" smpte-ss [ ":" *2DIGIT ]
smpte-hh    = 1*2DIGIT
smpte-mm    = 1*2DIGIT
smpte-ss    = 1*2DIGIT
        ]]></artwork>

	  <t>UTC time has a second or subsecond resolution.  It is
	  given as YYYYMMDDTHHmmss.hhZ, where Y=year, M=month, D=day,
	  H=hour, m=minute, s=second, h=subseconds (one-hundredth of a
	  second).
          </t>

	  <t>Specification as BNF:</t>
      <artwork><![CDATA[
utc-spec    = "clock=" utc-time
utc-time    =   utc-date "T" utc-hhmmss "Z"
utc-date    =   8DIGIT
utc-hhmmss  =   6DIGIT [ "." *DIGIT ]
        ]]></artwork>

          </list>
      </t>

      <t>Examples for specifications of temporal fragment offsets are:</t>
      <figure>
	<artwork><![CDATA[
http://www.foo.bar/matrix.au#@smpte-25=10:07:33:06
http://www.foo.bar/matrix.au#@npt=10:7:33.25
http://www.foo.bar/matrix.au#@10:7:33.25
http://www.foo.bar/matrix.au#@npt=36453.25
  (all four specify the same time point)

rtp://www.foo.bar/matrix.mpg#@clock=20021107T173045.25Z
  (for Thu Jul 11 05:30:45 UTC 2002 and a quarter seconds)
	  ]]></artwork>
      </figure>

      <t>The semantic interpretation of time specifications given with
      any of the schemes depends on the resource. With every resource
      there are two associated timebases: a UTC timebase which may
      e.g. specify the creation time of the resource, and a playback
      timebase used for display in a user agent while viewing the
      resource.
      </t>

      <t>The playback timebase of a resource defaults to 0 seconds if
      the resource has no other timebase associated with it. For
      example, with professional video production, the first frame of
      video of a program normally refers to a SMPTE timebase of
      01:00:00:00, not 00:00:00:00.  This practice arose from the
      requirements of program production and analog videotape
      recording technology, and it has subsequently become a uniform,
      almost ironclad practice worldwide. Associating such a practice
      to a digital video resource requires a way to store that
      timebase with the resource, which may or may not be possible,
      depending on the content type of the resource.
      </t>
      
      <t>Examples: If a resource has an associated timebase of 3600
      seconds, and the given temporal fragment offset is 4000 sec, a
      seek time 400 sec into the resource is requested. If the
      timebase is given as clock time 20001010T142211.23Z and the
      temporal offset specified is 20001010T145511.23Z, the time 33
      minutes into the resource is requested.
      </t>

      <t>The UTC timebase of a resource defaults to
      non-specified. Associating such a UTC timebase with a resource
      requires a way to store that timebase with the resource. For
      example, for a resource that is a file on a server, it may be
      chosen to be the time of storage of that resource.
      </t>

      <t>Examples for specifications of temporal intervals are:</t>
      <figure>
	<artwork><![CDATA[
http://www.foo.bar/matrix.au#@smpte-25=10:07:33:05-10:07:37:21
http://www.foo.bar/matrix.au#@npt=10:7:33.25-10:7:37.8
http://www.foo.bar/matrix.au#@10:7:33.25-10:7:37.8
http://www.foo.bar/matrix.au#@npt=36453.25-36457.8
  (all four specify the same temporal interval)

rtp://www.foo.bar/matrix.mpg#@clock=20021107T173045.25Z-20021107T173049.80Z
	  ]]></artwork>
      </figure>

      <t>The semantic interpretation of these temporal intervals
      depends on the time scheme. Unless specified differently, the
      temporal intervals given are closed intervals, i.e. they start
      at the first time point and finish at the second time point:
      [time_from;time_to]. For SMPTE timecodes, however, it is
      conventional to express such temporal intervals as IN and OUT
      times for editing. Thus, the IN time specifies the first frame
      that is included in the interval and the OUT time specifies the
      first frame that is not included in the interval. Therefore, a
      SMPTE interval is specified as [time_from;time_to[, which
      explains the additional frame in the above example.
      </t>
    </section>


    <!--*******-->
    <!-- Usage -->
    <!--*******-->
    <section title="Intended usage">

      <t>The temporal fragment specification scheme is intended to be
      used on time-continuous resources. An example of such resources
      are all resources of MIME types "audio/*" and "video/*". The
      protocol through which these resources are accessed are expected
      to be mainly http or rtp/rtsp, which are especially suited for
      such resources.
      </t>

      <t>It is RECOMMENDED that user agents do not strip off the
      temporal fragment from a given URI before forwarding it to a
      server. [XXX: This is contrary to the current prescription in
      the URI standard and needs to get resolved -> see Section 6.]
      </t>

      <t>A retrieval action on a URI that includes a temporal fragment
      SHOULD result in a time-continuous resource that starts at the
      given temporal offset. As time-continuous resources often come
      with high bandwidth requirements, this avoids unnecessary
      network load. For example, a 1 hour Digital Video (DV format)
      requires about 25 GB (MPEG-2 reduces that to about 3 GB, but
      this format must be prepared for addressing high-quality,
      high-resolution time-continuous bitstreams of the
      future). Serving out only the requested interval of a resource
      also significantly reduces the delay for the user agent for
      receiving relevant data. Alternatively, the user agent MAY wait
      until the retrieval action has failed, then resend the URI with
      the fragment stripped off and perform the offset action locally
      on the retrieved resource.
      </t>
      
      <t>Servers that support the temporal fragment offset MUST
      implement a retrieval action of time-continuous resources with
      such fragment specifications by serving the requested resource
      from the temporal offset onwards. For many time-continuous
      resources - especially when in compressed format - this means
      that the server has to parse the structure of the resource and
      construct another valid resource from the original resource's
      header information and data frames. If a server cannot perform
      the fragment offset, it MUST return an error as otherwise the
      user agent cannot identify if the offset action was performed or
      not.
      </t>

      <t>It is expected that over time more servers and client
      applications understand and handle the temporal fragment offset
      and thus enable direct networked access to content in
      time-continuous resources. Also network proxies may begin to
      understand such temporal offsets and can exploit them for
      caching.
      </t>

    </section>
    

    <!--*************************--> 
    <!-- Security considerations -->
    <!--*************************--> 
    <section title="Security considerations">

      <t>This specification does not create any new security issues
      beyond the ones already specified for URIs in <xref
      target="URI">RFC 2396</xref>.
      </t>

    </section>

    <!--***********--> 
    <!-- Disputes -->
    <!--***********--> 
    <section title="Disucssion points to be resolved">

      <section title="Interpretation of temporal fragments on server">

        <t>In the current version of the <xref target="URI">URI
        standard</xref>, it is prescribed that fragment specifications
        get interpreted by the user agent. Therefore, the intended use
        of fragments to retrieve only a temporal interval of the
        time-continuous data or the data from a certain offset point
        onwards is not generally allowed. However, there are ways to
        effectively get around this restriction by using (mis-using?) 
        communication protocols.
        </t>

	<t>When using http, we can invent a new protocol parameter
	that gets filled by the user agent with the temporal fragment
	specification and that gets interpreted by the server. If we
	don't do that, we seriously defect http from being usable for
	time-continuous media in the future.
	</t>

	<t>When using rtp/rtsp, a client can strip off the fragment
	specification and map it onto the Range header field of the
	rtsp protocol, which will then tell the server which subpart
	of the time-continuous data bistream to serve out.
	</t>

	<t>A much cleaner way to resolve this problem would be to
	change the URI standard to allow for a server-side
	interpretation of fragment offsets after all other actions
	have been performed on the resource. This will make it
	independent of the protocol in use and it will enable
	intermediate proxies to store and forward parts of a media
	resource. It is then the user agent's choice whether or not to
	strip off the fragment offset and interpret it locally after
	the retrieval action or to forward it to the server with an
	expectation to receive only that subpart of the resource.
	Servers are not forced to implement that specification. It is
	however necessary to return an error if they cannot handle
	temporal fragment specifications to avoid a double offset
	action by both server and client.
	</t>

      </section>

    </section>

    <!--***********--> 
    <!-- Changelog -->
    <!--***********--> 
    <section title="ChangeLog">

      <t>draft-pfeiffer-temporal-fragments-01:
        <list>

	  <t>Extension of the number of available SMPTE
	  time-schemes. Many thanks to Bill Miller and Oliver Morgan
	  of the SMPTE for their input on these changes.
	  </t>

	  <t>Deleted "start" and "now" as time specification values.
	  </t>

	  <t>Extension of the temporal fragment addressing to also
	  address temporal intervals, not only time points.
	  </t>

	  <t>Added section that includes some key points of discussion
	  where the existing URI standard contradicts the use of
	  fragments for time-continuous data.
	  </t>

        </list>
      </t>

    </section>

  </middle>

  
  <back>
    
    <references>
      
      <reference anchor="KEYWORDS">
	<front>
	  <title>Key words for use in RFCs to Indicate Requirements Levels</title>

	  <author initials="S." surname="Bradner" fullname="Scott Bradner">
	    <organization>Harvard University</organization>
	    <address>
	      <postal>
		<street>29 Oxford Street</street>
		<city>Cambridge</city> <region>MA</region> <code>02138</code>
		<country>US</country>
	      </postal>
	      <phone>+1 617 495 3864</phone>
	      <email>sob@harvard.edu</email>
	    </address>
	  </author>
	  <date month="March" year="1997" />
	</front>
	<seriesInfo name="RFC" value="2119" />
	<seriesInfo name="BCP" value="14" />
      </reference>

      <reference anchor="URI">
	<front>
	  <title>Uniform Resource Identifiers (URI): Generic
	  Syntax</title>
	  <author initials="T." surname="Berners-Lee" fullname="Tim Berners-Lee">
	    <organization abbrev="W3C">World Wide Web Consortium</organization>
	    <address>
	      <postal>
		<street>MIT Laboratory for Computer Science</street>
		<street>545 Technology Square</street>
		<city>Cambridge</city> <region>MA</region> <code>02139</code>
		<country>US</country>
	      </postal>
	      <phone>+1 617 253 5702</phone>
	      <facsimile>+1 617 258 8682</facsimile>
	      <email>timbl@w3.org</email>
	    </address>
	  </author>
	  <author initials="R.T." surname="Fielding" fullname="Roy T. Fielding">
	    <organization abbrev="UCI">University of California, Irvine</organization>
	    <address>
	      <postal>
		<street>Department of Information and Computer Science</street>
		<street>University of California, Irvine</street>
		<city>Irvine</city> <region>CA</region> <code>92697-3425</code>
		<country>US</country>
	      </postal>
	      <phone>+1 949 824 7403</phone>
	      <facsimile>+1 949 824 1715</facsimile>
	      <email>fielding@ics.uci.edu</email>
	    </address>
	  </author>
	  <author initials="L." surname="Masinter" fullname="Larry Masinter">
	    <organization>Xerox PARC</organization>
	    <address>
	      <postal>
		<street>3333 Coyote Hill Road</street>
		<city>Palo Alto</city> <region>CA</region> <code>94304</code>
		<country>US</country>
	      </postal>
	      <phone>+1 650 812 4365</phone>
	      <facsimile>+1 650 812 4333</facsimile>
	      <email>masinter@parc.xerox.com</email>
	    </address>
	  </author>
	  <date month="August" year="1998" />
	</front>
	<seriesInfo name="RFC" value="2396" />
      </reference>
      
      <reference anchor="RTSP">
	<front>
	  <title>Real Time Streaming Protocol (RTSP)</title>
	  <author initials="H." surname="Schulzrinne" fullname="Henning Schulzrinne">
	    <organization abbrev="ColU">Columbia University</organization>
	    <address>
	      <postal>
		<street>Dept. of Computer Science</street>
		<street>1214 Amsterdam Avenue</street>
		<city>New York</city> <region>NY</region> <code>10027</code>
		<country>US</country>
	      </postal>
	      <email>schulzrinne@cs.columbia.edu</email>
	    </address>
	  </author>
	  <author initials="A." surname="Rao" fullname="Anup Rao">
	    <organization abbrev="NS">Netscape Communications Corp.</organization>
	    <address>
	      <postal>
		<street>501 E. Middlefield Road</street>
		<city>Mountain View</city> <region>CA</region> <code>94043</code>
		<country>US</country>
	      </postal>
	      <email>anup@netscape.com</email>
	    </address>
	  </author>
	  <author initials="R." surname="Lanphier" fullname="Robert Lanphier">
	    <organization>RealNetworks</organization>
	    <address>
	      <postal>
		<street>1111 Third Avenue Suite 2900</street>
		<city>Seattle</city> <region>WA</region> <code>98101</code>
		<country>US</country>
	      </postal>
	      <email>robla@real.com</email>
	    </address>
	  </author>
	  <date month="April" year="1998" />
	</front>
	<seriesInfo name="RFC" value="2326" />
      </reference>
      
      <reference anchor="SMPTE">
	<front>
	  <title>SMPTE STANDARD for Television, Audio and Film - Time and Control Code</title>
	  <author>
	    <organization abbrev="SMPTE"> The Society of Motion Picture and Television Engineers</organization>
	    <address>
	      <postal>
		<street>595 W. Hartsdale Ave.</street>
		<city>White Plains</city> <region>NY</region> <code>10607</code>
		<country>USA</country>
	      </postal>
	      <email>smpte@smpte.org</email>
	    </address>
	  </author>
	  <date month="September" year="1999" />
	</front>
	<seriesInfo name="ANSI" value="12M-1999" />
      </reference>

      <reference anchor="ISO8601">
	<front>
	  <title>Data elements and interchange formats -- Information interchange -- Representation of dates and times</title>
	  <author initials="TC154" surname="ISO" fullname="ISO - Technical Committee TC 154">
	    <organization abbrev="ISO"> International Organization for Standardization</organization>
	    <address>
	      <postal>
		<street>1 rue de Varembre</street>
		<street>Case Postale 56</street>
		<city>Geneva</city> <region>20</region> <code>1211</code>
		<country>CH</country>
	      </postal>
	      <email>central@iso.org</email>
	    </address>
	  </author>
	  <date month="" year="2000" />
	</front>
	<seriesInfo name="ISO" value="8601" />
      </reference>


    </references>
    
    
    <section title="Acknowledgements">
      <t>The authors greatly acknowledge the contributions of Andre
      Pang and Andrew Nesbit in developing this syntax. We also thank
      the SMPTE for their contributions and the URI discussion group
      at the W3C (uri@w3.org) for their many comments on this
      document.
      </t>
    </section>
    
    
  </back>
</rfc>