⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 realmedia file format (rmff).mht

📁 这个压缩包中的内容是媒体文件rm格式标准文档
💻 MHT
📖 第 1 页 / 共 2 页
字号:
From: <由 Windows Internet Explorer 7 保存>
Subject: RealMedia File Format (RMFF)
Date: Fri, 29 Aug 2008 11:21:24 +0800
MIME-Version: 1.0
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://multimedia.cx/rmff.htm
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RealMedia File Format (RMFF)</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD>
<BODY>
<H1>Note: For a more thorough and current description of the RealMedia =
File=20
Format, refer to the corresponding page in the MultimediaWiki: <A=20
href=3D"http://wiki.multimedia.cx/index.php?title=3DRealMedia">http://wik=
i.multimedia.cx/index.php?title=3DRealMedia</A></H1>
<H1><A name=3D22397>Appendix G: RealMedia File Format (RMFF) </A></H1>
<P><A name=3D3637></A>RealSystem Architecture introduces RealMedia File =
Format=20
(RMFF), which lets RealSystem deliver high-quality multimedia content =
over a=20
variety of network bandwidths. Third-party developers can convert their =
media=20
formats into RMFF, enabling RealServer to deliver the files to =
RealPlayer or=20
other applications built with the RealSystem SDK. Third-party developers =
can=20
thereby use RealSystem to transport content over the Internet to their =
own=20
applications.</P>
<P><A name=3D3647></A>RealMedia File Format is a standard tagged file =
format that=20
uses four-character codes to identify file elements. These codes are =
32-bit,=20
represented by a sequence of one to four ASCII alphanumeric characters, =
padded=20
on the right with space characters. The data type for four-character =
codes is=20
FOURCC. Use the <CODE>PN_FOURCC</CODE> macro to convert four characters =
into a=20
four-character code. </P>
<P><A name=3D3649></A>The basic building block of a RealMedia File is a=20
<I>chunk</I>, which is a logical unit of data, such as a stream header =
or a=20
packet of data. Each chunk contains the following fields: </P>
<UL>
  <P>
  <LI><A name=3D3651></A>four-character code specifying the chunk =
identifier=20
  <P></P>
  <LI><A name=3D3653></A>32-bit value specifying the size of the data =
member in=20
  the chunk=20
  <P></P>
  <LI><A name=3D3655></A>blob of opaque chunk data </LI></UL>
<P><A name=3D3657></A>Depending on its type, a top-level chunk can =
contain=20
subobjects. This document describes the tagged chunks contained in RMFF, =
as well=20
as the format of the data stored in each type of tagged chunk. </P>
<H5><A name=3D17311></A>Tagged File Formats</H5>
<P><A name=3D17314></A><IMG src=3D""></P>
<H1><A name=3D3668></A>Header Section</H1>
<P><A name=3D3670></A>Because RMFF is a tagged file format, the order of =
the=20
chunks is not explicit, except that the RealMedia File Header must be =
the first=20
chunk in the file. However, most applications write the standard headers =
into=20
the file's header section. The following chunks are typically found in =
the=20
header section of RMFF: </P>
<UL>
  <P>
  <LI><A name=3D3672></A>RealMedia File Header (This must be the first =
chunk of=20
  the file)=20
  <P></P>
  <LI><A name=3D3674></A>Properties Header=20
  <P></P>
  <LI><A name=3D3676></A>Media Properties Header=20
  <P></P>
  <LI><A name=3D3678></A>Content Description Header </LI></UL>
<P><A name=3D3680></A>After the RealMedia File Header object, the other =
headers=20
may appear in any order. All headers are required except the Index =
Header. The=20
following sections describe the individual header objects .</P>
<H2><A name=3D3686></A>RealMedia File Header</H2>
<P><A name=3D3688></A>Each RealMedia file begins with the RealMedia File =
Header,=20
which identifies the file as RMFF. There is only one RealMedia File =
Header in a=20
RealMedia file. Because the contents of the RealMedia File Header may =
change=20
with different versions of RMFF, the header structure supports an object =
version=20
field for determining what additional fields exists. The following=20
pseudo-structure describes the RealMedia File Header: </P><PRE><A =
name=3D22781></A>
RealMedia_File_Header<BR>{<BR>  UINT32    object_id;<BR>  UINT32    =
size;<BR>  UINT16    <CODE>object_version</CODE>;<BR><BR>  if =
(<CODE>object_version</CODE> =3D=3D 0)<BR>  {<BR>    UINT32   =
file_version;<BR>    UINT32   num_headers;<BR>  }<BR>}
</PRE>
<P><A name=3D3693></A>The RealMedia File Header contains the following =
fields:=20
</P>
<H4><A name=3D3695></A>object_id: 32 bits </H4>
<P><A name=3D3697></A>The unique object ID for a RealMedia File =
(<KBD>.RMF</KBD>).=20
All RealMedia files begin with this identifier. </P>
<H4><A name=3D3699></A>size: 32 bits </H4>
<P><A name=3D3701></A>The size of the RealMedia header section in bytes. =
</P>
<H4><A name=3D3703></A>object_version: 16 bits </H4>
<P><A name=3D3705></A>The version of the RealMedia File Header object. =
All files=20
created according to this specification have an =
<CODE>object_version</CODE>=20
number of 0 (zero). </P>
<H4><A name=3D3707></A>file_version: 32 bits </H4>
<P><A name=3D3709></A>The version of the RealMedia file in PN Version =
format. All=20
files created according to this specification have a major version =
number of 1.=20
This member is present on all <CODE>RealMedia_File_Header</CODE> objects =
with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3711></A>num_headers: 32 bits </H4>
<P><A name=3D3713></A>The number of headers in the header section that =
follow the=20
RealMedia File Header. This member is present on all=20
<CODE>RealMedia_File_Header</CODE> objects with an =
<CODE>object_version</CODE>=20
of 0 (zero). </P>
<H2><A name=3D3719></A>Properties Header</H2>
<P><A name=3D22973></A>The Properties Header describes the general media =

