What Is a Codec?
Total Page:16
File Type:pdf, Size:1020Kb
What is a Codec? Codec is a portmanteau of either "Compressor-Decompressor" or "Coder-Decoder," which describes a device or program capable of performing transformations on a data stream or signal. Codecs encode a stream or signal for transmission, storage or encryption and decode it for viewing or editing. Codecs are often used in videoconferencing and streaming media solutions. A video codec converts analog video signals from a video camera into digital signals for transmission. It then converts the digital signals back to analog for display. An audio codec converts analog audio signals from a microphone into digital signals for transmission. It then converts the digital signals back to analog for playing. 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 robustness of the stream. 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 in the future, in which case the repeated lossy encoding would damage the eventual quality too much. Many multimedia data streams need to contain both 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 encapsulated together in a container format. An endec is a similar (but not identical) concept for hardware. Transcoding Transcoding is the direct digital-to-digital data conversion of one encoding to another,[1] such as for movie data files or audio files. This is usually done in cases where a target device (or workflow) does not support the format or has limited storage capacity that mandates a reduced file size, or to convert incompatible or obsolete data to a better- supported or modern format. Transcoding can be performed just while files are being searched, as well as for presentation. For example, Cineon and DPX files have been widely used as a common format for digital cinema, but the data size of a two-hour movie is about 8 terabytes (TB). That large size can increase the cost and difficulty of handling movie files. However, transcoding into a JPEG2000 lossless format has better compression performance than other lossless coding technologies, and in many cases, JPEG2000 can compress images to half-size. Transcoding is commonly a lossy process, introducing generation loss; however, transcoding can be lossless if the input is losslessly compressed and the output is either losslessly compressed or uncompressed. The process of lossy-to-lossy transcoding introduces varying degrees of generation loss. In other cases, the transcoding of lossy to lossless or uncompressed is technically a lossless conversion because no information is lost, however the process is irreversible and is more suitably known as destructive. Audio and Video Codecs (A/V codecs) ABOUT RAW CODECS Raw recording for motion pictures wasn't popular until the release of the RED ONE camera a few years ago. RED brought the idea of Raw recording to the masses, though they weren't the first. Both ARRI and DALSA had cameras that could output Raw sensor data. So what is Raw anyway? Simply put, it's just sensor data before any image processing. The upside to Raw recording is that no typical video processing (and minimal compression) has been baked in. The sensor outputs exactly what it sees -- no white balance, ISO or other color adjustments are there. This, along with a high bit rate, allows for a huge amount of adjustment in post. (note: the less compressed options in both Red One, and Sony F65 are often considered fairly lossless (limited quality loss). On the other hand, ALEXA outputs uncompressed Raw data, which can be recorded externally. This would be the closest thing to a true uncompressed signal. REDCODE RAW (.R3D) RAW is a proprietary file format that efficiently encodes measurements from a camera’s digital sensor in a way that maximizes post-production capabilities. It achieves this in part by storing each of the sensor’s color channels separately, prior to conversion into a full color image. Similar to the advantages that RAW files brought to stills photography, this improves control over white balance, exposure and grading in post-production. Furthermore, since such settings are appended to the file as metadata only, grading is completely ARRIRAW Arriraw is a raw codec similar to CinemaDNG that contains unaltered Bayer sensor information, the data stream from the camera can be recorded via T-link with certified recorders like those from Codex Digital or Cineflow. The ArriRaw format (along with the other recordable formats) contains static and dynamic metadata. These are stored in the header of the file and can be extracted with the free web tool metavisor[12] or with the application Meta Extract provided by Arri. Of particular importance for visual effects are the lens metadata, which are stored only when Arri's lens data system (LDS) is supported by the lens used. CinemaDNG CinemaDNG is the result of an Adobe-led initiative to define an industry-wide open file format for digital cinema files. CinemaDNG caters for sets of movie clips, each of which is a sequence of raw video images, accompanied by audio and metadata. CinemaDNG supports stereoscopic cameras and multiple audio channels. CinemaDNG specifies directory structures containing one or more video clips, and specifies requirements and constraints for the open format files, (DNG, TIFF, XMP, and/or MXF), within those directories, that contain the content of those clips. CinemaDNG is different from the Adobe DNG (Digital Negative) format that is primarily used as a raw image format for still cameras. However, each CinemaDNG image is encoded using that DNG image format. The image stream can then be stored in one of two formats: either as video essence using frame-based wrapping in an MXF file, or as a sequence of DNG image files in a specified file directory. Each clip uses just one of these formats, but the set of clips in a movie may use both. BRAW Blackmagic RAW is a visually lossless codec. They claim that their new RAW codec will offer equal or better image quality to any other codec on the market, but at file sizes similar to those you’ll find in lossy encoding techniques, such as h.264. ABOUT LOG New Sony, Canon and ARRI cameras all have a Log recording mode. When the Log modes are activated, the image becomes flat and desaturated, but you can still see it on a monitor. Log recording is just standard video recording in the sense that all pixels display color and brightness information. Log isn't Raw; it's video. However, it's a special way of capturing that maximizes the tonal range of a sensor. The idea of Log recording came about with Kodak's Cineon system for scanning film. The system scanned film into a Log format that corresponded to the density of the original film. This maximized the information from the film that could be stored in the video format. Because this information has many shades of gray -- very low contrast -- it needs to be corrected for proper viewing on a monitor. Sony, Canon and ARRI have all taken the idea of Log film scanning and applied it to their sensors. They map a "Log" gamma curve that pulls the most information off of their sensors. Sony calls their map S-Log, Canon's is Canon Log, and ARRI's is LogC. Each is designed for a specific camera, but all have a similar result. Because Log is a video image, manipulations like white balance and ISO are baked in. A transform of this video data, known as a lookup table (LUT), is required for proper viewing, which makes the video look more "normal" to us. A standard LUT converts the Log video to standard (Rec. 709) HD video. The ALEXA converts its Raw data into LogC video; this information can be recorded or sent out over HD-SDI. A LUT can be applied for viewing and also can be recorded if desired. Because of this, any step in the chain -- Raw, LogC video or standard video -- can be recorded. log is primarily designed to maximize dynamic range, it makes sense to shoot log in tricky lighting conditions where you expect there to be both extremely bright and dark parts in the image. However, in more controlled lighting situations, such as studio work and shooting green screens shooting in log is not really accomplishing much for you. In fact, it's just making more unnecessary work for you in post-production. S-LOG, LogC and Cannon Log S- LOG (Sony Log) or Log-C (Arri, but Arri also can shoot S-log) S-Log, Log-C or Cannon Log mode to capture a cinema quality image and accomplish negative film quality latitude (as in negative film analog film stock). S- Log and Log-C mode captures an image with the greatest amount of range in tonal reproduction and the lowest noise floor and highest ceiling. What this means is you can shoot an image using S-Log or Log-C and have the greatest amount of flexibility when entering the digital intermediate phase of post- production.