<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mahanstreamer</id>
	<title>MultimediaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multimedia.cx/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mahanstreamer"/>
	<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php/Special:Contributions/Mahanstreamer"/>
	<updated>2026-07-07T12:02:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_1&amp;diff=15582</id>
		<title>Duck TrueMotion 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_1&amp;diff=15582"/>
		<updated>2021-08-20T04:41:00Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: /* 24-bit Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: DUCK,PVEZ&lt;br /&gt;
* Company: [[On2|On2 (formerly Duck)]]&lt;br /&gt;
* Patents: US #6,181,822, &amp;quot;Data compression apparatus and method&amp;quot;&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/V-codecs/DUCK/ and http://ghostarchive.org/samples/V-codecs/DUCK/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Duck TrueMotion 1 (TM1) is the first video codec developed by The Duck Corporation. It uses [[Differential Coding|differential pulse code modulation]] and interframe differencing. The primary application for which Duck TrueMotion 1 was developed is gaming software, typically on PC or Sega Saturn titles.&lt;br /&gt;
&lt;br /&gt;
== Underlying Concepts ==&lt;br /&gt;
&lt;br /&gt;
TM1 operates on bidirectional delta quantization. The mathematical premise of delta coding is simple addition. For example, take the following sequence of numbers:&lt;br /&gt;
&lt;br /&gt;
  82 84 81 80 86 88 85&lt;br /&gt;
&lt;br /&gt;
All of the numbers are reasonably large (on a scale of 0..255 in this example). However, they are quite similar to each other. Using delta coding, only the differences between successive numbers are stored:&lt;br /&gt;
&lt;br /&gt;
  82 +2 -3 -1 +6 +2 -3&lt;br /&gt;
&lt;br /&gt;
The first number is still large but since the remaining numbers are clustered close to each other, the deltas are relatively small. Thus, the deltas require less information to encode. &lt;br /&gt;
&lt;br /&gt;
TM1 takes this concept and extends it to 2 dimensions. A particular pixel is assumed to have a pixel directly above it and a pixel directly to the left (if neither of these pixels exist in the frame, e.g., for the top-left corner pixel, 0 is used in place of the non-existant pixels). The current pixel is decoded as the sum of the up and left pixels, plus a delta from the encoded video bitstream.&lt;br /&gt;
&lt;br /&gt;
  encoded video bitstream: ...D5 D6 D7 D8...&lt;br /&gt;
  &lt;br /&gt;
  decoded video frame:&lt;br /&gt;
    A B C D&lt;br /&gt;
    E F G H&lt;br /&gt;
    &lt;br /&gt;
In this example, the encoded video bitstream is sitting at delta D5 when it is time to decode pixel E. A is the pixel above E. There is no pixel to the left of E, so 0 is used as the left value. Thus:&lt;br /&gt;
&lt;br /&gt;
  E = A + 0 + D5&lt;br /&gt;
&lt;br /&gt;
In the case of pixel F, both the up and left pixel values (called the vertical and horizontal predictors, respectively) are available:&lt;br /&gt;
&lt;br /&gt;
  F = B + E + D6&lt;br /&gt;
&lt;br /&gt;
That is the general idea behind decoding TM1 data. The actual decoding algorithm is more involved. The TM1 bytestream actually contains a series of indices that point into tables with the delta values to be&lt;br /&gt;
applied to the vertical and horizontal predictor pixels. These tables only specify small deltas to be added to pixel predictors. When a larger delta is needed because the delta between 2 numbers is too large, then a special bytestream code indicates that the next delta is to be multiplied by 5 before it is applied.&lt;br /&gt;
&lt;br /&gt;
TM1 operates on 4x4 macroblocks of pixels. Each block in a frame can be broken into 4 2x2 blocks, 2 halves (either 4x2 or 2x4), or encoded as a 4x4 block. The block type is encoded in the frame header.&lt;br /&gt;
&lt;br /&gt;
While the TM1 algorithm operates on RGB colorspace data at the input and output level, it borrows some ideas from YUV colorspaces. For more information of RGB and YUV colorspaces, see the References section.&lt;br /&gt;
&lt;br /&gt;
TM1 uses a modified colorspace that embodies luminance (Y) and chrominance (C) information encoded as RGB deltas. Since Y information is more important to the human eye than C information, the Y data must be updated more frequently than the C data (i.e., more Y predictors than C predictors are applied to the image). For a every pixel within a given block in a macroblock, a Y predictor must be applied. However, only one C predictor is applied for each block in the macroblock.&lt;br /&gt;
&lt;br /&gt;
== TrueMotion v1 Frame Format and Header ==&lt;br /&gt;
&lt;br /&gt;
All multi-byte numbers are stored in little endian format.&lt;br /&gt;
&lt;br /&gt;
An encoded intraframe (keyframe) of TM1 data is laid out as:&lt;br /&gt;
&lt;br /&gt;
  header  |  predictor indices&lt;br /&gt;
&lt;br /&gt;
An encoded interframe is laid out as:&lt;br /&gt;
&lt;br /&gt;
  header  |  block change bits  |  predictor indices&lt;br /&gt;
&lt;br /&gt;
The difference between the 2 types of frames is that an interframe has a section of bits that specify which blocks in the frame are unchanged from the previous frame.&lt;br /&gt;
&lt;br /&gt;
A TM1 header is quasi-encrypted with a logical XOR operation. This is probably done to provide some obfuscation of the header and thwart casual inspection of the data format.&lt;br /&gt;
&lt;br /&gt;
An encoded TM1 frame begins with the one byte that indicates the length of the decrypted header, only with a dummy high bit and rotated left by 5. To obtain the actual length from byte B:&lt;br /&gt;
&lt;br /&gt;
  L = ((B &amp;gt;&amp;gt; 5) | (B &amp;lt;&amp;lt; 3)) &amp;amp; 0x7F&lt;br /&gt;
&lt;br /&gt;
Then, decrypt the header by starting with byte 1 in the encoded frame (indexing from 0) and XORing each byte with its successive byte. Assuming the header is of length L bytes as computed above, and that the encoded header starts at buffer[1] (buffer[0] had the rotated length), the decode process is:&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i &amp;lt; L; i++)&lt;br /&gt;
    decoded_header[i - 1] = buffer[i] ^ buffer[i + 1];&lt;br /&gt;
&lt;br /&gt;
The decoded header data structure is laid out as follows:&lt;br /&gt;
&lt;br /&gt;
  byte 0       compression method&lt;br /&gt;
  byte 1       delta set&lt;br /&gt;
  byte 2       vector set&lt;br /&gt;
  bytes 3-4    frame height&lt;br /&gt;
  bytes 5-6    frame width&lt;br /&gt;
  bytes 7-8    checksum&lt;br /&gt;
  byte 9       version&lt;br /&gt;
  byte 10      header type&lt;br /&gt;
  byte 11      flags&lt;br /&gt;
  byte 12      control&lt;br /&gt;
  bytes 13-14  x offset&lt;br /&gt;
  bytes 15-16  y offset&lt;br /&gt;
  bytes 17-18  width&lt;br /&gt;
  bytes 19-20  height&lt;br /&gt;
  &lt;br /&gt;
The compression method field indicates the type of compression used to encode this frame. There are 2 general types: 16-bit and 24-bit. Further, each has 4 block sizes to select from. The valid compression types are&lt;br /&gt;
&lt;br /&gt;
  0, 9, 11, 13, 15: NOP frames; frame is unchanged from previous frame&lt;br /&gt;
  1:  16-bit 4x4 (V)&lt;br /&gt;
  2:  16-bit 4x4 (H)&lt;br /&gt;
  3:  16-bit 4x2 (V)&lt;br /&gt;
  4:  16-bit 4x2 (H)&lt;br /&gt;
  5:  16-bit 2x4 (V)&lt;br /&gt;
  6:  16-bit 2x4 (H)&lt;br /&gt;
  7:  16-bit 2x2 (V)&lt;br /&gt;
  8:  16-bit 2x2 (H)&lt;br /&gt;
  10: 24-bit 4x4 (H)&lt;br /&gt;
  12: 24-bit 4x2 (H)&lt;br /&gt;
  14: 24-bit 2x4 (H)&lt;br /&gt;
  16: 24-bit 2x2 (H)&lt;br /&gt;
 &amp;gt;16: invalid compression type&lt;br /&gt;
&lt;br /&gt;
The (H) and (V) designations come from the original Duck source code. It is unclear what they mean, except for the common horizontal and vertical designations common in video terminology.&lt;br /&gt;
&lt;br /&gt;
The delta set and vector set fields are used to generate the set of predictor tables that will be used to decode this frame.&lt;br /&gt;
&lt;br /&gt;
The height and width fields should be the same as those specified in the AVI file that contains the data.&lt;br /&gt;
&lt;br /&gt;
The checksum field appears to contain the frame's sequence number modulo 512. The first frame is 0x0000 and the next frame is 0x0001. Frame #511 has a checksum of 0x01FF while frame #512 wraps around to 0x0000.&lt;br /&gt;
&lt;br /&gt;
If the version field is less than 2, then the frame is intracoded (this may indicate that early versions of the coding method was purely intracoded). If the version field is greater than or equal to 2, then if the header type field is 2 or 3, the flags field has bit 4 set (flags &amp;amp; 0x10) to indicate an intraframe; else if the header type field is greater than 3, then the header is invalid; else the frame is intracoded.&lt;br /&gt;
&lt;br /&gt;
The purpose of the control field is unclear.&lt;br /&gt;
&lt;br /&gt;
The x &amp;amp; y offset, width, and height fields apparently pertain to a sprite mode that is not covered in this document.&lt;br /&gt;
&lt;br /&gt;
== 16-bit Data ==&lt;br /&gt;
&lt;br /&gt;
Decoding a 16-bit frame requires 2 tables. The tables can change from one frame to the next and must be rebuilt if the header specified a new table. One table contains the C predictors while the other contains the Y predictors.&lt;br /&gt;
&lt;br /&gt;
Each table consists of 1024 32-bit entries. Each group of 4 entries corresponds to a byte index from 0..255. Each entry contains a double pixel predictor shifted left by one. If the very last bit (bit 0) in the 32-bit entry is 0, then there is another predictor for that index. If the last bit is 1, then this predictor is the last one for this list.&lt;br /&gt;
&lt;br /&gt;
For example...&lt;br /&gt;
&lt;br /&gt;
  A B C D ...&lt;br /&gt;
  E F G H ...&lt;br /&gt;
  I J K L ...&lt;br /&gt;
  M N O P ...&lt;br /&gt;
&lt;br /&gt;
'''(UNFINISHED)'''&lt;br /&gt;
&lt;br /&gt;
== 24-bit Data ==&lt;br /&gt;
&lt;br /&gt;
The process of decoding a 24-bit frame is similar to that of decoding a 16-bit frame. However, the frame is decoded into 2 separate planes, a Y plane and a C plane, and recombined into a final RGB map at render time.&lt;br /&gt;
&lt;br /&gt;
A working implementation of sprite support can be found in NihAV: https://git.nihav.org/?p=nihav.git;a=blob;f=nihav-duck/src/codecs/truemotion1.rs;hb=HEAD &lt;br /&gt;
&lt;br /&gt;
'''(UNFINISHED)'''&lt;br /&gt;
&lt;br /&gt;
== Duck TrueMotion v1 Tables ==&lt;br /&gt;
[https://github.com/FFmpeg/FFmpeg/blob/5541cffa17a8c45004e5ceeda52d4d6b2acee037/libavcodec/truemotion1.c FFmpeg implementation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Games Using Duck TrueMotion 1 ==&lt;br /&gt;
These software titles are known to use the Duck TrueMotion 1 video codec to encode full motion video:&lt;br /&gt;
&lt;br /&gt;
* [https://www.mobygames.com/game/bubble-bobble-also-featuring-rainbow-islandsBubble Bobble special CD release with Rainbow Island (DOS)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/blazing-dragons Blazing Dragons (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/sega-saturn/congo-the-movie-the-lost-city-of-zinj Congo: The Movie - The Lost City of Zinj (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/dos/d D (DOS version only)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/horde The Horde (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/nhl-all-star-hockey NHL All-Star Hockey (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/phantasmagoria-a-puzzle-of-flesh Phantasmagoria: A Puzzle of Flesh (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/santa-fe-mysteries-the-elk-moon-murder Santa Fe Mysteries: The Elk Moon Murder (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/solar-eclipse Solar Eclipse (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/sonic-3d-blast Sonic 3D Blast (Sega Saturn)] - [https://www.youtube.com/watch?v=Fpqs4Fta3Ho Video]&lt;br /&gt;
* [https://www.mobygames.com/game/spycraft-the-great-game Spycraft: The Great Game (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/theme-park Theme Park (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/virtua-cop-2 Virtua Cop 2 (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/virtua-fighter-2 Virtua Fighter 2 (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/windows/zork-grand-inquisitor Zork: Grand Inquisitor (Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/windows/zork-nemesis-the-forbidden-lands Zork Nemesis: The Forbidden Lands (Windows)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Incomplete Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=VP9&amp;diff=15581</id>
		<title>VP9</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=VP9&amp;diff=15581"/>
		<updated>2021-08-14T04:08:02Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: VP90&lt;br /&gt;
* Description: ???&lt;br /&gt;
* Code : https://github.com/webmproject/libvpx&lt;br /&gt;
* Samples: ???&lt;br /&gt;
&lt;br /&gt;
VP9 is an open and royalty free video compression standard being developed by Google. VP9 had earlier development names of Next Gen Open Video (NGOV) and VP-Next. VP9 is a successor to VP8.&lt;br /&gt;
&lt;br /&gt;
A test (not pretending to be scientific or reliable) from 17th January 2013 is present in the discussion thread&lt;br /&gt;
http://forum.doom9.org/showthread.php?p=1610941&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=AV1&amp;diff=15580</id>
		<title>AV1</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=AV1&amp;diff=15580"/>
		<updated>2021-08-14T04:07:32Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: Created page with &amp;quot;* Source code: https://aomedia.googlesource.com/aom/ * Samples: http://samples.ffmpeg.org/av1 and http://ghostarchive.org/samples/av1  AV1 is a new codec created by Google and...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Source code: https://aomedia.googlesource.com/aom/&lt;br /&gt;
* Samples: http://samples.ffmpeg.org/av1 and http://ghostarchive.org/samples/av1&lt;br /&gt;
&lt;br /&gt;
AV1 is a new codec created by Google and the Alliance of Open Media.&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=MPEG-4_Audio&amp;diff=15579</id>
		<title>MPEG-4 Audio</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=MPEG-4_Audio&amp;diff=15579"/>
		<updated>2021-08-14T03:59:58Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Company: [[ISO]]&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/MPEG-4/ and http://ghostarchive.org/samples/MPEG-4&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/A-codecs/AAC/ and http://ghostarchive.org/samples/AAC&lt;br /&gt;
* Samples: [http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_14496-26_2010_Bitstreams/ sample repo at standards.iso.org]&lt;br /&gt;
* Sample Docs: [http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_14496-26_2010_Bitstreams/DVD1/mpeg4audio-conformance/doc/fileNameConventions.html sample docs]&lt;br /&gt;
* Sample Docs: [https://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_14496-26_2010_Bitstreams/DVD1/mpeg4audio-conformance/doc/ more sample docs]&lt;br /&gt;
&lt;br /&gt;
Specification links:&lt;br /&gt;
*MPEG-4 Audio: [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=53943 ISO/IEC 14496-3:2009]&lt;br /&gt;
*Conformance: [http://standards.iso.org/ittf/PubliclyAvailableStandards/c053750_ISO_IEC_14496-26_2010.zip ISO/IEC 14496-26:2010]&lt;br /&gt;
&lt;br /&gt;
== MPEG-4 Audio ==&lt;br /&gt;
MPEG-4 includes a system for handling a diverse group of audio formats in a uniform matter. Each format is assigned a unique Audio Object Type (AOT) to represent it. The common format Global header shared by all AOTs is called the Audio Specific Config. &lt;br /&gt;
&lt;br /&gt;
== Subparts ==&lt;br /&gt;
*Subpart 0: Overview&lt;br /&gt;
*Subpart 1: Main ([[MP4|Systems]] Interaction)&lt;br /&gt;
*Subpart 2: Speech coding - HVXC&lt;br /&gt;
*Subpart 3: Speech coding - CELP&lt;br /&gt;
*Subpart 4: General Audio coding (GA) - [[AAC]], TwinVQ, BSAC&lt;br /&gt;
*Subpart 5: Structured Audio (SA)&lt;br /&gt;
*Subpart 6: Text To Speech Interface (TTSI)&lt;br /&gt;
*Subpart 7: Parametric Audio Coding - HILN&lt;br /&gt;
*Subpart 8: Parametric coding for high quality audio - SSC (and [[Parametric Stereo]])&lt;br /&gt;
*Subpart 9: [[MP3|MPEG-1/2 Audio]] in MPEG-4&lt;br /&gt;
*Subpart 10: Lossless coding of oversampled audio - DST&lt;br /&gt;
*Subpart 11: Audio lossless coding - [[ALS]]&lt;br /&gt;
*Subpart 12: Scalable lossless coding - [[MPEG-4 SLS|SLS]]&lt;br /&gt;
&lt;br /&gt;
== Audio Specific Config ==&lt;br /&gt;
The Audio Specific Config is the global header for MPEG-4 Audio:&lt;br /&gt;
 5 bits: object type&lt;br /&gt;
 if (object type == 31)&lt;br /&gt;
     6 bits + 32: object type&lt;br /&gt;
 4 bits: frequency index&lt;br /&gt;
 if (frequency index == 15)&lt;br /&gt;
     24 bits: frequency&lt;br /&gt;
 4 bits: channel configuration&lt;br /&gt;
 var bits: AOT Specific Config&lt;br /&gt;
&lt;br /&gt;
== Audio Object Types ==&lt;br /&gt;
MPEG-4 Audio Object Types:&lt;br /&gt;
*0: Null &lt;br /&gt;
*1: [[AAC]] Main&lt;br /&gt;
*2: [[AAC]] LC (Low Complexity)&lt;br /&gt;
*3: [[AAC]] SSR (Scalable Sample Rate)&lt;br /&gt;
*4: [[AAC]] LTP (Long Term Prediction)&lt;br /&gt;
*5: SBR ([[Spectral Band Replication]])&lt;br /&gt;
*6: [[AAC]] Scalable&lt;br /&gt;
*7: [[TwinVQ]]&lt;br /&gt;
*8: [[CELP]] (Code Excited Linear Prediction)&lt;br /&gt;
*9: HXVC (Harmonic Vector eXcitation Coding)&lt;br /&gt;
*10: Reserved&lt;br /&gt;
*11: Reserved&lt;br /&gt;
*12: TTSI (Text-To-Speech Interface)&lt;br /&gt;
*13: Main Synthesis&lt;br /&gt;
*14: Wavetable Synthesis&lt;br /&gt;
*15: General MIDI&lt;br /&gt;
*16: Algorithmic Synthesis and Audio Effects&lt;br /&gt;
*17: ER (Error Resilient) [[AAC]] LC&lt;br /&gt;
*18: Reserved&lt;br /&gt;
*19: ER [[AAC]] LTP&lt;br /&gt;
*20: ER [[AAC]] Scalable&lt;br /&gt;
*21: ER [[TwinVQ]]&lt;br /&gt;
*22: ER [[BSAC]] (Bit-Sliced Arithmetic Coding)&lt;br /&gt;
*23: ER [[AAC]] LD (Low Delay)&lt;br /&gt;
*24: ER [[CELP]]&lt;br /&gt;
*25: ER HVXC&lt;br /&gt;
*26: ER HILN (Harmonic and Individual Lines plus Noise)&lt;br /&gt;
*27: ER Parametric&lt;br /&gt;
*28: SSC (SinuSoidal Coding)&lt;br /&gt;
*29: PS ([[Parametric Stereo]])&lt;br /&gt;
*30: [[MPEG Surround]]&lt;br /&gt;
*31: (Escape value)&lt;br /&gt;
*32: [[MP1|Layer-1]]&lt;br /&gt;
*33: [[MP2|Layer-2]]&lt;br /&gt;
*34: [[MP3|Layer-3]]&lt;br /&gt;
*35: DST (Direct Stream Transfer)&lt;br /&gt;
*36: [[MPEG-4 ALS|ALS]] (Audio Lossless)&lt;br /&gt;
*37: [[MPEG-4 SLS|SLS]] (Scalable LosslesS)&lt;br /&gt;
*38: [[MPEG-4 SLS|SLS]] non-core&lt;br /&gt;
*39: ER [[AAC]] ELD (Enhanced Low Delay)&lt;br /&gt;
*40: SMR (Symbolic Music Representation) Simple&lt;br /&gt;
*41: SMR Main&lt;br /&gt;
*42: [[USAC]] (Unified Speech and Audio Coding) (no [[SBR]])&lt;br /&gt;
*43: SAOC (Spatial Audio Object Coding)&lt;br /&gt;
*44: LD [[MPEG Surround]]&lt;br /&gt;
*45: [[USAC]]&lt;br /&gt;
&lt;br /&gt;
== Sampling Frequencies ==&lt;br /&gt;
There are 13 supported frequencies:&lt;br /&gt;
* 0: 96000 Hz&lt;br /&gt;
* 1: 88200 Hz&lt;br /&gt;
* 2: 64000 Hz&lt;br /&gt;
* 3: 48000 Hz&lt;br /&gt;
* 4: 44100 Hz&lt;br /&gt;
* 5: 32000 Hz&lt;br /&gt;
* 6: 24000 Hz&lt;br /&gt;
* 7: 22050 Hz&lt;br /&gt;
* 8: 16000 Hz&lt;br /&gt;
* 9: 12000 Hz&lt;br /&gt;
* 10: 11025 Hz&lt;br /&gt;
* 11: 8000 Hz&lt;br /&gt;
* 12: 7350 Hz&lt;br /&gt;
* 13: Reserved&lt;br /&gt;
* 14: Reserved&lt;br /&gt;
* 15: frequency is written explictly&lt;br /&gt;
&lt;br /&gt;
== Channel Configurations ==&lt;br /&gt;
These are the channel configurations:&lt;br /&gt;
* 0: Defined in AOT Specifc Config&lt;br /&gt;
* 1: 1 channel: front-center&lt;br /&gt;
* 2: 2 channels: front-left, front-right&lt;br /&gt;
* 3: 3 channels: front-center, front-left, front-right&lt;br /&gt;
* 4: 4 channels: front-center, front-left, front-right, back-center&lt;br /&gt;
* 5: 5 channels: front-center, front-left, front-right, back-left, back-right&lt;br /&gt;
* 6: 6 channels: front-center, front-left, front-right, back-left, back-right, LFE-channel&lt;br /&gt;
* 7: 8 channels: front-center, front-left, front-right, side-left, side-right, back-left, back-right, LFE-channel&lt;br /&gt;
* 8-15: Reserved&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_2&amp;diff=15578</id>
		<title>Duck TrueMotion 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_2&amp;diff=15578"/>
		<updated>2021-08-14T03:40:14Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: additional duck samples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: TM20&lt;br /&gt;
* Company: [[On2|On2 (formerly Duck)]]&lt;br /&gt;
* Patents: U.S. # 6,327,304, &amp;quot;Apparatus and method to digitally compress video signals&amp;quot;&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/V-codecs/TM20/ or http://ghostarchive.org/samples/V-codecs/TM20/&lt;br /&gt;
&lt;br /&gt;
Duck TrueMotion 2 relies on differential coding of samples in a YUV colorspace and coding those deltas using Huffman codes.&lt;br /&gt;
&lt;br /&gt;
== Codec principles ==&lt;br /&gt;
This codec operates on 4x4 blocks and employs data separation, so packed frame data is composed from these segments:&lt;br /&gt;
# luma deltas for hi-res blocks&lt;br /&gt;
# luma deltas for low-res blocks&lt;br /&gt;
# chroma deltas for hi-res blocks&lt;br /&gt;
# chroma deltas for med-res and low-res blocks&lt;br /&gt;
# values for updating whole block&lt;br /&gt;
# motion vectors&lt;br /&gt;
# block types&lt;br /&gt;
&lt;br /&gt;
Each segment is compressed with own Huffman codes (Huffman tree is stored in segment header), thus gaining compression from grouping similar data.&lt;br /&gt;
&lt;br /&gt;
Blocks are unpacked in this way:&lt;br /&gt;
&lt;br /&gt;
          LAST 4 ELEMENTS&lt;br /&gt;
          |    |    |    |&lt;br /&gt;
          V    V    V    V&lt;br /&gt;
  D0 -&amp;gt; +d00 +d10 +d20 +d30 -&amp;gt; D0&lt;br /&gt;
  D1 -&amp;gt; +d01 +d11 +d21 +d31 -&amp;gt; D1&lt;br /&gt;
  D2 -&amp;gt; +d02 +d12 +d22 +d32 -&amp;gt; D2&lt;br /&gt;
  D3 -&amp;gt; +d03 +d13 +d23 +d33 -&amp;gt; D2&lt;br /&gt;
          |    |    |    |&lt;br /&gt;
          V    V    V    V&lt;br /&gt;
          LAST 4 ELEMENTS&lt;br /&gt;
&lt;br /&gt;
When current block is low-res block, an average value of pair of two last elements is calculated and used instead of them. When another type of block occurs (update, motion, still) after doing operation we need to re-calculate deltas. The same applies to chroma blocks, they are just 2x2 size.&lt;br /&gt;
&lt;br /&gt;
Block types:&lt;br /&gt;
# Hi-resolution block: 16 luma deltas, 8 chroma deltas&lt;br /&gt;
# Medium-resolution block: 16 luma deltas, 2 chroma deltas&lt;br /&gt;
# Low-resolution block: 4 luma deltas, 2 chroma deltas&lt;br /&gt;
# Null block: no deltas, interpolate it from last 4 elements and deltas&lt;br /&gt;
# Still block: copy data from previous frame (and update Dx)&lt;br /&gt;
# Update block: 16 luma deltas, 8 chroma deltas, all applied independently , so recalculation is needed&lt;br /&gt;
# Motion block: copy block from previous frame with offset provided by motion vector.&lt;br /&gt;
&lt;br /&gt;
Frame decoding is done this way:&lt;br /&gt;
&lt;br /&gt;
  read header&lt;br /&gt;
  unpack all segments&lt;br /&gt;
  for each block in frame {&lt;br /&gt;
    get block type from 'block types' segment&lt;br /&gt;
    decode corresponding block type&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Games Using Duck TrueMotion 2 ==&lt;br /&gt;
These software titles are known to use the Duck TrueMotion 2 video codec to encode full motion video:&lt;br /&gt;
&lt;br /&gt;
[http://www.mobygames.com/game/windows/final-fantasy-vii Final Fantasy VII (Windows)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Incomplete Video Codecs]]&lt;br /&gt;
[[Category:Video Codecs]]&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_1&amp;diff=15577</id>
		<title>Duck TrueMotion 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=Duck_TrueMotion_1&amp;diff=15577"/>
		<updated>2021-08-14T03:04:14Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: added sample server, some links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* FOURCCs: DUCK,PVEZ&lt;br /&gt;
* Company: [[On2|On2 (formerly Duck)]]&lt;br /&gt;
* Patents: US #6,181,822, &amp;quot;Data compression apparatus and method&amp;quot;&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/V-codecs/DUCK/ and http://ghostarchive.org/samples/V-codecs/DUCK/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Duck TrueMotion 1 (TM1) is the first video codec developed by The Duck Corporation. It uses [[Differential Coding|differential pulse code modulation]] and interframe differencing. The primary application for which Duck TrueMotion 1 was developed is gaming software, typically on PC or Sega Saturn titles.&lt;br /&gt;
&lt;br /&gt;
== Underlying Concepts ==&lt;br /&gt;
&lt;br /&gt;
TM1 operates on bidirectional delta quantization. The mathematical premise of delta coding is simple addition. For example, take the following sequence of numbers:&lt;br /&gt;
&lt;br /&gt;
  82 84 81 80 86 88 85&lt;br /&gt;
&lt;br /&gt;
All of the numbers are reasonably large (on a scale of 0..255 in this example). However, they are quite similar to each other. Using delta coding, only the differences between successive numbers are stored:&lt;br /&gt;
&lt;br /&gt;
  82 +2 -3 -1 +6 +2 -3&lt;br /&gt;
&lt;br /&gt;
The first number is still large but since the remaining numbers are clustered close to each other, the deltas are relatively small. Thus, the deltas require less information to encode. &lt;br /&gt;
&lt;br /&gt;
TM1 takes this concept and extends it to 2 dimensions. A particular pixel is assumed to have a pixel directly above it and a pixel directly to the left (if neither of these pixels exist in the frame, e.g., for the top-left corner pixel, 0 is used in place of the non-existant pixels). The current pixel is decoded as the sum of the up and left pixels, plus a delta from the encoded video bitstream.&lt;br /&gt;
&lt;br /&gt;
  encoded video bitstream: ...D5 D6 D7 D8...&lt;br /&gt;
  &lt;br /&gt;
  decoded video frame:&lt;br /&gt;
    A B C D&lt;br /&gt;
    E F G H&lt;br /&gt;
    &lt;br /&gt;
In this example, the encoded video bitstream is sitting at delta D5 when it is time to decode pixel E. A is the pixel above E. There is no pixel to the left of E, so 0 is used as the left value. Thus:&lt;br /&gt;
&lt;br /&gt;
  E = A + 0 + D5&lt;br /&gt;
&lt;br /&gt;
In the case of pixel F, both the up and left pixel values (called the vertical and horizontal predictors, respectively) are available:&lt;br /&gt;
&lt;br /&gt;
  F = B + E + D6&lt;br /&gt;
&lt;br /&gt;
That is the general idea behind decoding TM1 data. The actual decoding algorithm is more involved. The TM1 bytestream actually contains a series of indices that point into tables with the delta values to be&lt;br /&gt;
applied to the vertical and horizontal predictor pixels. These tables only specify small deltas to be added to pixel predictors. When a larger delta is needed because the delta between 2 numbers is too large, then a special bytestream code indicates that the next delta is to be multiplied by 5 before it is applied.&lt;br /&gt;
&lt;br /&gt;
TM1 operates on 4x4 macroblocks of pixels. Each block in a frame can be broken into 4 2x2 blocks, 2 halves (either 4x2 or 2x4), or encoded as a 4x4 block. The block type is encoded in the frame header.&lt;br /&gt;
&lt;br /&gt;
While the TM1 algorithm operates on RGB colorspace data at the input and output level, it borrows some ideas from YUV colorspaces. For more information of RGB and YUV colorspaces, see the References section.&lt;br /&gt;
&lt;br /&gt;
TM1 uses a modified colorspace that embodies luminance (Y) and chrominance (C) information encoded as RGB deltas. Since Y information is more important to the human eye than C information, the Y data must be updated more frequently than the C data (i.e., more Y predictors than C predictors are applied to the image). For a every pixel within a given block in a macroblock, a Y predictor must be applied. However, only one C predictor is applied for each block in the macroblock.&lt;br /&gt;
&lt;br /&gt;
== TrueMotion v1 Frame Format and Header ==&lt;br /&gt;
&lt;br /&gt;
All multi-byte numbers are stored in little endian format.&lt;br /&gt;
&lt;br /&gt;
An encoded intraframe (keyframe) of TM1 data is laid out as:&lt;br /&gt;
&lt;br /&gt;
  header  |  predictor indices&lt;br /&gt;
&lt;br /&gt;
An encoded interframe is laid out as:&lt;br /&gt;
&lt;br /&gt;
  header  |  block change bits  |  predictor indices&lt;br /&gt;
&lt;br /&gt;
The difference between the 2 types of frames is that an interframe has a section of bits that specify which blocks in the frame are unchanged from the previous frame.&lt;br /&gt;
&lt;br /&gt;
A TM1 header is quasi-encrypted with a logical XOR operation. This is probably done to provide some obfuscation of the header and thwart casual inspection of the data format.&lt;br /&gt;
&lt;br /&gt;
An encoded TM1 frame begins with the one byte that indicates the length of the decrypted header, only with a dummy high bit and rotated left by 5. To obtain the actual length from byte B:&lt;br /&gt;
&lt;br /&gt;
  L = ((B &amp;gt;&amp;gt; 5) | (B &amp;lt;&amp;lt; 3)) &amp;amp; 0x7F&lt;br /&gt;
&lt;br /&gt;
Then, decrypt the header by starting with byte 1 in the encoded frame (indexing from 0) and XORing each byte with its successive byte. Assuming the header is of length L bytes as computed above, and that the encoded header starts at buffer[1] (buffer[0] had the rotated length), the decode process is:&lt;br /&gt;
&lt;br /&gt;
  for (i = 1; i &amp;lt; L; i++)&lt;br /&gt;
    decoded_header[i - 1] = buffer[i] ^ buffer[i + 1];&lt;br /&gt;
&lt;br /&gt;
The decoded header data structure is laid out as follows:&lt;br /&gt;
&lt;br /&gt;
  byte 0       compression method&lt;br /&gt;
  byte 1       delta set&lt;br /&gt;
  byte 2       vector set&lt;br /&gt;
  bytes 3-4    frame height&lt;br /&gt;
  bytes 5-6    frame width&lt;br /&gt;
  bytes 7-8    checksum&lt;br /&gt;
  byte 9       version&lt;br /&gt;
  byte 10      header type&lt;br /&gt;
  byte 11      flags&lt;br /&gt;
  byte 12      control&lt;br /&gt;
  bytes 13-14  x offset&lt;br /&gt;
  bytes 15-16  y offset&lt;br /&gt;
  bytes 17-18  width&lt;br /&gt;
  bytes 19-20  height&lt;br /&gt;
  &lt;br /&gt;
The compression method field indicates the type of compression used to encode this frame. There are 2 general types: 16-bit and 24-bit. Further, each has 4 block sizes to select from. The valid compression types are&lt;br /&gt;
&lt;br /&gt;
  0, 9, 11, 13, 15: NOP frames; frame is unchanged from previous frame&lt;br /&gt;
  1:  16-bit 4x4 (V)&lt;br /&gt;
  2:  16-bit 4x4 (H)&lt;br /&gt;
  3:  16-bit 4x2 (V)&lt;br /&gt;
  4:  16-bit 4x2 (H)&lt;br /&gt;
  5:  16-bit 2x4 (V)&lt;br /&gt;
  6:  16-bit 2x4 (H)&lt;br /&gt;
  7:  16-bit 2x2 (V)&lt;br /&gt;
  8:  16-bit 2x2 (H)&lt;br /&gt;
  10: 24-bit 4x4 (H)&lt;br /&gt;
  12: 24-bit 4x2 (H)&lt;br /&gt;
  14: 24-bit 2x4 (H)&lt;br /&gt;
  16: 24-bit 2x2 (H)&lt;br /&gt;
 &amp;gt;16: invalid compression type&lt;br /&gt;
&lt;br /&gt;
The (H) and (V) designations come from the original Duck source code. It is unclear what they mean, except for the common horizontal and vertical designations common in video terminology.&lt;br /&gt;
&lt;br /&gt;
The delta set and vector set fields are used to generate the set of predictor tables that will be used to decode this frame.&lt;br /&gt;
&lt;br /&gt;
The height and width fields should be the same as those specified in the AVI file that contains the data.&lt;br /&gt;
&lt;br /&gt;
The checksum field appears to contain the frame's sequence number modulo 512. The first frame is 0x0000 and the next frame is 0x0001. Frame #511 has a checksum of 0x01FF while frame #512 wraps around to 0x0000.&lt;br /&gt;
&lt;br /&gt;
If the version field is less than 2, then the frame is intracoded (this may indicate that early versions of the coding method was purely intracoded). If the version field is greater than or equal to 2, then if the header type field is 2 or 3, the flags field has bit 4 set (flags &amp;amp; 0x10) to indicate an intraframe; else if the header type field is greater than 3, then the header is invalid; else the frame is intracoded.&lt;br /&gt;
&lt;br /&gt;
The purpose of the control field is unclear.&lt;br /&gt;
&lt;br /&gt;
The x &amp;amp; y offset, width, and height fields apparently pertain to a sprite mode that is not covered in this document.&lt;br /&gt;
&lt;br /&gt;
== 16-bit Data ==&lt;br /&gt;
&lt;br /&gt;
Decoding a 16-bit frame requires 2 tables. The tables can change from one frame to the next and must be rebuilt if the header specified a new table. One table contains the C predictors while the other contains the Y predictors.&lt;br /&gt;
&lt;br /&gt;
Each table consists of 1024 32-bit entries. Each group of 4 entries corresponds to a byte index from 0..255. Each entry contains a double pixel predictor shifted left by one. If the very last bit (bit 0) in the 32-bit entry is 0, then there is another predictor for that index. If the last bit is 1, then this predictor is the last one for this list.&lt;br /&gt;
&lt;br /&gt;
For example...&lt;br /&gt;
&lt;br /&gt;
  A B C D ...&lt;br /&gt;
  E F G H ...&lt;br /&gt;
  I J K L ...&lt;br /&gt;
  M N O P ...&lt;br /&gt;
&lt;br /&gt;
'''(UNFINISHED)'''&lt;br /&gt;
&lt;br /&gt;
== 24-bit Data ==&lt;br /&gt;
&lt;br /&gt;
The process of decoding a 24-bit frame is similar to that of decoding a 16-bit frame. However, the frame is decoded into 2 separate planes, a Y plane and a C plane, and recombined into a final RGB map at render time.&lt;br /&gt;
&lt;br /&gt;
'''(UNFINISHED)'''&lt;br /&gt;
&lt;br /&gt;
== Duck TrueMotion v1 Tables ==&lt;br /&gt;
[https://github.com/FFmpeg/FFmpeg/blob/5541cffa17a8c45004e5ceeda52d4d6b2acee037/libavcodec/truemotion1.c FFmpeg implementation]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Games Using Duck TrueMotion 1 ==&lt;br /&gt;
These software titles are known to use the Duck TrueMotion 1 video codec to encode full motion video:&lt;br /&gt;
&lt;br /&gt;
* [https://www.mobygames.com/game/bubble-bobble-also-featuring-rainbow-islandsBubble Bobble special CD release with Rainbow Island (DOS)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/blazing-dragons Blazing Dragons (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/sega-saturn/congo-the-movie-the-lost-city-of-zinj Congo: The Movie - The Lost City of Zinj (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/dos/d D (DOS version only)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/horde The Horde (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/nhl-all-star-hockey NHL All-Star Hockey (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/phantasmagoria-a-puzzle-of-flesh Phantasmagoria: A Puzzle of Flesh (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/santa-fe-mysteries-the-elk-moon-murder Santa Fe Mysteries: The Elk Moon Murder (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/solar-eclipse Solar Eclipse (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/sonic-3d-blast Sonic 3D Blast (Sega Saturn)] - [https://www.youtube.com/watch?v=Fpqs4Fta3Ho Video]&lt;br /&gt;
* [https://www.mobygames.com/game/spycraft-the-great-game Spycraft: The Great Game (DOS &amp;amp; Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/theme-park Theme Park (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/virtua-cop-2 Virtua Cop 2 (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/saturn/virtua-fighter-2 Virtua Fighter 2 (Sega Saturn)]&lt;br /&gt;
* [https://www.mobygames.com/game/windows/zork-grand-inquisitor Zork: Grand Inquisitor (Windows)]&lt;br /&gt;
* [https://www.mobygames.com/game/windows/zork-nemesis-the-forbidden-lands Zork Nemesis: The Forbidden Lands (Windows)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Video Codecs]]&lt;br /&gt;
[[Category:Incomplete Video Codecs]]&lt;br /&gt;
[[Category:Game Formats]]&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=YUV4MPEG2&amp;diff=15559</id>
		<title>YUV4MPEG2</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=YUV4MPEG2&amp;diff=15559"/>
		<updated>2021-07-04T00:11:49Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Extension: .y4m&lt;br /&gt;
* Samples: http://samples.mplayerhq.hu/yuv4mpeg2/&lt;br /&gt;
&lt;br /&gt;
YUV4MPEG2 is a simple file format designed to hold uncompressed frames of [[YCbCr]] video formatted as [[YCbCr 4:2:0]], [[YCbCr 4:2:2]] or [[YCbCr 4:4:4]] data for the purpose of encoding, likely to [[MPEG]]-2. The part &amp;quot;YUV&amp;quot; in its name just derives from the fact that the color space YCbCr (used for color encoding in digital media) is often falsely mixed up with the color space YUV (used in analog PAL based applications, including analog TV and video tapes).&lt;br /&gt;
&lt;br /&gt;
== Data Format ==&lt;br /&gt;
A Y4M file begins with a plaintext, quasi-freeform header. The first 10 bytes are a file signature of 'YUV4MPEG2 ' (last character is a space, ASCII 0x20).  Following the signature is any number of parameters preceeded by a space (ASCII 0x20). The parameters that should definitely be present are width, height, and frame rate:&lt;br /&gt;
* frame width: 'W' followed by a plaintext integer; example: 'W720'&lt;br /&gt;
* frame height: 'H' followed by a plaintext integer; example: 'H480'&lt;br /&gt;
* frame rate: 'F' followed by the number of frames per second, expressed as a fraction in the form numerator:denominator.  Examples: &lt;br /&gt;
** 'F30:1' = 30 FPS&lt;br /&gt;
** 'F25:1' = 25 FPS (PAL/SECAM standard)&lt;br /&gt;
** 'F24:1' = 24 FPS (Film)&lt;br /&gt;
** 'F30000:1001' = 29.97 FPS (NTSC standard)&lt;br /&gt;
** 'F24000:1001' = 23.976 FPS (Film transferred to NTSC)&lt;br /&gt;
* interlacing: 'I' followed by a single letter to indicate interlacing mode:&lt;br /&gt;
** 'Ip' = Progressive&lt;br /&gt;
** 'It' = Top field first&lt;br /&gt;
** 'Ib' = Bottom field first&lt;br /&gt;
** 'Im' = Mixed modes (detailed in FRAME headers)&lt;br /&gt;
* Parameter 'A': Pixel aspect ratio.  Note that this is not the ratio of the picture as a whole, just the pixels.  Examples: &lt;br /&gt;
** 'A0:0' = unknown&lt;br /&gt;
** 'A1:1' = square pixels&lt;br /&gt;
** 'A4:3' = NTSC-SVCD (480x480 stretched to 4:3 screen)&lt;br /&gt;
** 'A4:5' = NTSC-DVD narrow-screen (720x480 compressed to a 4:3 display)&lt;br /&gt;
** 'A32:27' = NTSC-DVD wide-screen (720x480 stretched to a 16:9 display)&lt;br /&gt;
* Parameter 'C': Colour space&lt;br /&gt;
** 'C420jpeg' = 4:2:0 with biaxially-displaced chroma planes&lt;br /&gt;
** 'C420paldv' = 4:2:0 with vertically-displaced chroma planes&lt;br /&gt;
** 'C420' = 4:2:0 with coincident chroma planes&lt;br /&gt;
** 'C422' = 4:2:2&lt;br /&gt;
** 'C444' = 4:4:4&lt;br /&gt;
* Parameter 'X': Comment.  Ignored, but passed, by a YUV4MPEG2 processor.&lt;br /&gt;
&lt;br /&gt;
If you have trouble figuring out the difference between C420jpeg and C420paldv, this might help: https://chromium.googlesource.com/webm/libvpx/+/refs/heads/main/y4minput.c&lt;br /&gt;
&lt;br /&gt;
Following the header is any number of frames coded in YCbCr format in Y-Cb-Cr plane order. Each frame begins with the 5 bytes 'FRAME' followed by zero or more parameters each preceded by 0x20, ending with 0x0A.  This is then followed by the raw bytes from each plane.&lt;br /&gt;
&lt;br /&gt;
The length of each frame (excluding its header) can be computed as:&lt;br /&gt;
&lt;br /&gt;
* frame length = width * height * 3 / 2 (4:2:0)&lt;br /&gt;
* frame length = width * height * 2 (4:2:2)&lt;br /&gt;
* frame length = width * height * 3 (4:4:4)&lt;br /&gt;
&lt;br /&gt;
[[Category:Container Formats]]&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
	<entry>
		<id>https://wiki.multimedia.cx/index.php?title=FFmpeg&amp;diff=15558</id>
		<title>FFmpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.multimedia.cx/index.php?title=FFmpeg&amp;diff=15558"/>
		<updated>2021-07-03T20:33:34Z</updated>

		<summary type="html">&lt;p&gt;Mahanstreamer: added list of ffmpeg users&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;FFmpeg is a collection of software libraries that can record, convert and stream digital audio and video in numerous formats.&lt;br /&gt;
&lt;br /&gt;
FFmpeg includes the [[libavcodec]] audio/video codec library, a decoder/encoder codec-suit that forms the basis of most free and open source software multimedia programs. The FFmpeg project aims to support all popular and less known codec formats and it is closer to that goal than any other (commercial or open source) program or library&lt;br /&gt;
&lt;br /&gt;
FFmpeg also contains [[libavformat]], a library for multimedia container formats and [[libpostproc]] for postprocessing, (and in the future also [[libavfilter]] for video and audio filtering). [[ffplay]] is a simple media player that uses libavcodec and libavformat.&lt;br /&gt;
&lt;br /&gt;
In 2011 FFmpeg was forked and the [[Libav]] project came into being.&lt;br /&gt;
&lt;br /&gt;
==About the FFmpeg project==&lt;br /&gt;
The name of the project comes from the MPEG video standards group, together with &amp;quot;FF&amp;quot; for &amp;quot;fast forward&amp;quot;.[1]&lt;br /&gt;
&lt;br /&gt;
The project was started by Fabrice Bellard (using the pseudonym “Gerard Lantau”), and is now maintained by Michael Niedermayer. Many FFmpeg developers are also part of the MPlayer project, and FFmpeg is hosted at the MPlayer project server.&lt;br /&gt;
&lt;br /&gt;
FFmpeg is developed under Linux, but it can be compiled under most operating systems, including Microsoft Windows. There are periodic releases. FFmpeg developers recommend using the latest Git snapshot as development maintains a constantly stable trunk. Released under the GNU Lesser General Public License or GNU General Public License (depending on which sub-libraries one would include), FFmpeg is free software.&lt;br /&gt;
&lt;br /&gt;
== Image of applications that uses FFmpeg and libavcodec and libavformat ==&lt;br /&gt;
[[Image:FFmpeg_diag.png|thumb|right|300px|Diagram showing different applications that uses FFmpeg, (the applications listed are [[Video Disk Recorder|VDR]], [[MPlayer]], [[Xine]] and [[VideoLAN]])]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FFmpeg Components ==&lt;br /&gt;
The FFmpeg project is made of several components:&lt;br /&gt;
&lt;br /&gt;
* ''ffmpeg'' is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card.&lt;br /&gt;
* ''[[ffserver]]'' is an [[Hypertext Transfer Protocol|HTTP]] ([[Real Time Streaming Protocol|RTSP]] is being developed) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported.&lt;br /&gt;
* ''[[ffplay]]'' is a simple media player based on [[Simple DirectMedia Layer|SDL]] and on the FFmpeg libraries.&lt;br /&gt;
* ''[[libavcodec]]'' is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developed from scratch to ensure best performance and high code reusability.&lt;br /&gt;
* ''[[libavformat]]'' is a library containing demuxers and muxers for audio/video container formats. &lt;br /&gt;
* ''[[libavutil]]'' is a helper library containing routines common to different parts of FFmpeg.&lt;br /&gt;
* ''[[libpostproc]]'' is a library containing [http://en.wikipedia.org/wiki/Video_postprocessing video postprocessing] routines.&lt;br /&gt;
* ''[[libswscale]]'' is a library containing video [http://en.wikipedia.org/wiki/Image_scaling image scaling] routines.&lt;br /&gt;
* ([[libavfilter]] is in development and is an API and library for video and audio filtering)&lt;br /&gt;
&lt;br /&gt;
==Codecs and formats supported ==&lt;br /&gt;
The FFmpeg developers have reverse engineering|reverse-engineered and/or reimplemented or invented, among others:&lt;br /&gt;
===Codecs===&lt;br /&gt;
See [[libavcodec]] for more details.&lt;br /&gt;
* [[Adaptive Transform Acoustic Coding|ATRAC3]]&amp;lt;ref name=&amp;quot;svn8747&amp;quot;&amp;gt;{{cite web | author = banan | url = http://svn.mplayerhq.hu/ffmpeg/trunk/Changelog?revision=8747&amp;amp;view=marku | title = Changelog | publisher = FFmpeg website | work = FFmpeg trunk SVN | date = [[17 April]] [[2007]] | accessdate = 2007-04-26}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[FFV1]] lossless and intraframe-only codec invented by ffmpeg developers&lt;br /&gt;
* [[H.261]],&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt; [[H.263]]&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt; and [[h.264/MPEG-4 AVC]]&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt;&lt;br /&gt;
* [[Indeo]] 2 and 3&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt;&lt;br /&gt;
* [[QDesign]] Music Codec 2, used by many QuickTime movies prior to QuickTime 7.&lt;br /&gt;
* [[Snow]] lossless or lossy working codec based on wavelet transform, invented by ffmpeg developers&lt;br /&gt;
* [[Sorenson 3 Codec]] used by many [[QuickTime]] movies&lt;br /&gt;
* [[Theora]] (together with [[Vorbis]] makes a base for the .[[ogg]] format)&lt;br /&gt;
* [[Truespeech]]&lt;br /&gt;
* TXD&amp;lt;ref name=&amp;quot;ffdev20070507&amp;quot;&amp;gt;{{cite web | author = banan | url = http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-May/028761.html | title = FFmpeg development mailing list | publisher = FFmpeg website | work = FFmpeg development | date = [[7 May]] [[2007]] | accessdate = 2007-06-01}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[VP5]]&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt; and [[VP6]]&amp;lt;ref name=&amp;quot;svn8747&amp;quot;/&amp;gt;&lt;br /&gt;
* [[Vorbis]]&lt;br /&gt;
* [[Windows Media Audio]]&lt;br /&gt;
* Some [[Windows Media Video]] codecs, including WMV1, WMV2 and WMV3&lt;br /&gt;
&lt;br /&gt;
The default [[MPEG-4]] codec used by FFmpeg for encoding has the [[FourCC]] of '''FMP4'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Formats===&lt;br /&gt;
* [[Advanced Systems Format|ASF]], and thereby the original version of [[DivX]]&lt;br /&gt;
* [[Audio Video Interleave|AVI]]&lt;br /&gt;
* [[FLV]]&lt;br /&gt;
* [[Matroska]]&lt;br /&gt;
* [[MPEG transport stream]]&lt;br /&gt;
* TXD&amp;lt;ref name=&amp;quot;ffdev20070507&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Legal status ==&lt;br /&gt;
FFmpeg's legal status varies by country. Some included codecs, (such as Sorenson 3), are claimed by patent owners. Such claims may be enforceable in countries like the United States which recognize [[software patent]]s, but are considered unenforcable or void in countries that do not recognize software patents. Furthermore, many of these codecs are only released under terms that forbid reverse engineering, even for purposes of interoperability. However, these terms of use are forbidden in certain countries. For example, some European Union nations do not recognize software patents and/or have laws expressly allowing reverse engineering for purposes of interoperability.&amp;lt;ref&amp;gt;{{cite encyclopedia |publisher=[[Directive on the legal protection of computer programs|Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs]]}}&amp;lt;/ref&amp;gt; In any case, many Linux distributions do not include FFmpeg to avoid legal complications.&amp;lt;ref&amp;gt;{{ cite web | title = Information about this on FFmpeg's website | url = http://ffmpeg.mplayerhq.hu/legal.html }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
&lt;br /&gt;
''Clang Static Analyzer&lt;br /&gt;
*http://clang.llvm.org/StaticAnalysis.html&lt;br /&gt;
#http://tranquillity.ath.cx/clang/scan-build-2009-04-17-1/&lt;br /&gt;
#http://tranquillity.ath.cx/clang/scan-build-2009-04-18-1/&lt;br /&gt;
&lt;br /&gt;
''Coverity&lt;br /&gt;
*http://scan.coverity.com/&lt;br /&gt;
#http://scan.coverity.com/rungAll.html&lt;br /&gt;
&lt;br /&gt;
''zzuf&lt;br /&gt;
*http://caca.zoy.org/wiki/zzuf&lt;br /&gt;
#http://caca.zoy.org/wiki/zzuf/bugs&lt;br /&gt;
&lt;br /&gt;
''PVS-Studio Static C/C++ Analysis&lt;br /&gt;
*http://www.viva64.com/en/examples/&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[FFmpeg Summer Of Code]]&lt;br /&gt;
*[[FFmpeg/Libav Summer Of Code In Space]]&lt;br /&gt;
*[[FFmpeg Wishlist]]&lt;br /&gt;
*[[:Category:FFmpeg Tutorials|FFmpeg Tutorials]]&lt;br /&gt;
&lt;br /&gt;
==Websites using FFMPEG==&lt;br /&gt;
This is a VERIFIED list of websites using FFmpeg. Testing was done by uploading a obscure media file that only FFMPEG and one other obscure framework can decode. Since there is no evidence of usage of the other framework anywhere, it is safe to assume they are using FFMPEG&lt;br /&gt;
&lt;br /&gt;
*[https://youtube.com/ Youtube]&lt;br /&gt;
*[https://bitchute.com/ Bitchute]&lt;br /&gt;
*[https://vimeo.com/ Vimeo]&lt;br /&gt;
*[https://TikTok.com/ Tiktok]&lt;br /&gt;
*[https://Streamable.com/ Streamable]&lt;br /&gt;
&lt;br /&gt;
==Other projects and applications that use FFmpeg==&lt;br /&gt;
*[http://sourceforge.net/projects/ac3encode/ ac3encode (DirectShow AC3 Encoder)]&lt;br /&gt;
*[http://atglas.sourceforge.net/ AtGLas]&lt;br /&gt;
*[http://avifile.sourceforge.net/ avifile]&lt;br /&gt;
*[http://gatos.sourceforge.net/avview.php Avview]&lt;br /&gt;
*[http://www.bbrox.org/iPAQ/BBPlay/ bbplay]&lt;br /&gt;
*[http://www.bebits.com/app/2575 BeOS FFmpeg decoders]&lt;br /&gt;
*[http://www.bebits.com/app/2867  BeOS HybridDivx]&lt;br /&gt;
*[http://dspguru.doom9.net/  BeSweet]&lt;br /&gt;
*[http://chromaplayer.com/  Chroma Player]&lt;br /&gt;
*[http://sourceforge.net/projects/chronictv/  chronictv]&lt;br /&gt;
*[http://www.coreplayer.com/  CorePlayer]&lt;br /&gt;
*[http://www.objectifmac.com/english/downloads.php  D-Volution]&lt;br /&gt;
*[http://mh1.de/divxray/  DivXray]&lt;br /&gt;
*[http://sourceforge.net/projects/divxtodvd/  DivXtoDVD]&lt;br /&gt;
*[http://expandinglimits.com/drdivx/  Dr. Divx]&lt;br /&gt;
*[http://dvbcut.sourceforge.net/  dvbcut]&lt;br /&gt;
*[http://www.dvdflick.net/  DVDFlick]&lt;br /&gt;
*[http://sourceforge.net/projects/easyvob2divx/  Easy VOB 2 DivX]&lt;br /&gt;
*[http://ffdshow.sourceforge.net/  ffdshow]&lt;br /&gt;
*[http://ffdshow-tryout.sourceforge.net/  ffdshow tryouts]&lt;br /&gt;
*[http://ffmpeg-php.sourceforge.net/  ffmpeg-php]&lt;br /&gt;
*[http://www.v2v.cc/~j/ffmpeg2theora/  ffmpeg2theora]&lt;br /&gt;
*[http://sourceforge.net/projects/qt-ffmpeg/  FFMPEG for QT]&lt;br /&gt;
*[http://homepage.mac.com/major4/  ffmpegX for Mac OS X]&lt;br /&gt;
*[http://homepage.mac.com/gellenburg/ffmpegX_Companion/  ffmpegX Companion]&lt;br /&gt;
*[http://colabti.de/convertx/  FFRecord]&lt;br /&gt;
*[http://fftv.sourceforge.net/  fftv]&lt;br /&gt;
*[http://aldorandenet.free.fr/codecs/  FFusion, Alternative Codecs for Mac OS X]&lt;br /&gt;
*[http://fmj.sourceforge.net/  FMJ]&lt;br /&gt;
*[http://fobs.sourceforge.net/  Fobs]&lt;br /&gt;
*[http://freej.org/  FreeJ]&lt;br /&gt;
*[http://frogger.rules.pl/  Frogger]&lt;br /&gt;
*[http://gallery.sourceforge.net/  Gallery]&lt;br /&gt;
*[http://gmerlin.sourceforge.net/  gmerlin]&lt;br /&gt;
*[http://www.gomplayer.com/ GOM Player]&lt;br /&gt;
*[http://gpac.sourceforge.net/  GPAC]&lt;br /&gt;
*[http://www.gstreamer.net/  GStreamer]&lt;br /&gt;
*[http://handbrake.m0k.org/  HandBrake]&lt;br /&gt;
*[http://www.lonelycoder.com/hts/  HTS (Home Theater System)]&lt;br /&gt;
*[http://apple-x.net/thetakent/products.html  Hyperion]&lt;br /&gt;
*[http://imtoo.com/  ImTOO DVD Ripper]&lt;br /&gt;
*[http://jffmpeg.sourceforge.net/  Jffmpeg]&lt;br /&gt;
*[http://www.kdenlive.org/  Kdenlive]&lt;br /&gt;
*[http://kfilm.sourceforge.net/  KFilm]&lt;br /&gt;
*[http://www.iki.fi/damu/software/kmediafactory/index.html  KMediaFactory]&lt;br /&gt;
*[http://www.konvertor.net/indexe.html Konvertor]&lt;br /&gt;
*[http://ktoon.toonka.com/  KToon]&lt;br /&gt;
*[http://libquicktime.sourceforge.net/  libquicktime]&lt;br /&gt;
*[http://www.xs4all.nl/~salsaman/lives/index.html  LIVES]&lt;br /&gt;
*[http://lulop2.sourceforge.net/  LULOP2]&lt;br /&gt;
*[http://lynkeos.sourceforge.net/  Lynkeos]&lt;br /&gt;
*[http://mconverter.sourceforge.net/  mConverter]&lt;br /&gt;
*[http://mlt.sourceforge.net/  MLT Framework]&lt;br /&gt;
*[http://www.nurs.or.jp/~calcium/3gpp/sources/  MobileHackerz]&lt;br /&gt;
*[http://www.miksoft.net/mobileMediaConverter.htm  Mobile Media Converter]&lt;br /&gt;
*[http://sourceforge.net/projects/modprismiq/  modprismiq]&lt;br /&gt;
*[http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome  Motion]&lt;br /&gt;
*[http://moviethumbnail.sourceforge.net/  movie thumbnailer]&lt;br /&gt;
*[http://www.mp4converter.net/dvd-to-appletv-converter-mac.html mp4converter]&lt;br /&gt;
*[http://mpeg4ip.sourceforge.net/  mpeg4ip]&lt;br /&gt;
*[http://mplayerhq.hu/  MPlayer]&lt;br /&gt;
*[http://mplayerplug-in.sourceforge.net/ mplayer plug-in]&lt;br /&gt;
*[http://www.mythtv.org/  MythTV]&lt;br /&gt;
*[http://www.networkmultimedia.org/  Network-Integrated Multimedia Middleware (NMM)]&lt;br /&gt;
*[http://nvrec.sourceforge.net/  nvrec]&lt;br /&gt;
*[http://www.2600.com/offthehook/  Off The Hook]&lt;br /&gt;
*[http://openh323.sourceforge.net/  OpenH323]&lt;br /&gt;
*[http://www.perian.org/  Perian]&lt;br /&gt;
*[http://www.gocyberlink.com/english/companybg/pcmlinuxgpl.jsp  PowerCinema for Linux]&lt;br /&gt;
*[http://1homebrew.com/psp/pmppspmediaplayer.shtml  PSP Media Player]&lt;br /&gt;
*[http://www.pspvideo9.com/  PSP Video 9]&lt;br /&gt;
*[http://pymedia.org/  PyMedia]&lt;br /&gt;
*[http://qemacs.org/  QEmacs]&lt;br /&gt;
*[http://qstream.org/  QStream]&lt;br /&gt;
*[http://linuxvideo.info/  QuickView Pro]&lt;br /&gt;
*[http://rivavx.com/  Riva VX]&lt;br /&gt;
*[http://applian.com/replay-converter/ Replay Converter]&lt;br /&gt;
*[http://rmovie.rubyforge.org  rmovie]&lt;br /&gt;
*[http://shotdetect.nonutc.fr/  shotdetect]&lt;br /&gt;
*[http://sourceforge.net/projects/screenkast/  SkreenKast]&lt;br /&gt;
*[http://streamstudio.sourceforge.net/  StreamStudio]&lt;br /&gt;
*[http://www.erightsoft.net/SUPER.html SUPER]&lt;br /&gt;
*[http://megafonts.free.fr/flv/  TaKa FLV Encoder]&lt;br /&gt;
*[http://tcvp.sourceforge.net/ TCVP]&lt;br /&gt;
*[http://www.thekompany.com/embedded/tkcvideo/ tkcVideo]&lt;br /&gt;
*[http://www.transcoding.org/ Transcode]&lt;br /&gt;
*[http://www.tversity.com/ TVersity]&lt;br /&gt;
*[http://vchannel.sourceforge.net/player.html V-Player]&lt;br /&gt;
*[http://www.vdownloader.es/ VDownloader]&lt;br /&gt;
*[http://softdevice.berlios.de/ vdr-softdevice]&lt;br /&gt;
*[http://veejay.sourceforge.net/ VeeJay]&lt;br /&gt;
*[http://www.viceteam.org/ VICE]&lt;br /&gt;
*[http://www.videolan.org/ VideoLAN]&lt;br /&gt;
*[http://virchor.sourceforge.net/ Virtual Choreographer]&lt;br /&gt;
*[http://vitooki.sourceforge.net/ ViTooKi]&lt;br /&gt;
*[http://vive.sourceforge.net/ Vive]&lt;br /&gt;
*[http://biggmatt.com/winff/ WinFF]&lt;br /&gt;
*[http://qtwmacodec.sourceforge.net/ WMA codec for Mac OS X]&lt;br /&gt;
*[http://xawdecode.sourceforge.net/ Xawdecode]&lt;br /&gt;
*[http://www.xbmc.org/ XBMC (formally known as XBox Media Center)]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/XBMP XBox Media Player]&lt;br /&gt;
*[http://www.xinehq.de/ xine]&lt;br /&gt;
*[http://sourceforge.net/projects/xmffmpeg/ XMFFMPEG]&lt;br /&gt;
*[http://xvidcap.sourceforge.net/ xvidcap]&lt;br /&gt;
*[http://sourceforge.net/projects/xbyamp YAMP]&lt;br /&gt;
*[http://yellowtab.com/ Zeta]&lt;br /&gt;
*[http://www.zoneminder.com/ ZoneMinder]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [http://ffmpeg.org/ FFmpeg official website]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/FFmpeg Wikipedia FFmpeg article]&lt;br /&gt;
&lt;br /&gt;
[[Category:FFmpeg]]&lt;br /&gt;
[[Category:Multimedia Projects]]&lt;br /&gt;
[[Category:Multimedia Programs]]&lt;/div&gt;</summary>
		<author><name>Mahanstreamer</name></author>
	</entry>
</feed>