📄 realmedia file format.htm
字号:
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=9>8
<HR>
INTERNET-DRAFT RTSP March 13, 1998
avg_bit_rate: 32 bits
The average bit rate required to deliver this stream over a
network. This member is present on all MediaProperties objects
with an object_version of 0 (zero).
max_packet_size: 32 bits
The largest packet size (in bytes) in the stream of media
data. This member is present on all MediaProperties objects with an
object_version of 0 (zero).
avg_packet_size: 32 bits
The average packet size (in bytes) in the stream of media
data. This member is present on all MediaProperties objects with an
object_version of 0 (zero).
start_time: 32 bits
The time offset in milliseconds to add to the timestamp of each
packet in a media stream. This member is present on all
MediaProperties objects with an object_version of 0 (zero).
preroll: 32 bits
The time offset in milliseconds to subtract to the timestamp of
each packet in a media stream. This member is present on all
MediaProperties objects with an object_version of 0 (zero).
duration: 32 bits
The duration of the stream in milliseconds. This member is present
on all MediaProperties objects with an object_version of 0 (zero).
stream_name_size: 8 bits
The length of the following stream_name field in bytes. This member
is present on all MediaProperties objects with an object_version of
0 (zero).
stream_name: variable length
A non-unique alias or name for the stream. This member is present
on all MediaProperties objects with an object_version of 0 (zero).
mime_type_size: 8 bits
The length of the following mime_type field in bytes. This member
is present on all MediaProperties objects with an object_version of
0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=10>9
<HR>
INTERNET-DRAFT RTSP March 13, 1998
mime_type: variable length
A non-unique MIME style type/subtype string for data associated
with the stream. This member is present on all MediaProperties
objects with an object_version of 0 (zero).
type_specific_len: 32 bits
The length of the following type_specific_data in bytes. The
type_specific_data is typically used by the data-type renderer to
initialize itself in order to process the media stream. This member
is present on all MediaProperties objects with an object_version of
0 (zero).
type_specific_data: variable length
The type_specific_data is typically used by the data-type renderer
to initialize itself in order to process the media stream. This
member is present on all MediaProperties objects with an
object_version of 0 (zero).
2.4 Content Description Header
The Content Description Header contains the title, author, copyright,
and comments information for the RealMedia File. All text data is in
ASCII format. The following pseudo-structure describes the Content
Description Header:
Content_Description
{
UINT32 object_id;
UINT32 size;
UINT16 object_version;
if (object_version == 0)
{
UINT16 title_len;
UINT8[title_len] title;
UINT16 author_len;
UINT8[author_len] author;
UINT16 copyright_len;
UINT8[copyright_len] copyright;
UINT16 comment_len;
UINT8[comment_len] comment;
}
}
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=11>10
<HR>
INTERNET-DRAFT RTSP March 13, 1998
The Content Description Header contains the following fields:
object_id: 32 bits
The unique object ID for the Content Description Header ('CONT').
size: 32 bits
The size of the Content Description Header in bytes.
object_version: 16 bits
The version of the Content Description Header object.
title_len: 16 bits
The length of the title data in bytes. Note that the title data is
not null terminated. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
title: variable length
An array of ASCII characters that represents the title information
for the RealMedia file. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
author_len: 16 bits
The length of the author data in bytes. Note that the author data
is not null terminated. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
author: variable length
An array of ASCII characters that represents the author information
for the RealMedia file. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
copyright_len: 16 bits
The length of the copyright data in bytes. Note that the copyright
data is not null terminated. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
copyright: variable length
An array of ASCII characters that represents the copyright
information for the RealMedia file. This member is present on all
Content Description Header objects with an object_version of 0
(zero).
comment_len: 16 bits
The length of the comment data in bytes. Note that the comment data
is not null terminated. This member is present on all Content
Description Header objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=12>11
<HR>
INTERNET-DRAFT RTSP March 13, 1998
comment: variable length
An array of ASCII characters that represents the comment
information for the RealMedia file. This member is present on all
Content Description Header objects with an object_version of 0
(zero).
3. Data Section
The data section of the RealMedia file consists of a Data Section Header
that describes the contents of the data section, followed by a series of
interleaved media data packets. Note that the size field of the Data
Chunk Header is the size of the entire data chunk, including the media
data packets.
3.1 Data Chunk Header
The Data Chunk Header marks the start of the data chunk. There is
usually only one data chunk in a RealMedia file, however for extremely
large files there may be multiple data chunks. The following
pseudo-structure describes the Data chunk header:
Data_Chunk_Header
{
UINT32 object_id;
UINT32 size;
UINT16 object_version;
if (object_version == 0)
{
UINT32 num_packets;
UINT32 next_data_header;
}
}
The Data Chunk Header contains the following fields:
object_id: 32 bits
The unique object ID for the Data Chunk Header ('DATA').
size: 32 bits
The size of the Data Chunk in bytes.
object_version: 16 bits
The version of the Data Chunk Header object.
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=13>12
<HR>
INTERNET-DRAFT RTSP March 13, 1998
num_packets: 32 bits
Number of packets in the data chunk. This member is present on all
Data Chunk Header objects with an object_version of 0 (zero).
next_data_header: 32 bits
Offset from start of file to the next data chunk. This field is not
typically used. This member is present on all Data Chunk Header
objects with an object_version of 0 (zero).
3.2 Data Packet Header
The data section of a RealMedia file consists of a series of interleaved
data objects. Each data object contains a packet of data for a media
stream. Because a RealMedia file can contain numerous media streams,
data objects for each stream are interleaved. The following
pseudo-structure describes the details of each interleaved packet:
Media_Packet_Header
{
UINT16 object_version;
if (object_version == 0)
{
UINT16 length;
UINT16 stream_number;
UINT32 timestamp;
UINT8 reserved;
UINT8 flags;
UINT8[length] data;
}
}
The Media Packet Header contains the following fields:
object_version: 16 bits
The version of the Media Packet Header object.
length: 16 bits
The length of the packet in bytes. This member is present on all
Media Packet Header objects with an object_version of 0 (zero).
stream_number: 16 bits
The 16-bit alias used to associate data packets with their
associated Media Properties Header. This member is present on all
Media Packet Header objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=14>13
<HR>
INTERNET-DRAFT RTSP March 13, 1998
timeStamp: 32 bits
The timestamp of the packet in milliseconds This member is present
on all Media Packet Header objects with an object_version of 0
(zero).
reserved: 8 bits
This is not used. This member is present on all Media Packet Header
objects with an object_version of 0 (zero).
flags: 16 bits
Flags describing the properties of the packet. The following flags
are defined:
o #define PN_RELIABLE_FLAG 0x0001
If this flag is set, the packet is delivered reliably.
o #define PN_KEYFRAME_FLAG 0x0002
If this flag is set, the packet is part of a key frame or in
some way marks a boundary in your data stream.
This member is present on all Media Packet Header objects with an
object_version of 0 (zero).
data: variable length
The application-specific media data. This member is present on all
Media Packet Header objects with an object_version of 0 (zero).
4. Index Section
The index section of the RealMedia file consists of a Index Chunk Header
that describes the contents of the index section, followed by a series
of index records. Note that the size field of the Index Chunk Header is
the size of the entire index chunk, including the index records.
4.1 Index Section Header
The Index Chunk Header marks the start of the index chunk. There is
usually one index chunk per stream in a RealMedia file. The following
pseudo-structure describes the Index chunk header.
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=15>14
<HR>
INTERNET-DRAFT RTSP March 13, 1998
Index_Chunk_Header
{
u_int32 object_id;
u_int32 size;
u_int16 object_version;
if (object_version == 0)
{
u_int32 num_indices;
u_int16 stream_number;
u_int32 next_index_header;
}
}
The Index Chunk Header contains the following fields:
object_id: 32 bits
The unique object ID for the Index Chunk Header ('INDX').
size: 32 bits
The size of the Index Chunk in bytes.
object_version: 16 bits
The version of the Index Chunk Header object.
num_indices: 32 bits
Number of index records in the index chunk. This member is present
on all Index Chunk Header objects with an object_version of 0
(zero).
stream_number: 16 bits
The stream number for which the index records in this index chunk
are associated. This member is present on all Index Chunk Header
objects with an object_version of 0 (zero).
next_index_header: 32 bits
Offset from start of file to the next index chunk. This field lets
RealMedia file format readers find all the index chunks
quickly. This member is present on all Index Chunk Header objects
with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page <A name=16>15
<HR>
INTERNET-DRAFT RTSP March 13, 1998
4.2 Index Record
The index section of a RealMedia file consists of a series of index
record objects. Each index record contains information for quickly
finding a packet of a particular time stamp for a media stream. The
following pseudo-structure describes the details of each index record:
IndexRecord
{
UINT16 object_version;
if (object_version == 0)
{
u_int32 timestamp;
u_int32 offset;
u_int32 packet_count_for_this_packet;
}
}
An Index Record contains the following fields:
object_version: 16 bits
The version of the Index Record object.
timestamp: 32 bits
The timestamp in milliseconds associated with this record. This
member is present on all Index Record objects with an
object_version of 0 (zero).
offset: 32 bits
The offset from the start of the file at which this packet can be
found. This member is present on all Index Record objects with an
object_version of 0 (zero).
packet_count_for_this_packet: 32 bits
The packet number of the packet for this record. This is the same
number of packets that would have been seen had the file been
played from the beginning to this point. This member is present on
all Index Record objects with an object_version of 0 (zero).
R. Agarwal, J. Ayars, B. Hefta-Gaub, D. Stammen Page 16</PRE><A
href="http://globecom.net/ietf/draft/draft-heftagaub-rmff-00.txt">Original</A></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -