Content deleted Content added
No edit summary Tags: Reverted section blanking Visual edit Mobile edit Mobile web edit |
ce for tone |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1:
{{
{{
{{Infobox file format
| name = RIFF
Line 34:
'''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=https://www.mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf |pages=10–11 |publisher=IBM / Microsoft |date=August 1991 |access-date=2017-07-07}}</ref> It is primarily used for audio and video, though it can be used for 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|access-date=2014-03-11}}</ref>
The Microsoft implementation is mostly known through the container formats
== History ==
RIFF was introduced in 1991 by [[Microsoft]] and [[International Business Machines|IBM]] and used as the default format for [[Windows 3.1x|Windows 3.1]] multimedia files. It is based on [[Interchange File Format]] introduced by [[Electronic Arts]] in 1985 on the [[Amiga]]. IFF uses the [[
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>
== Explanation ==
Line 104 ⟶ 99:
|
|}
=== Converting DTIM time to normal time ===
The field consists of two values (v[0] and v[1]) separated with a space (0x20). Sample code:
<syntaxhighlight lang="c">
// time in seconds - "concatenate" date & time elements with a decimal point delimiter
TimeInSeconds = (v[0] * (2^32) + v[1]) * 10^(-7);
// shift basis from Jan 1, 1601 to Unix epoch Jan 1, 1970 (369 years & leap days)
UnixTimeStamp = TimeInSeconds - 134774 * 24 * 3600;
</syntaxhighlight>
== Some common RIFF file types ==
Line 118 ⟶ 123:
== See also ==
* [[Interchange File Format|IFF]] (the [[big-endian]] format from which RIFF derives)
* [[Audio Interchange File Format|AIFF]]
* [[Broadcast Wave Format|BWF]] Broadcast Wave Format
* [[Type–length–value|TLV]] (the generic format that RIFF is an example of)
|