properties of the RealMedia File. Components of the RealMedia system use =
this=20
object to configure themselves for handling the data in the RealMedia =
file or=20
stream. There is only one Properties Header in a RealMedia file. The =
following=20
pseudo-structure describes the Properties header:</P><PRE><A =
name=3D23066></A>
Properties<BR>{<BR>  UINT32    object_id;<BR>  UINT32    size;<BR>  =
UINT16    <CODE>object_version</CODE>;<BR><BR>  if =
(<CODE>object_version</CODE> =3D=3D 0)<BR>  {<BR>    UINT32   =
max_bit_rate;<BR>    UINT32   avg_bit_rate;<BR>    UINT32   =
max_packet_size;<BR>    UINT32   avg_packet_size;<BR>    UINT32   =
num_packets;<BR>    UINT32   duration;<BR>    UINT32   preroll;<BR>    =
UINT32   index_offset;<BR>    UINT32   data_offset;<BR>    UINT16   =
num_streams;<BR>    UINT16   flags;<BR>  }<BR>}
</PRE>
<P><A name=3D3726></A>The Properties Header contains the following =
fields: </P>
<H4><A name=3D3728></A>object_id: 32 bits </H4>
<P><A name=3D3730></A>The unique object ID for a Properties Header =
('PROP'). </P>
<H4><A name=3D3732></A>size: 32 bits </H4>
<P><A name=3D3734></A>The size of the Properties Header in bytes. </P>
<H4><A name=3D3736></A>object_version: 16 bits </H4>
<P><A name=3D3738></A>The version of the RealMedia File Header object. =
All files=20
created according to this specification have an =
<CODE>object_version</CODE>=20
number of 0 (zero). </P>
<H4><A name=3D3740></A>max_bit_rate: 32 bits </H4>
<P><A name=3D3742></A>The maximum bit rate required to deliver this file =
over a=20
network. This member is present on all Properties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3744></A>avg_bit_rate: 32 bits </H4>
<P><A name=3D3746></A>The average bit rate required to deliver this file =
over a=20
network. This member is present on all Properties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3748></A>max_packet_size: 32 bits </H4>
<P><A name=3D3750></A>The largest packet size (in bytes) in the media =
data. This=20
member is present on all Properties objects with an =
<CODE>object_version</CODE>=20
of 0 (zero). </P>
<H4><A name=3D3752></A>avg_packet_size: 32 bits </H4>
<P><A name=3D3754></A>The average packet size (in bytes) in the media =
data. This=20
member is present on all Properties objects with an =
<CODE>object_version</CODE>=20
of 0 (zero). </P>
<H4><A name=3D3756></A>num_packets: 32 bits </H4>
<P><A name=3D3758></A>The number of packets in the media data. This =
member is=20
present on all Properties objects with an <CODE>object_version</CODE> of =
0=20
(zero). </P>
<H4><A name=3D3760></A>duration: 32 bits </H4>
<P><A name=3D3762></A>The duration of the file in milliseconds. This =
member is=20
present on all Properties objects with an <CODE>object_version</CODE> of =
0=20
(zero). </P>
<H4><A name=3D3764></A>preroll: 32 bits </H4>
<P><A name=3D3766></A>The number of milliseconds to pre-buffer before =
starting=20
playback. This member is present on all Properties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3768></A>index_offset: 32 bits </H4>
<P><A name=3D3770></A>The offset in bytes from the start of the file to =
the start=20
of the index header object. This member is present on all Properties =
objects=20
with an <CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3772></A>data_offset: 32 bits </H4>
<P><A name=3D3774></A>The offset in bytes from the start of the file to =
the start=20
of the Data Section. This member is present on all Properties objects =
with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3776></A>num_streams: 16 bits </H4>
<P><A name=3D3778></A>The number of media streams contained in the file. =
This=20
member is present on all Properties objects with an =
<CODE>object_version</CODE>=20
of 0 (zero). </P>
<H4><A name=3D3780></A>flags: 16 bits </H4>
<P><A name=3D24472></A>Flags indicating characteristics of the RealMedia =
file. The=20
following flags are defined: </P>
<UL>
  <P>
  <LI><A name=3D24473></A><CODE>#define PN_SAVE_ENABLED 0x0001</CODE>=20
  <P><A name=3D24474></A>Allows clients to save a copy of the RealMedia =
