How does codecs work




















The most common codec includes h. It is also important to note the bit rate , which refers to the amount of data stored for each second of media that is played. The higher the bit rate, the less compression, which results in higher quality overall.

Be aware that the higher the bit rate, the larger the file size. Larger files on their own may be no problem, but when multiplied by the size of the audience, it can cause bandwidth problems that affect internet service providers and users. When talking about video file types, most people are referring to file containers. A container is the file that contains your video, audio streams, and any closed caption files as well.

Popular video visuals only containers include. Audio actually uses its own codecs. Oftentimes, your video camera will determine the container for your original video file as well. Modern video editors will be happy to accept all kinds of containers, especially from well-known camera brands.

When exporting a video for the web, MP4 will be your best bet! Occasionally, you may need to use a different container depending on where you plan to host your video. To make things simple and eliminate the guesswork, many video editors have presets for exporting with ideal settings.

Camtasia , for example, has multiple MP4 outputs. All you need to do is pick a preset for the resolution of your video and a folder in which to save it. Or, cut out the middleman and skip having to determine an output all together by sending your video directly to a cloud platform like Google Drive or YouTube. There are two kinds of codecs; lossless, and lossy.

In contrast to lossless codecs, lossy codecs produce a facsimile of the original file upon decompression, but not the original file. Lossy codecs have one immutable trade-off—the lower the data rate, the less the decompressed file looks or sounds like the original.

In other words, the more you compress, the more quality you lose. Lossy compression technologies use two types of compression, intra-frame and inter-frame compression. Intra-frame compression is essentially still image compression applied to video, with each frame compressed without reference to any other. In contrast, inter-frame compression uses redundancies between frames to compress video. For example, in a talking head scenario, much of the background remains static.

Inter-frame techniques store the static background information once, then store only the changed information in subsequent frames. Inter-frame compression is much more efficient than inter-frame compression, so most codecs are optimized to search for and leverage redundant information between frames. Key frames stored the complete frame and were compressed only with intra-frame compression. During encoding, the pixels in delta frames were compared to pixels in previous frames, and redundant information was removed.

The remaining data in each delta frame is also compressed using intra-frame techniques as necessary to meet the target data rate of the file. Figure 1. This is shown in Figure 1 , which is a talking head video of the painter shown on the upper left. During the video, the only regions in the frame that change are the mouth, cigar, and eyes.

The four delta frames store only the blocks of pixels that have changed and refer back to the key frame during decompression for the redundant information. In this scenario with an animated file, inter-frame compression would be lossless, because you could recreate the original animation bit for bit with information stored in the key and delta frames. I-frames are the same as key frames, and are compressed solely with intra-frame techniques, making them the largest, and least efficient frame type.

Figure 2. I-, B- and P-frames as used in most advanced compression technologies. B-frames and P-frames are both delta frames. P-frames are the simplest, and can utilize redundant information in any previous I- or P-frame. B-frames are more complex, and can utilize redundant information in any previous or subsequent I-, B- or P-frame. This makes B-frames the most efficient of the three frame types.

The exception was at p resolution, which was either close and in some scenarios had VP9 as more efficient. As a result, despite not being as advanced, H.

Note, the H. However, this is not the same codec but actually a free equivalent of the codec versus the licensed H. Like video, different audio codecs excel at different things.

Given that they are lossy, these formats, in essence, delete information related to the audio in order to compress the space required. The job of this compression is to strike the right balance, where a sufficient amount of space is saved without notably compromising the audio quality.

Now both of these audio coding methods have been around for awhile. So while MP3 has much more milage with device compatibility to this day, AAC benefits from superior compression and is a preferable method for streaming video content of the two.

Not only that but a lot of delivery over mobile devices, when related to video, depends on the audio being AAC. This means the original audio data can be perfectly reconstructed from the compressed data.

Favoring compatibility, H. While neither is cutting edge, both can produce high quality content with good compression applied. In addition, video content compressed with these codecs can reach large audiences, especially over mobile devices. These techniques are utilized by codecs to intelligently reduce the size of video content. The goal is to do so without hugely impacting video quality. That said, certain techniques are more noticeable to the end viewer than others.

A common technique for compression is resizing, or reducing the resolution. This is because the higher the resolution of a video, the more information that is included in each frame. This will create fewer pixels, reducing the level of detail in the image at the benefit of decreasing the amount of information needed. This concept has become a cornerstone to adaptive bitrate streaming.

This is sometimes called macroblocking, although usually this is more pronounced than mere pixilation. In general this is a phenomena where parts of an image look blocky. This can be a combo of a low resolution image and interframe, where details in the video are actually changing but areas of the video as part of the interframe process are being kept.

Note that this resizing process is sometimes referred to as scaling as well. However, scaling sometimes takes on an uncompressed meaning. One video compression technique that might not be widely realized is interframe. For example, a video with an FPS frames per second of 30 means that one second of video equals 30 frames, or still images.

When played together, they simulate motion. However, chances are elements from frame to frame within those 30 frames referred to as GOP, Group of Pictures will remain virtually the same.

Realizing this, interframe was introduced to remove redundant data. Essentially reducing data that would be used to convey that an element has not changed across frames. Here is a still image of volleyball being thrown and spiked. There is quite a bit of movement in this example, with the volleyball being thrown up, the ball being spiked, sand flying and elements moving from the wind like trees and water.

Regardless, there are parts that can be reused, specifically areas of the sky. As a result, only the below element of the video is actually changing between frames in this series. This technique, built into video codecs like H. To execute the technique, the process utilizes three different types of frames to achieve this: i-frames, p-frames and b-frames.



0コメント

  • 1000 / 1000