Resource Interchange File Format: Difference between revisions

Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
ce for tone
 
(31 intermediate revisions by 18 users not shown)
Line 1:
{{shortShort description|Tagged file structure for multimedia resource files}}
{{moreMore footnotes needed|date=January 2019}}
{{Infobox file format
| name = RIFF
Line 21:
| latest_release_version =
| latest_release_date = <!-- {{start date and age|YYYY|mm|dd|df=yes/no}} -->
| genretype = [[Digital containerContainer format (digital)|Container format]]
| container_for =
| contained_by =
Line 27:
| extended_to = [[Audio Video Interleave|AVI]], [[ANI (animation file format)|ANI]], PAL, RDIB, RMIDI, RMMP, [[WAV]]
| standard = <!-- or: | standards = -->
| freeopen = Yes
| free = Yes<ref>{{cite tech report |publisher=Library of Congress |___location=Washington, D.C. |series=Sustainability of Digital Formats |type=Full draft |title=RIFF (Resource Interchange File Format) |date=16 September 2004 |url=https://www.loc.gov/preservation/digital/formats/fdd/fdd000025.shtml |access-date=13 December 2021}}</ref>
| url =
}}
 
The '''Resource Interchange File Format''' ('''RIFF''') is a generic file [[container format (digital)|container format]] for storing data in tagged [[Chunk (information)|chunks]].<ref>{{Cite book |title=Multimedia Programming Interface and Data Specifications 1.0 |url=httphttps://www-.mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf |format=PDF |pages=10–11 |publisher=IBM / Microsoft |date=August 1991 |access-date=2017-07-07}}</ref> It is primarily used tofor store [[multimedia]] such as soundaudio and video, though it may alsocan be used to store anyfor arbitrary data.<ref name="LoC">{{cite web|url=http://www.digitalpreservation.gov/formats/fdd/fdd000025.shtml|title=RIFF (Resource Interchange File Format)|publisher=[[Library of Congress]]|work=Digital Preservation|date=2014-01-08|accessdateaccess-date=2014-03-11}}</ref>
 
The Microsoft implementation is mostly known through the container formats like [[Audio Video Interleave|AVI]], [[ANI (animation file format)|ANI]] and [[WAV]], which use RIFF as their basis.<ref name="micriff">{{cite webbook|title=Encyclopedia of Graphics File Formats, Second Edition |date=1996 |authorsauthor=James D. Murray, |author2=William vanRyper |isbn=1-56592-161-5 |publisher=[[O'Reilly Media|O'Reilly]] |at=Microsoft RIFF |url=https://www.fileformat.info/format/riff/egff.htm |accessdateaccess-date=2016-04-07 |url-status=live |archiveurlarchive-url=https://web.archive.org/web/20051128020903/http://www.oreilly.com/www/centers/gff/formats/micriff/index.htm |archivedatearchive-date=November 28, 2005 }}</ref>
 
== History ==
RIFF was introduced in 1991 by [[Microsoft]] and [[International Business Machines|IBM]], and was presented by Microsoftused as the default format for [[Windows 3.1x|Windows 3.1]] multimedia files. It is based on [[Electronic Arts]]' [[Interchange File Format]], introduced by [[Electronic Arts]] in 1985 on the [[Commodore Amiga]],. theIFF onlyuses differencethe being that multi-[[byteEndianness|big-endian]] integersconvention areof inthe Amiga's [[endianness|little-endianMotorola 68000]] formatCPU, nativebut toin theRIFF multi-[[80x86byte]] processorintegers seriesare usedstored in IBM PCs, rather than the big[[Endianness|little-endian]] formatorder native toof the [[68kx86]] processor seriesprocessors used in [[Amiga]]IBM andPC [[Apple Macintoshcompatible]] computers, where IFF files were heavily useds. A RIFX format, usingwhich is big-endian format, was also introduced.
 
In 2010 Google introduced the [[WebP]] picture format, which uses RIFF as a container.<ref>{{Cite web |url=http://code.google.com/speed/webp/docs/riff_container.html |title=RIFF Container |work=[[Google Code]] |access-date=1 October 2010 }}</ref>
| url = http://code.google.com/speed/webp/docs/riff_container.html
| title = RIFF Container
| work = [[Google Code]]
| publisher = Google
| accessdate = 1 October 2010
}}</ref>
 
== Explanation ==
Line 59 ⟶ 54:
* rest of data: subchunks.
 
The file itself consists of one RIFF chunk, which then can contain further subchunks: hence, the first four bytes of a correctly formatted RIFF file will spell out "R", "I", "F", "FRIFF".
 
More information about the RIFF format can be found in the [[Interchange File Format]] article.
Line 70 ⟶ 65:
== Compatibility issues ==
=== Initial difficulties with MIDI files ===
In line with their policy of using .RIFF for all Windows 3.1 "multimedia" files, Microsoft introduced a new variant on the existing [[MIDI|MIDI file]] format used for storing song information to be played on electronic musical instruments. Microsoft's "new" MIDI file format consisted of a standard MIDI file enclosed in a RIFF "wrapper", and had the file extension [[Musical Instrument Digital InterfaceMIDI#RIFF-RMID files|.RMI]]. Since the existing MIDI file format already supported embedded "tagging" information, thethis advantages tocaused the userdisadvantage of having ato newdeal formatwith weretwo notfile obviousformats for the same type of information.
 
The MIDI Manufacturers Association have since embraced the RIFF-based MIDI file format, and used it as the basis of an "extended midifile" that also includes instrument data in "[[DLS format|DLS]]" format, embedded within the same .RMI file.
Line 85 ⟶ 80:
== RIFF info tags ==
 
RIFF information tags are found in WAV audio and AVI video files. Tags which are part of the [[Exif]] 2.2 specification (Tag ID's beginning with "I") have an underlined tag name in the HTML version of this documentation. Other tags are found in AVI files generated by [[Sony Vegas]] video editing software.
 
{| class="wikitable"
Line 127 ⟶ 122:
 
== See also ==
* [[Interchange File Format|IFF]] (the [[big-endian]] format from which RIFF derives)
* [[Audio Interchange File Format|AIFF]]
* [[FourCC]]
* [[Broadcast Wave Format|BWF]] Broadcast Wave Format
* [[Type–length–value|TLV]] (the generic format that RIFF is an example of)
* [[FourCC]] (the chunk identification approach used by many TLV formats, including IFF, as verbose [[Magic number (programming)#Format indicator|Magic number]])
 
== References ==