rm文件格式

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

RealMedia Format

This is the newer format which stores both audio and video. All multi-byte numbers are stored in big-endian format.

A RealMedia file consists of a series of chunks. Each chunk has the following format:

dword chunk type (FOURCC)

dword chunk size, including 8-byte preamble

word chunk version

byte[] chunk payload

Real chunk types:

∙.RMF: RealMedia file header (only one per file, must be the first chunk)

∙PROP: File properties (only one per file)

∙MDPR: Stream properties (one for each stream)

∙CONT: Content description/metadata (typically one per file)

∙DATA: File data

∙INDX: File index (typically one per stream)

RealMedia file header (.RMF)

This must be the first chunk in a RealMedia file. Only one .RMF can be present in a file. The only useful information carried by .RMF is the number of headers.

A .RMF chunk has the following format

dword chunk type ('.RMF')

dword chunk size (typically 0x12)

word chunk version (always 0, for every known file)

dword file version

dword number of headers

File properties header (PROP)

This chunk contains some information about the general properties of a RealMedia file. Only one PROP chunk can be present in a file.

A PROP chunk has the following format

dword Chunk type ('PROP')

dword Chunk size (typically 0x32)

word Chunk version (always 0, for every known file)

dword Maximum bit rate

dword Average bit rate

dword Size of largest data packet

dword Average size of data packet

dword Number of data packets in the file

dword File duration in ms

dword Suggested number of ms to buffer before starting playback dword Offset of the first INDX chunk form the start of the file dword Offset of the first DATA chunk form the start of the file

word Number of streams in the file

word Flags (bitfield, see below)

Flags:

∙bit 0: file can be saved on disk

∙bit 1: PerfectPlay can be used (extra buffering)

∙bit 2: the file is a live broadcast

Media properties header (MDPR)

This chunk contains information about the properties of a RealMedia stream. This header defines the type of a stream and the codec used. All

codec-related data is in the type specific part of this header.

Many fields share the same meanings as the ones in PROP chunk, but in this case they are specific for one stream.

There is one MDPR chunk for every stream in the file.

A MDPR chunk has the following format

dword Chunk type ('MDPR')

dword Chunk size

word Chunk version (always 0, for every known file)

word Stream number

dword Maximum bit rate

dword Average bit rate

dword Size of largest data packet

dword Average size of data packet

dword Stream start offset in ms

dword Preroll in ms (to be subtracted from timestamps?)

相关文档
最新文档