file to=20
  disk. </P>
  <P></P>
  <LI><A name=3D3788></A><CODE>#define PN_PERFECT_PLAY_ENABLED =
0x0002</CODE>=20
  <P><A name=3D3790></A>Allows clients to use extra buffering to ensure =
Perfect=20
  Play. </P>
  <P></P>
  <LI><A name=3D3792></A><CODE>#define PN_LIVE_BROADCAST 0x0004</CODE>=20
  <P><A name=3D3794></A>The RealMedia file is being generated by a live =
broadcast.=20
  </P></LI></UL>
<H2><A name=3D3800></A>Media Properties Header</H2>
<P><A name=3D3802></A>The Media Properties Header describes the specific =
media=20
properties of each stream in a RealMedia File. Components of the =
RealMedia=20
system use this object to configure themselves for handling the media =
data in=20
each stream. There is one Media Properties Header for each media stream =
in a=20
RealMedia file. The following pseudo-structure describes the Media =
Properties=20
header: </P><PRE><A name=3D23667></A>
Media_Properties<BR>{<BR>  UINT32     object_id;<BR>  UINT32     =
size;<BR>  UINT16     <CODE>object_version</CODE>;<BR><BR>  if =
(<CODE>object_version</CODE> =3D=3D 0)<BR>  {<BR>    UINT16              =
        stream_number;<BR>    UINT32                      =
max_bit_rate;<BR>    UINT32                      avg_bit_rate;<BR>    =
UINT32                      max_packet_size;<BR>    UINT32               =
       avg_packet_size;<BR>    UINT32                      =
start_time;<BR>    UINT32                      preroll;<BR>    UINT32    =
                  duration;<BR>    UINT8                       =
stream_name_size;<BR>    UINT8[stream_name_size]     stream_name;<BR>    =
UINT8                       mime_type_size;<BR>    UINT8[mime_type_size] =
      mime_type;<BR>    UINT32                      =
type_specific_len;<BR>    UINT8[type_specific_len]    =
type_specific_data;<BR>  }<BR>}
</PRE>
<P><A name=3D3807></A>The Media Properties Header contains the following =
fields:=20
</P>
<H4><A name=3D3809></A>object_id: 32 bits </H4>
<P><A name=3D3811></A>The unique object ID for a Media Properties Header =
("MDPR").=20
</P>
<H4><A name=3D3813></A>size: 32 bits </H4>
<P><A name=3D3815></A>The size of the Media Properties Header in bytes. =
</P>
<H4><A name=3D3817></A>object_version: 16 bits </H4>
<P><A name=3D3819></A>The version of the Media Properties Header object. =
</P>
<H4><A name=3D3821></A>stream_number: 32 bits </H4>
<P><A name=3D3823></A>The <CODE>stream_number</CODE> (synchronization =
source=20
identifier) is a unique value that identifies a media stream. Every data =
packet=20
that belongs to a media stream contains the same =
<CODE>STREAM_NUMBER</CODE>. The=20
<CODE>STREAM_NUMBER</CODE> enables a receiver of multiple media streams =
to=20
distinguish which packets belong to each media stream. This member is =
present on=20
all MediaProperties objects with an <CODE>object_version</CODE> of 0 =
(zero).=20
</P>
<H4><A name=3D3825></A>max_bit_rate: 32 bits </H4>
<P><A name=3D3827></A>The maximum bit rate required to deliver this =
stream over a=20
network. This member is present on all MediaProperties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3829></A>avg_bit_rate: 32 bits </H4>
<P><A name=3D3831></A>The average bit rate required to deliver this =
stream over a=20
network. This member is present on all MediaProperties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3833></A>max_packet_size: 32 bits </H4>
<P><A name=3D3835></A>The largest packet size (in bytes) in the stream =
of media=20
data. This member is present on all MediaProperties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3837></A>avg_packet_size: 32 bits </H4>
<P><A name=3D3839></A>The average packet size (in bytes) in the stream =
of media=20
data. This member is present on all MediaProperties objects with an=20
<CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3841></A>start_time: 32 bits </H4>
<P><A name=3D3843></A>The time offset in milliseconds to add to the =
timestamp of=20
each packet in a media stream. This member is present on all =
MediaProperties=20
objects with an <CODE>object_version</CODE> of 0 (zero). </P>
<H4><A name=3D3845></A>preroll: 32 bits </H4>
<P><A name=3D3847></A>The time offset in milliseconds to subtract to the =
timestamp=20
of each packet in a media stream. This member is present on all =
MediaProperties=20

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -