Smacker Video
   HOME

TheInfoList



OR:

Smacker video is a
video file format A video file format is a type of file format for storing digital video data on a computer system. Video is almost always stored using lossy compression to reduce the file size. A video file normally consists of a container (e.g. in the Matroska ...
(with the ''.SMK''
file extension File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to remove fine amounts of material from a workpiece. ** Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to gen ...
) developed by Epic Games Tools, and primarily used for
full-motion video Full-motion video (FMV) is a video game narration technique that relies upon pre-recorded video files (rather than sprites, vectors, or 3D models) to display action in the game. While many games feature FMVs as a way to present information duri ...
in
video games A video game or computer game is an electronic game that involves interaction with a user interface or input device (such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device) to generate visual fe ...
. Smacker uses an adaptive 8-bit
RGB The RGB color model is an additive color model in which the red, green, and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three ...
palette. RAD's format for video at higher color depths is
Bink Video Bink Video is a proprietary file format (extensions .bik and .bk2) for video developed by Epic Games Tools (formerly RAD Game Tools), a part of Epic Games. Overview The format includes its own proprietary video and audio compression algorithms ...
. The Smacker format specifies a
container format A container format (informally, sometimes called a wrapper) or metafile is a file format that allows multiple data streams to be embedded into a single file, usually along with metadata for identifying and further detailing those streams. Nota ...
, a video compression format, and an audio compression format. Since its release in 1994, Smacker has been used in over 2300 games. Blizzard used this format for the cinematic videos seen in its games '' Warcraft II'', ''
StarCraft ''StarCraft'' is a military science fiction media franchise created by Chris Metzen and James Phinney and owned by Blizzard Entertainment. The series, set in the beginning of the 26th century, centers on a galactic struggle for dominance amon ...
'' and '' Diablo I''. The format has been reverse engineered and implemented in
libavcodec libavcodec is a free and open-source library of codecs for encoding and decoding video and audio data. libavcodec is an integral part of many open-source multimedia applications and frameworks. The popular MPV, xine and VLC media players use ...
. A non-commercial
SourceForge SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
project ''libsmacker'' released an open source decoder in 2013.
SourceForge SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
projec
libsmacker
/ref>


Technical details


File format (container)

Smacker defines its own
container format A container format (informally, sometimes called a wrapper) or metafile is a file format that allows multiple data streams to be embedded into a single file, usually along with metadata for identifying and further detailing those streams. Nota ...
. A Smacker file can contain a Smacker video track and up to seven audio tracks. Each audio track can have either one channel (mono) or two channels (stereo) with a bit depth of either 8-bit or 16-bit. The audio can either be uncompressed
PCM Pulse-code modulation (PCM) is a method used to Digital signal (signal processing), digitally represent analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio application ...
, compressed in the Smacker Audio format, or, in newer versions of Smacker, compressed in the Bink Audio format.


Video

Smacker video supports 256 colors, but no transparency support. While being a palette-based format, which is inherently limited to having not more than 256 colors in each frame, Smacker videos may still contain more colors in total due to "palette rotation", whereby the palette is updated on a per-frame basis. This usually results in SMK files that look better if the source video has more than 256 colors. The compression rate depends on the content. The encoding of a video consisting of still or barely moving frames is after the first frame practically free. Frames with random colors might more than double the raw size. In Smacker video, a frame is split into 4×4 blocks in raster-scan order. Each block can be coded in one of six coding modes: skip, fill, mono, and three full modes. Each mode can be signaled for multiple blocks in a
run-length encoding Run-length encoding (RLE) is a form of lossless data compression in which ''runs'' of data (consecutive occurrences of the same data value) are stored as a single occurrence of that data value and a count of its consecutive occurrences, rather th ...
scheme. In skip mode, the current block is copied from the previous frame in a conditional replenishment fashion. In fill mode, the current block is filled with a single color. In mono mode, the palette is locally reduced from 256 colors to two colors. Both colors are written to the bitstream and one bit per pixel is used to indicate which of the two colors a pixel should be. The mono mode can be interpreted as
vector quantization Vector quantization (VQ) is a classical quantization technique from signal processing that allows the modeling of probability density functions by the distribution of prototype vectors. Developed in the early 1980s by Robert M. Gray, it was ori ...
, where a three-dimensional vector with the components red, green, and blue is quantized using an adaptive codebook with two entries. There are three full modes, one was specified in version 2 of the Smacker format, while the other two were added in version 4. In the original full mode, 16 colors are transmitted, one for each pixel, equivalent to raw uncompressed PCM. The two full modes added in version 4 use 4 and 8 colors in a block, respectively. In the 4-color mode, the 4×4 block is split into four 2×2 blocks, each of which is filled with a solid color. In the 8-color mode, the 4×4 block is split into eight 1×2 blocks, each of which is filled with a solid color. Further compression is achieved by
entropy coding In information theory, an entropy coding (or entropy encoding) is any lossless data compression method that attempts to approach the lower bound declared by Shannon's source coding theorem, which states that any lossless data compression method ...
using
Huffman coding In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code is Huffman coding, an algorithm developed by ...
of the various bitstream elements that result from the process above. There are four separate Huffman tables, each with 16-bit entries: one for mode decision, run-length, and fill color in fill color mode, one for the color indices in mono mode, one for the bitmap in mono mode, and one for all data in the full mode. Each table is adaptive and transmitted once per file in the header. The Huffman tables in the header are themselves compressed: the 16 bit values in the leaves of the code tree are split into a high byte and a low byte. Each byte is compressed using a Huffman table that is also contained in the header.


Audio

Smacker audio is one of the audio formats that can be used in the Smacker container. For compression, Differential pulse code modulation (DPCM) is used. The difference between two successive samples is compressed using
Huffman coding In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code is Huffman coding, an algorithm developed by ...
. The Huffman tables are adapted once per audio frame.


See also

*
Indexed color In computing, indexed color is a technique to manage digital images' colors in a limited fashion, in order to save computer computer data storage, memory and Hard disk drive, file storage, while speeding up display refresh and file transfers. It ...
*
Color quantization In computer graphics, color quantization or color image quantization is quantization applied to color spaces; it is a process that reduces the number of distinct colors used in an image, usually with the intention that the new image should be as ...
*
Bink Video Bink Video is a proprietary file format (extensions .bik and .bk2) for video developed by Epic Games Tools (formerly RAD Game Tools), a part of Epic Games. Overview The format includes its own proprietary video and audio compression algorithms ...
, RAD's format for video at higher color depths *
Apple Video Apple Video is a lossy video compression and decompression algorithm (codec) developed by Apple Inc. and first released as part of QuickTime 1.0 in 1991. The codec is also known as QuickTime Video, by its FourCC RPZA and the name Road Pizza. (Th ...
, a codec based on a similar design * Microsoft Video 1, a codec based on a similar design * QuickTime Graphics, a codec based on a similar design *
S3 Texture Compression S3 Texture Compression (S3TC) (sometimes also called DXTn, DXTC, or BCn) is a group of related lossy texture compression algorithms originally developed by Iourcha et al. of S3 Graphics, Ltd. for use in their Savage 3D computer graphics accele ...
, a texture compression format based on a similar design


References


External links


Official Smacker video Page
{{Compression formats Video codecs Digital container formats