xref: /aosp_15_r20/external/libogg/doc/skeleton.html (revision 4d5d8b54cec1a9622d79143ad0e145ea73da2224)
1*4d5d8b54SAndroid Build Coastguard Worker<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2*4d5d8b54SAndroid Build Coastguard Worker<html dir="ltr" lang="en">
3*4d5d8b54SAndroid Build Coastguard Worker<head>
4*4d5d8b54SAndroid Build Coastguard Worker
5*4d5d8b54SAndroid Build Coastguard Worker<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6*4d5d8b54SAndroid Build Coastguard Worker<title>The Ogg Skeleton Metadata Bitstream</title>
7*4d5d8b54SAndroid Build Coastguard Worker
8*4d5d8b54SAndroid Build Coastguard Worker<style type="text/css">
9*4d5d8b54SAndroid Build Coastguard Workerbody {
10*4d5d8b54SAndroid Build Coastguard Worker  margin: 0 18px 0 18px;
11*4d5d8b54SAndroid Build Coastguard Worker  padding-bottom: 30px;
12*4d5d8b54SAndroid Build Coastguard Worker  font-family: Verdana, "DejaVu Sans", sans-serif;
13*4d5d8b54SAndroid Build Coastguard Worker  color: #333333;
14*4d5d8b54SAndroid Build Coastguard Worker  font-size: .8em;
15*4d5d8b54SAndroid Build Coastguard Worker}
16*4d5d8b54SAndroid Build Coastguard Worker
17*4d5d8b54SAndroid Build Coastguard Workera {
18*4d5d8b54SAndroid Build Coastguard Worker  color: #3366cc;
19*4d5d8b54SAndroid Build Coastguard Worker}
20*4d5d8b54SAndroid Build Coastguard Worker
21*4d5d8b54SAndroid Build Coastguard Workerimg {
22*4d5d8b54SAndroid Build Coastguard Worker  border: 0;
23*4d5d8b54SAndroid Build Coastguard Worker}
24*4d5d8b54SAndroid Build Coastguard Worker
25*4d5d8b54SAndroid Build Coastguard Worker#xiphlogo {
26*4d5d8b54SAndroid Build Coastguard Worker  margin: 30px 0 16px 0;
27*4d5d8b54SAndroid Build Coastguard Worker}
28*4d5d8b54SAndroid Build Coastguard Worker
29*4d5d8b54SAndroid Build Coastguard Worker#content p {
30*4d5d8b54SAndroid Build Coastguard Worker  line-height: 1.4;
31*4d5d8b54SAndroid Build Coastguard Worker}
32*4d5d8b54SAndroid Build Coastguard Worker
33*4d5d8b54SAndroid Build Coastguard Workerh1, h1 a, h2, h2 a, h3, h3 a {
34*4d5d8b54SAndroid Build Coastguard Worker  font-weight: bold;
35*4d5d8b54SAndroid Build Coastguard Worker  color: #ff9900;
36*4d5d8b54SAndroid Build Coastguard Worker  margin: 1.3em 0 8px 0;
37*4d5d8b54SAndroid Build Coastguard Worker}
38*4d5d8b54SAndroid Build Coastguard Worker
39*4d5d8b54SAndroid Build Coastguard Workerh1 {
40*4d5d8b54SAndroid Build Coastguard Worker  font-size: 1.3em;
41*4d5d8b54SAndroid Build Coastguard Worker}
42*4d5d8b54SAndroid Build Coastguard Worker
43*4d5d8b54SAndroid Build Coastguard Workerh2 {
44*4d5d8b54SAndroid Build Coastguard Worker  font-size: 1.2em;
45*4d5d8b54SAndroid Build Coastguard Worker}
46*4d5d8b54SAndroid Build Coastguard Worker
47*4d5d8b54SAndroid Build Coastguard Workerh3 {
48*4d5d8b54SAndroid Build Coastguard Worker  font-size: 1.1em;
49*4d5d8b54SAndroid Build Coastguard Worker}
50*4d5d8b54SAndroid Build Coastguard Worker
51*4d5d8b54SAndroid Build Coastguard Workerli {
52*4d5d8b54SAndroid Build Coastguard Worker  line-height: 1.4;
53*4d5d8b54SAndroid Build Coastguard Worker}
54*4d5d8b54SAndroid Build Coastguard Worker
55*4d5d8b54SAndroid Build Coastguard Worker#copyright {
56*4d5d8b54SAndroid Build Coastguard Worker  margin-top: 30px;
57*4d5d8b54SAndroid Build Coastguard Worker  line-height: 1.5em;
58*4d5d8b54SAndroid Build Coastguard Worker  text-align: center;
59*4d5d8b54SAndroid Build Coastguard Worker  font-size: .8em;
60*4d5d8b54SAndroid Build Coastguard Worker  color: #888888;
61*4d5d8b54SAndroid Build Coastguard Worker  clear: both;
62*4d5d8b54SAndroid Build Coastguard Worker}
63*4d5d8b54SAndroid Build Coastguard Worker</style>
64*4d5d8b54SAndroid Build Coastguard Worker
65*4d5d8b54SAndroid Build Coastguard Worker</head>
66*4d5d8b54SAndroid Build Coastguard Worker
67*4d5d8b54SAndroid Build Coastguard Worker<body>
68*4d5d8b54SAndroid Build Coastguard Worker
69*4d5d8b54SAndroid Build Coastguard Worker<div id="xiphlogo">
70*4d5d8b54SAndroid Build Coastguard Worker  <a href="http://xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"></a>
71*4d5d8b54SAndroid Build Coastguard Worker</div>
72*4d5d8b54SAndroid Build Coastguard Worker
73*4d5d8b54SAndroid Build Coastguard Worker<h1>The Ogg Skeleton Metadata Bitstream</h1>
74*4d5d8b54SAndroid Build Coastguard Worker
75*4d5d8b54SAndroid Build Coastguard Worker<h2>Overview</h2>
76*4d5d8b54SAndroid Build Coastguard Worker
77*4d5d8b54SAndroid Build Coastguard Worker<p><strong>Ogg Skeleton</strong> provides structuring information for multitrack <a href="//xiph.org/ogg">Ogg</a> files. It is compatible with Ogg <a rel="external" href="//theora.org">Theora</a> and provides extra clues for synchronization and content negotiation such as language selection.</p>
78*4d5d8b54SAndroid Build Coastguard Worker
79*4d5d8b54SAndroid Build Coastguard Worker<p>Ogg is a generic container format for time-continuous data streams, enabling interleaving of several tracks of frame-wise encoded content in a time-multiplexed manner. As an example, an Ogg physical bitstream could encapsulate several tracks of video encoded in Theora and multiple tracks of audio encoded in Speex or Vorbis or FLAC at the same time. A player that decodes such a bitstream could then, for example, play one video channel as the main video playback, alpha-blend another one on top of it (e.g. a caption track), play a main Vorbis audio together with several FLAC audio tracks simultaneously (e.g. as sound effects), and provide a choice of Speex channels (e.g. providing commentary in different languages). Such a file is generally possible to create with Ogg, it is however not possible to generically parse such a file, seek on it, understand what codecs are contained in such a file, and dynamically handle and play back such content.</p>
80*4d5d8b54SAndroid Build Coastguard Worker
81*4d5d8b54SAndroid Build Coastguard Worker<p>Ogg does not know anything about the content it carries and leaves it to the media mapping of each codec to declare and describe itself. There is no meta information available at the Ogg level about the content tracks encapsulated within an Ogg physical bitstream. This is particularly a problem if you don't have all the decoder libraries available and just want to parse an Ogg file to find out what type of data it encapsulates (such as the "file" command under *nix to determine what file it is through magic numbers), or want to seek to a temporal offset without having to decode the data (such as on a Web server that just serves out Ogg files and parts thereof).</p>
82*4d5d8b54SAndroid Build Coastguard Worker
83*4d5d8b54SAndroid Build Coastguard Worker<p>Ogg Skeleton is being designed to overcome these problems. Ogg Skeleton is a logical bitstream within an Ogg stream that contains information about the other encapsulated logical bitstreams. For each logical bitstream it provides information such as its media type, and explains the way the granulepos field in Ogg pages is mapped to time.</p>
84*4d5d8b54SAndroid Build Coastguard Worker
85*4d5d8b54SAndroid Build Coastguard Worker<p>Ogg Skeleton is also designed to allow the creation of substreams from Ogg physical bitstreams that retain the original timing information. For example, when cutting out the segment between the 7th and the 59th second of an Ogg file, it would be nice to continue to start this cut out file with a playback time of 7 seconds and not of 0. This is of particular interest if you're streaming this file from a Web server after a query for a temporal subpart such as in http://example.com/video.ogv?t=7-59</p>
86*4d5d8b54SAndroid Build Coastguard Worker
87*4d5d8b54SAndroid Build Coastguard Worker<h2>Specification</h2>
88*4d5d8b54SAndroid Build Coastguard Worker
89*4d5d8b54SAndroid Build Coastguard Worker<h3>How to describe the logical bitstreams within an Ogg container?</h3>
90*4d5d8b54SAndroid Build Coastguard Worker
91*4d5d8b54SAndroid Build Coastguard Worker<p>The following information about a logical bitstream is of interest to contain as meta information in the Skeleton:</p>
92*4d5d8b54SAndroid Build Coastguard Worker<ul>
93*4d5d8b54SAndroid Build Coastguard Worker<li>the serial number: it identifies a content track</li>
94*4d5d8b54SAndroid Build Coastguard Worker<li>the mime type: it identifies the content type</li>
95*4d5d8b54SAndroid Build Coastguard Worker<li>other generic name-value fields that can provide meta information such as the language of a track or the video height and width</li>
96*4d5d8b54SAndroid Build Coastguard Worker<li>the number of header packets: this informs a parser about the number of actual header packets in an Ogg logical bitstream</li>
97*4d5d8b54SAndroid Build Coastguard Worker<li>the granule rate: the granule rate represents the data rate in Hz at which content is sampled for the particular logical bitstream, allowing to map a granule position to time by calculating "granulepos / granulerate"</li>
98*4d5d8b54SAndroid Build Coastguard Worker<li>the preroll: the number of past content packets to take into account when decoding the current Ogg page, which is necessary for seeking (vorbis has generally 2, speex 3)</li>
99*4d5d8b54SAndroid Build Coastguard Worker<li>the granuleshift: the number of lower bits from the granulepos field that are used to provide position information for sub-seekable units (like the keyframe shift in theora)</li>
100*4d5d8b54SAndroid Build Coastguard Worker<li>a basetime: it provides a mapping for granule position 0 (for all logical bitstreams) to a playback time; an example use: most content in professional analog video creation actually starts at a time of 1 hour and thus adding this additional field allows them retain this mapping on digitizing their content</li>
101*4d5d8b54SAndroid Build Coastguard Worker<li>a UTC time: it provides a mapping for granule position 0 (for all logical bitstreams) to a real-world clock time allowing to remember e.g. the recording or broadcast time of some content</li>
102*4d5d8b54SAndroid Build Coastguard Worker</ul>
103*4d5d8b54SAndroid Build Coastguard Worker
104*4d5d8b54SAndroid Build Coastguard Worker<h3>How to allow the creation of substreams from an Ogg physical bitstream?</h3>
105*4d5d8b54SAndroid Build Coastguard Worker
106*4d5d8b54SAndroid Build Coastguard Worker<p>When cutting out a subpart of an Ogg physical bitstream, the aim is to keep all the content pages intact (including the framing and granule positions) and just change some information in the Skeleton that allows reconstruction of the accurate time mapping. When remultiplexing such a bitstream, it is necessary to take into account all the different contained logical bitstreams. A given cut-in time maps to several different byte positions in the Ogg physical bitstream because each logical bitstream has its relevant information for that time at a different location. In addition, the resolution of each logical bitstream may not be high enough to accommodate for the given cut-in time and thus there may be some surplus information necessary to be remuxed into the new bitstream.</p>
107*4d5d8b54SAndroid Build Coastguard Worker
108*4d5d8b54SAndroid Build Coastguard Worker<p>The following information is necessary to be added to the Skeleton to allow a correct presentation of a subpart of an Ogg bitstream:</p>
109*4d5d8b54SAndroid Build Coastguard Worker<ul>
110*4d5d8b54SAndroid Build Coastguard Worker<li>the presentation time: this is the actual cut-in time and all logical bitstreams are meant to start presenting from this time onwards, not from the time their data starts, which may be some time before that (because this time may have mapped right into the middle of a packet, or because the logical bitstream has a preroll or a keyframe shift)</li>
111*4d5d8b54SAndroid Build Coastguard Worker<li>the basegranule: this represents the granule number with which this logical bitstream starts in the remuxed stream and provides for each logical bitstream the accurate start time of its data stream; this information is necessary to allow correct decoding and timing of the first data packets contained in a logcial bitstream of a remuxed Ogg stream</li>
112*4d5d8b54SAndroid Build Coastguard Worker</ul>
113*4d5d8b54SAndroid Build Coastguard Worker
114*4d5d8b54SAndroid Build Coastguard Worker<h3>Ogg Skeleton version 3.0 Format Specification</h3>
115*4d5d8b54SAndroid Build Coastguard Worker
116*4d5d8b54SAndroid Build Coastguard Worker<p>Adding the above information into an Ogg bitstream without breaking existing Ogg functionality and code requires the use of a logical bitstream for Ogg Skeleton. This logical bitstream may be ignored on decoding such that existing players can still continue to play back Ogg files that have a Skeleton bitstream. Skeleton enriches the Ogg bitstream to provide meta information about structure and content of the Ogg bitstream.</p>
117*4d5d8b54SAndroid Build Coastguard Worker
118*4d5d8b54SAndroid Build Coastguard Worker<p>The Skeleton logical bitstream starts with an ident header that contains information about all of the logical bitstreams and is mapped into the Skeleton bos page.  The first 8 bytes provide the magic identifier "fishead\0".
119*4d5d8b54SAndroid Build Coastguard WorkerAfter the fishead follows a set of secondary header packets, each of which contains information about one logical bitstream. These secondary header packets are identified by an 8 byte code of "fisbone\0". The Skeleton logical bitstream has no actual content packets. Its eos page is included into the stream before any data pages of the other logical bitstreams appear and contains a packet of length 0.</p>
120*4d5d8b54SAndroid Build Coastguard Worker
121*4d5d8b54SAndroid Build Coastguard Worker<p>The fishead ident header looks as follows:</p>
122*4d5d8b54SAndroid Build Coastguard Worker<pre>
123*4d5d8b54SAndroid Build Coastguard Worker
124*4d5d8b54SAndroid Build Coastguard Worker  0                   1                   2                   3
125*4d5d8b54SAndroid Build Coastguard Worker  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
126*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
127*4d5d8b54SAndroid Build Coastguard Worker | Identifier 'fishead\0'                                        | 0-3
128*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
129*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 4-7
130*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
131*4d5d8b54SAndroid Build Coastguard Worker | Version major                 | Version minor                 | 8-11
132*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
133*4d5d8b54SAndroid Build Coastguard Worker | Presentationtime numerator                                    | 12-15
134*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
135*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 16-19
136*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
137*4d5d8b54SAndroid Build Coastguard Worker | Presentationtime denominator                                  | 20-23
138*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
139*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 24-27
140*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
141*4d5d8b54SAndroid Build Coastguard Worker | Basetime numerator                                            | 28-31
142*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
143*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 32-35
144*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
145*4d5d8b54SAndroid Build Coastguard Worker | Basetime denominator                                          | 36-39
146*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
147*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 40-43
148*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
149*4d5d8b54SAndroid Build Coastguard Worker | UTC                                                           | 44-47
150*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
151*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 48-51
152*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
153*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 52-55
154*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
155*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 56-59
156*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
157*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 60-63
158*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
159*4d5d8b54SAndroid Build Coastguard Worker
160*4d5d8b54SAndroid Build Coastguard Worker</pre>
161*4d5d8b54SAndroid Build Coastguard Worker<p>The version fields provide version information for the Skeleton track, currently being 3.0 (the number having evolved within the Annodex project).</p>
162*4d5d8b54SAndroid Build Coastguard Worker
163*4d5d8b54SAndroid Build Coastguard Worker<p>Presentation time and basetime are specified as a rational number, the denominator providing the temporal resolution at which the time is given (e.g. to specify time in milliseconds, provide a denominator of 1000).</p>
164*4d5d8b54SAndroid Build Coastguard Worker
165*4d5d8b54SAndroid Build Coastguard Worker<p>The fisbone secondary header packet looks as follows:</p>
166*4d5d8b54SAndroid Build Coastguard Worker<pre>
167*4d5d8b54SAndroid Build Coastguard Worker
168*4d5d8b54SAndroid Build Coastguard Worker  0                   1                   2                   3
169*4d5d8b54SAndroid Build Coastguard Worker  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
170*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
171*4d5d8b54SAndroid Build Coastguard Worker | Identifier 'fisbone\0'                                        | 0-3
172*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
173*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 4-7
174*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
175*4d5d8b54SAndroid Build Coastguard Worker | Offset to message header fields                               | 8-11
176*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
177*4d5d8b54SAndroid Build Coastguard Worker | Serial number                                                 | 12-15
178*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
179*4d5d8b54SAndroid Build Coastguard Worker | Number of header packets                                      | 16-19
180*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
181*4d5d8b54SAndroid Build Coastguard Worker | Granulerate numerator                                         | 20-23
182*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
183*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 24-27
184*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
185*4d5d8b54SAndroid Build Coastguard Worker | Granulerate denominator                                       | 28-31
186*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
187*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 32-35
188*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
189*4d5d8b54SAndroid Build Coastguard Worker | Basegranule                                                   | 36-39
190*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
191*4d5d8b54SAndroid Build Coastguard Worker |                                                               | 40-43
192*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
193*4d5d8b54SAndroid Build Coastguard Worker | Preroll                                                       | 44-47
194*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
195*4d5d8b54SAndroid Build Coastguard Worker | Granuleshift  | Padding/future use                            | 48-51
196*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
197*4d5d8b54SAndroid Build Coastguard Worker | Message header fields ...                                     | 52-
198*4d5d8b54SAndroid Build Coastguard Worker +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
199*4d5d8b54SAndroid Build Coastguard Worker
200*4d5d8b54SAndroid Build Coastguard Worker</pre>
201*4d5d8b54SAndroid Build Coastguard Worker<p>The mime type is provided as a message header field specified in the same way that HTTP header fields are given (e.g. "Content-Type: audio/vorbis"). Further meta information (such as language and screen size) are also included as message header fields. The offset to the message header fields at the beginning of a fisbone packet is included for forward compatibility - to allow further fields to be included into the packet without disrupting the message header field parsing.</p>
202*4d5d8b54SAndroid Build Coastguard Worker
203*4d5d8b54SAndroid Build Coastguard Worker<p>The granule rate is again given as a rational number in the same way that presentation time and basetime were provided above.</p>
204*4d5d8b54SAndroid Build Coastguard Worker
205*4d5d8b54SAndroid Build Coastguard Worker<p>A further restriction on how to encapsulate Skeleton into Ogg is proposed to allow for easier parsing:</p>
206*4d5d8b54SAndroid Build Coastguard Worker<ul>
207*4d5d8b54SAndroid Build Coastguard Worker<li>there can only be one Skeleton logical bitstream in a Ogg bitstream</li>
208*4d5d8b54SAndroid Build Coastguard Worker<li>the Skeleton bos page is the very first bos page in the Ogg stream such that it can be identified straight away and decoders don't get confused about it being e.g. Ogg Vorbis without this meta information</li>
209*4d5d8b54SAndroid Build Coastguard Worker<li>the bos pages of all the other logical bistreams come next (a requirement of Ogg)</li>
210*4d5d8b54SAndroid Build Coastguard Worker<li>the secondary header pages of all logical bitstreams come next, including Skeleton's secondary header packets</li>
211*4d5d8b54SAndroid Build Coastguard Worker<li>the Skeleton eos page end the control section of the Ogg stream before any content pages of any of the other logical bitstreams appear</li>
212*4d5d8b54SAndroid Build Coastguard Worker</ul>
213*4d5d8b54SAndroid Build Coastguard Worker
214*4d5d8b54SAndroid Build Coastguard Worker<div id="copyright">
215*4d5d8b54SAndroid Build Coastguard Worker  The Xiph Fish Logo is a
216*4d5d8b54SAndroid Build Coastguard Worker  trademark (&trade;) of the Xiph.Org Foundation.<br>
217*4d5d8b54SAndroid Build Coastguard Worker
218*4d5d8b54SAndroid Build Coastguard Worker  These pages &copy; 1994 - 2008 Xiph.Org Foundation. Some rights reserved.
219*4d5d8b54SAndroid Build Coastguard Worker</div>
220*4d5d8b54SAndroid Build Coastguard Worker
221*4d5d8b54SAndroid Build Coastguard Worker</body>
222*4d5d8b54SAndroid Build Coastguard Worker</html>