Codec: Difference between revisions

Content deleted Content added
m unpiped links using script
 
(634 intermediate revisions by more than 100 users not shown)
Line 1:
{{short description|Device or software for encoding or decoding a digital data stream}}
:''[[Codec (Radio)|Codec]] is also the name of a [[Two-way radio|radio]] in [[Metal Gear Solid]].
{{About|encoding and decoding a digital data stream}}
 
A '''codec''' is a computer [[computer hardware|hardware]] or [[software]] component that encodes or [[Decoding methods|decodes]] a [[data stream]] or [[signal]].<ref>{{cite web|url=https://support.microsoft.com/en-us/help/15070/windows-media-player-codecs-frequently-asked-questions|title=Using codecs|publisher=[[Microsoft]]|url-status=live|archive-url=https://web.archive.org/web/20100906114538/https://www.microsoft.com/windows/windowsmedia/player/faq/codec.mspx|archive-date=September 6, 2010|access-date=2009-12-21}}</ref><ref>{{cite web|url=http://desktopvideo.about.com/od/glossary/g/codec.htm|title=About.com - Codec|last=Siegchrist|first=Gretchen|publisher=About.com|url-status=dead|archive-url=https://web.archive.org/web/20150405161202/http://desktopvideo.about.com/od/glossary/g/codec.htm|archive-date=April 5, 2015|access-date=2009-12-21}}</ref><ref>{{cite web|url=https://help.ubuntu.com/8.04/musicvideophotos/C/codecs.html |title=Ubuntu Documentation - What is a codec? |publisher=Ubuntu Documentation Team |access-date=2009-12-21 |url-status=dead |archive-url=https://web.archive.org/web/20120219101738/https://help.ubuntu.com/8.04/musicvideophotos/C/codecs.html |archive-date=February 19, 2012 }}</ref> ''Codec'' is a [[portmanteau]] of '''coder/decoder'''.<ref>{{cite dictionary |url=https://www.merriam-webster.com/dictionary/codec |title=Codec – Definition of Codec by Merriam-Webster |dictionary=Merriam-Webster |access-date=2019-01-15}}</ref>
A '''Codec''' is a device or [[computer program|program]] capable of performing [[encoding]] and [[decoding]] on a digital [[data]] stream or [[signal (information theory)|signal]]. The word "codec" is a [[portmanteau]] of any of the following: ''''Co'''mpressor-'''Dec'''ompressor', ''''Co'''der-'''Dec'''oder', or ''''Co'''mpression/'''Dec'''ompression algorithm'.
 
In electronic communications, an '''endec''' is a device that acts as both an encoder and a decoder on a signal or data stream,<ref>{{Cite web |last=Rouse |first=Margaret |date=24 October 2016 |title=Encoder/Decoder |url=https://www.techopedia.com/definition/11463/encoderdecoder-endec |access-date=27 December 2023 |website=Techopedia}}</ref> and hence is a type of codec. ''Endec'' is a [[portmanteau]] of '''encoder/decoder'''.
Codecs encode a stream or signal for transmission, storage or [[encryption]] and decode it for viewing or editing. Codecs are often used in [[Video teleconference|videoconferencing]] and [[streaming media]] solutions. A video camera's [[Analog-to-digital converter|ADC]] converts its analog signals into digital signals, which are then passed through a [[video codec|video compressor]] for digital transmission or storage. A receiving device then runs the signal through a video decompressor, then a [[Digital-to-analog converter|DAC]] for analog display. An [[audio codec|audio compressor]] converts analog audio signals into digital signals for transmission or storage. A receiving device then converts the digital signals back to analog using an audio decompressor, for playback.
 
A coder or encoder encodes a data stream or a signal for transmission or storage, possibly in [[encrypted]] form, and the decoder function reverses the encoding for playback or editing. Codecs are used in [[videoconferencing]], [[streaming media]], and [[video editing]] applications.
The raw encoded form of audio and video data is often called '''essence''', to distinguish it from the [[metadata]]information that together make up the information content of the stream and any "wrapper" data that is then added to aid access to or improve the [[robust]]ness of the stream.
 
==History==
Most codecs are [[lossy]], in order to get a reasonably small file size. There are [[lossless]] codecs as well, but for most purposes the almost imperceptible increase in quality is not worth the considerable increase in data size. The main exception is if the data will undergo more processing, especially editing, in the future, in which case the repeated lossy encoding could degrade the quality of the eventual file too much. Using more than one codec or encoding scheme throughout processing can also degrade quality but there are many situations where this cannot be avoided. There are many codecs which are designed to emphasize certain aspects of the media to be encoded. For example, a digital video (using a DV codec) of a sports events like baseball or soccer need to encode motion well but not necessarily exact colors. Where a video of an art exhibit needs to perform well encoding color and surface texture. There are hundreds or even thousands of codecs ranging from free ones to ones costing hundreds of dollars or more.
{{Further|Image compression#History|Video coding format#History|Audio coding format#History}}
 
Originally, in the mid-20th century, a codec was a hardware device that coded analog signals into digital form using [[pulse-code modulation]] (PCM). Later, the term was also applied to software for converting between digital signal formats, including [[companding]] functions.
Many [[multimedia]] data streams need to contain both [[Sound|audio]] and [[video]] data, and often some form of metadata that permits synchronization of the audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data stream to be useful in stored or transmitted form, they must be [[Encapsulation|encapsulated]] together in a [[container format]].
 
==Examples==
An [[endec]] is a similar (but ''not'' identical) concept for [[hardware]].
An [[audio codec]] converts analog audio signals into digital signals for transmission or encodes them for storage. A receiving device converts the digital signals back to analog form using an audio decoder for playback. An example of this is the codecs used in the sound cards of personal computers. A [[video codec]] accomplishes the same task for video signals.
 
When implementing the [[Infrared Data Association]] (IrDA) protocol, an endec may be used between the [[UART]] and the [[optoelectronic]] systems.<ref>{{cite web| url = http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0183g/I31065.html| title = IrDA SIR ENDEC functional description}}</ref>
While many people explain that [[AVI]] is a codec, they are incorrect. AVI (nowadays) is a [[container format]], which many codecs might use (although not to [[ISO]]). There are other well known alternative containers such as [[Ogg]], [[Advanced Systems Format|ASF]], [[QuickTime]], [[RealMedia]] and [[MP4]].
 
==See alsoCompression==
{{Further|Image compression|Video coding format|Audio coding format}}
*[[Audio codec]], [[Video codec]]
*[[Audio signal processing]]
*[[Digital signal processing]]
*[[List of codecs]]
*[[Lossless data compression]]
*[[Lossy data compression]]
*[[Multimedia compression]]
*[[Open source codecs and containers]]
'''[[Comparison]]s'''
:*[[Comparison of audio codecs]]
:*[[Comparison of container formats]]
:*[[Comparison of video codecs]]
 
In addition to encoding a signal, a codec may also compress the data to reduce transmission bandwidth or storage space. Compression codecs are classified primarily into [[lossy]] codecs and [[lossless]] codecs.
==External links==
*[http://www.fourcc.org/codecs.php List of video codecs from FOURCC]
*[http://www.omiod.com/codecs.asp Exhaustive list of audio & video codecs]
*[http://www.en.voipforo.com/codec/codecs.php VoIP codecs] - A list of VoIP codecs
*[http://awaken.typepad.com/getting_louder/2005/12/format_size_com.html Getting Louder] - Comparison of file sizes produced by popular Codecs
 
Lossless codecs are often used for archiving data in compressed form while retaining all information present in the original stream. If preserving the original quality of the stream is more important than eliminating the correspondingly larger data sizes, lossless codecs are preferred. This is especially true if the data is to undergo further processing (for example, [[editing]]) in which case the repeated application of processing (encoding and decoding) on lossy codecs will degrade the quality of the resulting data such that it is no longer identifiable (visually, audibly, or both). Using more than one codec or encoding scheme successively can also degrade quality significantly. The decreasing cost of storage capacity and network bandwidth has a tendency to reduce the need for lossy codecs for some media.
[[Category:Digital signal processing]]
[[Category:Computing portmanteaus]]
 
Many popular codecs are lossy. They reduce quality in order to maximize compression. Often, this type of compression is virtually indistinguishable from the original uncompressed sound or images, depending on the codec and the settings used.<ref>{{cite web |title=Audio quality of aac vs. mp3 vs. wma vs. ogg encoders |publisher=SoundExpert |url=http://soundexpert.org/ |access-date=2010-07-25 |quote=above 5.0 – all sound artifacts will be beyond threshold of human perception with corresponding perception margin}}</ref> The most widely used lossy data compression technique in [[digital media]] is based on the [[discrete cosine transform]] (DCT), used in compression standards such as [[JPEG]] images, [[H.26x]] and [[MPEG]] video, and [[MP3]] and [[Advanced Audio Coding|AAC]] audio. Smaller data sets ease the strain on relatively expensive storage sub-systems such as [[non-volatile memory]] and [[hard disk]], as well as [[write once read many|write-once-read-many]] formats such as [[CD-ROM]], [[DVD]], and [[Blu-ray Disc]]. Lower data rates also reduce cost and improve performance when the data is transmitted, e.g., over the internet.
<!-- interwiki -->
 
==Media codecs==
[[af:Codec]]
{{Further|Video codec|Audio codec}}
[[ca:Codec]]
 
[[cs:Kodek]]
Two principal techniques are used in codecs, pulse-code modulation and [[delta modulation]]. Codecs are often designed to emphasize certain aspects of the media to be encoded. For example, a digital video (using a [[DV (video format)|DV]] codec) of a sports event needs to encode motion well but not necessarily exact colors, while a video of an art exhibit needs to encode color and surface texture well.
[[de:Codec]]
 
[[es:Codec]]
Audio codecs for cell phones need to have very low [[Latency (audio)|latency]] between source encoding and playback. In contrast, audio codecs for recording or broadcasting can use high-latency [[audio compression (data)|audio compression]] techniques to achieve higher fidelity at a lower bit rate.
[[fi:Koodekki]]
 
[[fr:Codec]]
There are thousands of audio and video codecs, ranging in cost from free to hundreds of dollars or more. This variety of codecs can create compatibility and obsolescence issues. The impact is lessened for older formats, for which free or nearly-free codecs have existed for a long time. The older formats are often ill-suited to modern applications, however, such as playback on small portable devices. For example, raw uncompressed [[PCM audio]] (44.1&nbsp;kHz, 16-bit stereo, as represented on an audio CD or in a .wav or .aiff file) has long been a standard across multiple platforms, but its transmission over networks is slow and expensive compared with more modern compressed formats, such as [[Opus (audio format)|Opus]] and MP3.
[[hr:Codec]]
 
[[hu:Kodek]]
Many [[multimedia]] data streams need to contain both [[Sound|audio]] and [[video]] data, and often some form of metadata that permits synchronization of the audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data streamstreams to be useful in stored or transmitted form, they must be [[Encapsulation|encapsulated]] together in a [[container format]].
[[it:Codec]]
 
[[ja:&#12467;&#12540;&#12487;&#12483;&#12463;]]
Lower [[bitrate]] codecs allow more users, but they also have more distortion. Beyond the initial increase in distortion, lower bit rate codecs also achieve their lower bit rates by using more complex algorithms that make certain assumptions, such as those about the media and the packet loss rate. Other codecs may not make those same assumptions. When a user with a low bitrate codec talks to a user with another codec, additional distortion is introduced by each [[transcoding]].
[[nl:Codec]]
 
[[pl:Kodek]]
[[Audio Video Interleave]] (AVI) is sometimes erroneously described as a codec, but AVI is actually a container format, while a codec is a software or hardware tool that encodes or decodes audio or video into or from some audio or video format. Audio and video encoded with many codecs might be put into an AVI container, although AVI is not an [[ISO standard]]. There are also other well-known container formats, such as [[Ogg]], [[Advanced Systems Format|ASF]], [[QuickTime]], [[RealMedia]], [[Matroska]], and [[DivX Media Format]]. [[MPEG transport stream]], [[MPEG program stream]], [[MP4]], and [[ISO base media file format]] are examples of container formats that are ISO standardized.
[[pt:Codec]]
 
[[ru:&#1050;&#1086;&#1076;&#1077;&#1082;]]
==Malware==
[[sv:Omkodare]]
{{Importance section|date=January 2022}}
[[tr:Codec]]
'''{{vanchor|Fake codec|text=Fake codecs}}''' are used when an online user takes a type of codec and installs viruses and other [[malware]] into whatever data is being compressed and uses it as a disguise. This disguise appears as a codec download through a pop-up alert or ad. When a user goes to click or download that codec, the malware is then installed on the computer. Once a fake codec is installed it is often used to access private data, corrupt an entire computer system or to keep spreading the malware. One of the previous most used ways to spread malware was fake AV pages and with the rise of codec technology, both have been used in combination to take advantage of online users.<ref>{{Cite web|url=https://www.zscaler.com/blogs/security-research/fake-video-codecs-still-going-strong|title=Fake Video Codecs Still Going Strong |access-date=2022-01-09}}</ref> This combination allows fake codecs to be automatically downloaded to a device through a website linked in a pop-up ad, virus/codec alerts or articles as well.
[[zh:&#32534;&#35299;&#30721;&#22120;]]
 
== See also ==
{{div col|colwidth=20em}}
* [[Audio signal processing]]
:* [[Comparison of videoaudio coding codecsformats]]
:* [[Comparison of audiovideo codecs]]
:* [[Comparison of video container formats]]
* [[Digital signal processing]]
* [[List of codecs]]
* [[OpenList of open-source codecs and containers]]
{{div col end}}
 
== References ==
{{reflist}}
 
{{Compression Methods}}
 
[[Category:Codecs| ]]
[[Category:Digital signal processing]]
*[[Lossless dataCategory:Data compression]]