FourCC

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m (correction)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
FourCC, is a FOUR Character Code in the beginning of the media file that tells what codec your system should use for decoding the file. It is mostly associated with [[AVI]] media files. You can use this to force [[AviSource]] to open the avi file using a different codec. A list of FOURCCs can be found [[http://www.fourcc.org/index.php?http%3A//www.fourcc.org/codecs.php here]].
+
__NOTOC__
 +
<div style="max-width:62em" >
 +
A '''FourCC''' (literally, '''four'''-'''c'''haracter '''c'''ode) is a sequence of four [[wikipedia:byte|bytes]] used to uniquely identify [[wikipedia:File format|data format]]s.
 +
</div>
  
 +
=====Technical details===== __NOEDITSECTION__
 +
<div style="max-width:62em" >
 +
The byte sequence is usually restricted to [[wikipedia:ASCII#ASCII printable characters|ASCII printable characters]], with space characters reserved for padding shorter sequences. Case sensitivity is preserved.
 +
 +
Four-byte identifiers are useful because they can be made up of four human-readable characters with mnemonic qualities. Thus, the codes can be used efficiently in program code as integers, as well as giving cues in binary data streams when inspected.
 +
 +
{{AvsPluscon}} Some FourCCs, such as those for certain [[High_bit_depth|high bit depth]] raw video formats, contain non-printable characters and are not human-readable without special formatting for display; for example, 10bit planar YUV422, known in [[AviSynth%2B]] as [[Avisynthplus_color_formats|YUV422P10]], can have a FourCC of <span style="white-space:nowrap">('Y', '3', 10, 10)<sup>[http://ffmpeg.org/doxygen/trunk/raw_8c_source.html#l00136 (1)]</sup></span> which ffmpeg displays as <span style="white-space:nowrap"><code>rawvideo (Y3[10][10] / 0xA0A3359), yuv422p10le</code>.</span>
 +
</div>
 +
 +
=====History===== __NOEDITSECTION__
 +
<div style="max-width:62em" >
 +
In 1985, [[wikipedia:Electronic Arts|Electronic Arts]] introduced the [[wikipedia:Interchange File Format|Interchange File Format]] (IFF) meta-format (family of file formats), originally devised for use on the [[wikipedia:Amiga|Amiga]]. These files consisted of a sequence of "chunks", which could contain arbitrary data, each chunk prefixed by a four-byte ID. The IFF specification explicitly mentions that the origins of the FourCC idea lie with Apple.<sup>[http://www.martinreddy.net/gfx/2d/IFF.txt (2)]</sup>
 +
 +
This IFF was adopted by a number of developers including [[wikipedia:Apple Computer|Apple]] for [[wikipedia:AIFF|AIFF]] files and [[wikipedia:Microsoft|Microsoft]] for [[wikipedia:RIFF (File format)|RIFF]] files (which were used as the basis for the [[wikipedia:Audio Video Interleave|AVI]] and [[wikipedia:WAV|WAV]] file format). Microsoft and [[wikipedia:Microsoft Windows|Windows]] developers refer to their four-byte identifiers as '''FourCC'''s.
 +
</div>
 +
 +
=====References===== __NOEDITSECTION__
 +
# [http://ffmpeg.org/doxygen/trunk/raw_8c_source.html#l00136 ''RAW.C''] (ffmpeg.org)
 +
# [http://www.martinreddy.net/gfx/2d/IFF.txt ''"EA IFF 85" Standard for Interchange Format Files''] (martinreddy.net)
 +
 +
=====External links===== __NOEDITSECTION__
 +
* [http://www.fourcc.org Video codecs and Pixel Formats] (fourcc.org)
 +
 +
 +
----
 +
''This page was adapted from Wikipedia: [https://en.wikipedia.org/w/index.php?title=FourCC&oldid=769753770 FourCC]; version 11 March 2017. ''
 +
 +
''Wikipedia text is available under the [https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License Creative Commons Attribution-ShareAlike License]''
 +
 +
[[Category:Advanced topics]]
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Latest revision as of 20:03, 10 June 2017

A FourCC (literally, four-character code) is a sequence of four bytes used to uniquely identify data formats.

Technical details

The byte sequence is usually restricted to ASCII printable characters, with space characters reserved for padding shorter sequences. Case sensitivity is preserved.

Four-byte identifiers are useful because they can be made up of four human-readable characters with mnemonic qualities. Thus, the codes can be used efficiently in program code as integers, as well as giving cues in binary data streams when inspected.

AVS+ Some FourCCs, such as those for certain high bit depth raw video formats, contain non-printable characters and are not human-readable without special formatting for display; for example, 10bit planar YUV422, known in AviSynth+ as YUV422P10, can have a FourCC of ('Y', '3', 10, 10)(1) which ffmpeg displays as rawvideo (Y3[10][10] / 0xA0A3359), yuv422p10le.

History

In 1985, Electronic Arts introduced the Interchange File Format (IFF) meta-format (family of file formats), originally devised for use on the Amiga. These files consisted of a sequence of "chunks", which could contain arbitrary data, each chunk prefixed by a four-byte ID. The IFF specification explicitly mentions that the origins of the FourCC idea lie with Apple.(2)

This IFF was adopted by a number of developers including Apple for AIFF files and Microsoft for RIFF files (which were used as the basis for the AVI and WAV file format). Microsoft and Windows developers refer to their four-byte identifiers as FourCCs.

References
  1. RAW.C (ffmpeg.org)
  2. "EA IFF 85" Standard for Interchange Format Files (martinreddy.net)
External links



This page was adapted from Wikipedia: FourCC; version 11 March 2017.

Wikipedia text is available under the Creative Commons Attribution-ShareAlike License

Personal tools