Abstract

This specification defines a Media Source Extensions byte stream format specification based on the ISO Base Media File Format.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document was published by the HTML Working Group as an Editor's Draft. If you wish to make comments regarding this document, please send them to public-html-media@w3.org (subscribe, archives). All comments are welcome.

Publication as an Editor's Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. Introduction

This specification defines segment formats for implementations that choose to support the ISO Base Media File Format ISO/IEC 14496-12 (ISO BMFF).

It defines the MIME-type parameters used to signal codecs, and provides the necessary format specific definitions for initialization segments, media segments, and random access points required by the byte stream formats section of the Media Source Extensions spec.

2. MIME-type parameters

This section specifies the parameters that can be used in the MIME-type passed to isTypeSupported() or addSourceBuffer().

MIME-types for this specification must conform to the rules outlined for "audio/mp4" and "video/mp4" in RFC 6381.

Note
Implementations may only implement a subset of the codecs and profiles mentioned in the RFC.

3. Initialization Segments

An ISO BMFF initialization segment is defined in this specification as a single Movie Header Box (moov).

The user agent must run the end of stream algorithm with the error parameter set to "decode" if any of the following conditions are met:

  1. The tracks in the Movie Header Box contain samples (i.e. the entry_count in the stts, stsc or stco boxes are not set to zero).
  2. A Movie Extends (mvex) box is not contained in the Movie (moov) box to indicate that Movie Fragments are to be expected.

The user agent must handle Edit Boxes (edts), in initialization segment, which provide a mapping of composition times for each track to the global presentation time.

The user agent must support parameter sets (e.g., PPS/SPS) stored in the sample entry (as defined for avc1/avc2), and should support parameter sets stored inband in the samples themselves (as defined for avc3/avc4).

Note

For maximum content interoperability, user agents are strongly advised to support both inband and out-of-band storage of the SPS and PPS.

Valid top-level boxes such as ftyp, styp, and sidx are allowed to appear before the moov box. These boxes must be accepted and ignored by the user agent and are not considered part of the initialization segment in this specification.

4. Media Segments

An ISO BMFF media segment is defined in this specification as a single Movie Fragment Box (moof) followed by one or more Media Data Boxes (mdat).

Valid top-level boxes defined in ISO/IEC 14496-12 other than moov, moof, and mdat are allowed to appear between the end of an initialization segment or media segment and before the beginning of a new media segment. These boxes must be accepted and ignored by the user agent and are not considered part of the media segment in this specification.

The user agent must run the end of stream algorithm with the error parameter set to "decode" if any of the following conditions are met:

  1. The Movie Fragment Box does not contain at least one Track Fragment Box (traf).
  2. The Movie Fragment Box does not use movie-fragment relative addressing or the flag default-base-is-moof is not set.
  3. External data references are being used.
  4. At least one Track Fragment Box does not contain a Track Fragment Decode Time Box (tfdt)
  5. The Media Data Boxes do not contain all the samples referenced by the Track Fragment Run Boxes (trun) of the Movie Fragment Box.
  6. Inband parameter sets are not present in the appropriate samples and parameter sets are not present in the last initialization segment appended.

5. Random Access Points

A random access point as defined in this specification corresponds to a Stream Access Point of type 1 or 2 as defined in Annex I of ISO/IEC 14496-12.

6. Acknowledgments

The editors would like to thank Chris Poole, Cyril Concolato, David Singer, Jerry Smith, Joe Steele, John Simmons, Kevin Streeter, Michael Thornburgh, and Steven Robertson for their contributions to this specification.
See a problem? Select text and .