From XiphWiki
Revision as of 03:42, 27 May 2010 by Xiphmont (talk | contribs)
Jump to navigation Jump to search

Due to limitations of wiki-syntax, it should be noted that this page cannot be correctly titled 'transOgg'. The 't' is lowercase.

What is transOgg?

TransOgg is an updated Ogg container (think of it as Ogg 2.0) that makes some changes to the Ogg transport layer and more directly tackles metadata. transOgg: Changes from Ogg summarizes the major changes from the original Ogg container design. This page presents a long-winded, standalone overview of transOgg design points and rationale.

Design Points

In no particular order:

  • transOgg is degined for local storage and packet-based transport. It is arranged to minimize round-trips ('seeks' or 'random access') for potentially ultra-high latency systems like HTTP streaming, as well as avoid any structural requirement to burst large amounts of data in a constrained-rate stream. Some intended uses include:
    • HTTP push/pull streaming (eg, HTML5, icecast/shoutcast).
    • local file storage (eg, digital video storage and online distribution)
    • physical media (eg, digital video distribution on optical media)
    • packet broadcast (eg, UDP multicast, encrypted multicast)
  • transOgg is designed for variable, unpredictably sized data payloads with no minumum or maximum size.
  • The transOgg container is structurally designed for streaming (both live and progressive download). It is not possible to construct a valid transOgg stream that is unsuitable for streaming.
  • transOgg defines two steam types: continuous-time and discontinuous-time. Continuous-time streams are gapless media such as video and audio. Discontinuous-time streams are media types with unpredictably or irregularly placed data, such as subtitles and timed metadata. (expand on continuous types and how to 'suspend' the stream using null pages/null packets and duration fields)
  • transOgg metadata is structurally encapsulated into the transport stream but located at fixed, predictable positions (excepting streamed metadata, which are treated as a discontinuous stream).
  • transOgg retains Ogg's non-heirarchical page structure. The new page structure is a blend of Ogg pages, Matroska clusters/blocks and NUT packets. Achievable minimum overhead drops to under .04%; practical overhead improves upon NUT, Ogg and Matroska.
  • A transOgg stream always captures and begins demux within 128kB maximum. Fine-grained capture is necessary for efficient streaming, seeking and scrubbing. The overhead tradeoff of a frequent capture pattern is negligable and fully offset by other improvements.
  • Multiplexing of multiple elementary streams is performed by interleaving at the page level. The multiplexing algorithm is fully specified, deterministic and delivers optimal buffering behavior. There is no educated guessing or multiple possible practices.
  • transOgg buffering is simple and explicitly specified.
  • transOgg implements nonlinear features such as menus, chapters, loop points, and branch points out of its linear stream transport by borrowing as completely as possible from CMML, Skeleton and Matroska's EBML metadata specification.
  • Valid transOgg streams may be concatenated to form a new, valid transOgg stream. Mandatory reverse linkage at the end of each stream eliminates the need for interpolated bisection search when opening concatenated streams. Cross-link metadata provides file-global indexing and chaptering for chained streams.
  • transOgg metadata begins and ends every stream. It is mandatory, fully specified, and part of 'container knowledge'.
    • A transOgg stream must begin with the master metadata header. This master header is the first page[s] of the physical transOgg bitstream as well as the logical master metadata stream.
    • The metadata stream is a discontinuous stream that may provide additional timed metadata and events throughout the stream, similar to NUT 'info packets'.
    • A transOgg stream must end with metadata footer page[s] that provide reverse linkage to the beginning of the stream.
    • Tags (user contributed metadata) and Cues (the index) may appear at the head of the stream or in the footer, as may any other metadata elements that could not be known before stream end in a live stream (eg, duration). Single-pass creation tools write these elements in the footer metadata. Tools can later move these elements to the header metadata. All other metadata elements may appear only in the header.
  • Headerless capture, multicast, and stateless unicast MAY be supported within the metadata stream using "rolling headers",similar to the "rolling intra" mechanism proposed for the Theora videocodec. This allows stream capture and playback in a bounded timeperiod without OOB transmission of headers or bitrate spikes. It also facilitates file recovery in the event the stream headers are lost.
  • Structural codec metadata, such as timebase, keyframing, coding delay, page duration, etc, are replicated in the transOgg container. Unlike Ogg (and to a lesser degree Matroska), no knowledge must be queried or assumed based on the specific codecs in use inorder to mux, demux, remux, repaginate, or seek in a bitstream.
  • As in NUT, all streams have their own rational timebase. The encoding used is a parameterized generalization of Ogggranule positions. The granule timebase and parameters are fully specified and declared in the container. The granule mechanism is capable of exact sample positioning without approximation, expressing PTS and DTS of out-of-order encodings, preroll/delay of keyframe-lesscodecs, and distance from last syncpoint.
  • All encapsulated packets are stamped with full DTS, PTS, duration, delay, and syncpoint distance.
  • Whenever possible, the transOgg specification presents a single, correct, optimal MUST behavior. Whenever possible, the container design seeks to make MUST behaviors structural. We avoid handwaving essential behaviors into 'best practices' documents 'to be specified later'.
  • the core transOgg container seeks to avoid optional structures, switches, code paths, and features in its framing mechanisms. Optional structures and features are acceptable (and necessary) within metadata.