RIFF: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
#REDIRECT [[Microsoft Audio/Video Interleaved]]
The '''Resource Interchange File Format''' ('''RIFF''') is the chunked container format which forms the basis for the [[Microsoft Wave]] and [[Microsoft Audio/Video Interleaved|AVI]] formats.
 
== Structure ==
 
General structure for all RIFF nodes:
 
Nodes can be data or '''LIST''', data structure is:
 
4 bytes name (a.k.a. FourCC)
4 bytes length, 32 bit integer in little-endian
''length'' bytes data
optionally 1 byte padding if length is odd
 
'''LIST''' structure is:
 
4 bytes string "LIST"
4 bytes length, 32 bit integer in little-endian
4 bytes name
''length'' bytes data - data is a list of nodes.
optionally 1 byte padding if length is odd
 
An entire RIFF file has the structure:
 
4 bytes string "RIFF"
4 bytes length, 32 bit integer in little-endian
4 bytes name
''length'' bytes data - data is a list of nodes.
 
 
[[Category:Container Formats]]

Revision as of 05:06, 2 July 2007

The Resource Interchange File Format (RIFF) is the chunked container format which forms the basis for the Microsoft Wave and AVI formats.

Structure

General structure for all RIFF nodes:

Nodes can be data or LIST, data structure is:

4 bytes name (a.k.a. FourCC)
4 bytes length, 32 bit integer in little-endian
length bytes data
optionally 1 byte padding if length is odd

LIST structure is:

4 bytes string "LIST"
4 bytes length, 32 bit integer in little-endian
4 bytes name
length bytes data - data is a list of nodes.
optionally 1 byte padding if length is odd

An entire RIFF file has the structure:

4 bytes string "RIFF"
4 bytes length, 32 bit integer in little-endian
4 bytes name
length bytes data - data is a list of nodes.