Video Encapsulation Format (container)

Source: Internet
Author: User
Tags comparable
Introduction: this is a document you can see on the Internet. It is used as an entry-level multimedia parsing document.

 

 

The so-called Encapsulation Format is to put the compressed video track and audio track into a file in a certain format, that is, it is just a shell, you can also regard it as a folder for storing video tracks and audio tracks. In plain words, video tracks are equivalent to meals, while audio tracks are equivalent to dishes. The encapsulation format is a bowl or a pot, which is used to hold food containers.

The following encapsulation formats are commonly used:

1 Avi

Avi container-mature old technology

Avi was launched by Microsoft in 1992 to combat Apple's QuickTime technology. Although Avi has been recognized as a obsolete technology by international academic circles, but thanks to the versatility of windows and easy-to-understand API development, it is also widely used.

AVI file structure consists of three parts: Header, subject and index. The image data and sound data in the subject are stored interactively. You can jump from the index at the end to the desired position.

Avi itself only provides such a framework. The internal image data and audio shun data formats can be any encoding format. Because the index is placed at the end of the file, it cannot be used to play Internet streaming media. In a simple example, it is difficult to play a video downloaded from the Internet if it is not completed. Another problem is that Avi does not support high-bit-rate VBR audio files.

The full name of VBR is variable bitrate, which is the dynamic bit rate. Different bit rates can be defined according to the current needs to avoid waste and improve the utilization. The problem arises as the image in the container is separated from the sound, so a synchronization process between the image and the sound is required during playback. If the CBR audio track is set, synchronization is not a problem, but the VBR audio tracks are constantly changing, while Avi does not have a timestamp to synchronize the VBR audio tracks and images. In this way, the image sound is not synchronized. Later, virtualdub proposed a new method to expand Avi's compatibility with VBR audio. However, the high bit rate may cause data loss, resulting in lossy sound effects, no perfect solution has been provided for this problem. What's even more unfortunate is that for truehd,
DTS-HD and other sound effects are completely unsupported.

2 TS and PS Encapsulation

Because of the competition for hddvd and BD, although both of them adopt MPEG2/VC-1/H.264 in encoding, The encapsulation format can be different. The hddvd officially recognized by the DVD Forum uses the PS encapsulation, that is, the Program Stream (Program Stream), which is the same as the MPEG2 Program Stream encapsulation adopted by the previous DVD, the suffix of the PS stream is vob and Evo. Without the official certification of the DVD Forum, BD uses another ts encapsulation of MPEG2, namely, transport stream, instead of PS encapsulation ), the suffix of the TS stream is ts. These are two different Syntax structures of the MPEG2 system, which are used only as encapsulation. TS streams are easier to transmit for PS streams, but because of their nature, they are also more prone to errors, so in the past, PS streams were generally used for storage. Of course, with the improvement of fault tolerance/Error Correction Technology, ts is widely applied.
Currently, most of the online versions of HDTV remux are encapsulated in ts. PS encapsulation can only be seen in the original version of hddvd. So let's focus on the analysis of the TS Encapsulation Format.
TV programs can be decoded at any time when you turn on the TV, so the characteristics of the MPEG2-TS format is required from any part of the video stream can be decoded independently. In terms of structure, TS consists of the header file and the subject, and the expanded TS Stream also contains the timestamp. In this way, regardless of the format of the VBR audio track, it is easy to use the time stamp to synchronize the image. Of course, for the new sound format, a new separator and decoder are required for decoding. It is constantly improving development.
Unlike Avi, TS has taken network playback into account since its birth. As a result, it soon became a world standard and widely used in TV station digital playback, mobile phones, and other fields.

Remux version

Remux means to extract the video data and audio data from the HD-DVD and bluray-DVD without loss, and encapsulate it into the familiar ts or AVI files.

3 mov Encapsulation

Many hdrip packages include Avi, MKV, and mov. MoV is a QuickTime encapsulation. This installation and Avi are in almost the same era and have many defects. Few people use them now.

Hdrip: Re-encoding, that is, lossy compressed videos.

4 MKV Encapsulation

MKV is short for matroska. It is a new multimedia Encapsulation Format. The most common combination is x264 + MKV. MKV encapsulation is novel and open. Compared with Avi, MKV Encapsulation has the following advantages:

1: Variable Frame Rate: This requires encoding. Imagine replacing it with low FPS when playback changes are slow (for example, static objects), which can save a lot of resources.
2: Error Detection and repair: This undoubtedly provides error correction and fault tolerance, which is especially required during network transmission.
3: Soft Subtitles: Friends who often read DVDRip and hdrip know that Subtitles generally exist in the form of other files. In MKV, subtitles can be embedded in encapsulation, but will not be confused with videos, you can also select multiple Subtitles at will. This makes transmission and storage easier.
4: stream transmission: this is basically the same as the reason for TS stream. You can use timestamps to manage video and audio synchronization issues, so that you can watch the video right away.
5: menu: Interactive operations make MKV more user-friendly.
6: strong compatibility: The biggest feature of MKV is that it can accommodate a variety of different types of encoding video, audio, and Subtitle streams. Even the very closed RealMedia and QuickTime are included in it, A universal media container.
7: openness and cross-platform: matroska uses an open architecture with many advanced features and can be used across platforms.
However, matroska has obvious disadvantages compared with the above descriptions. It does not have a deep background to rely on, which makes it impossible to make a difference in the business field. However, we can see from DVDRip that it is not the only standard. The truly advanced technology has met many non-technical barriers on the way to standardized commercialization. On the Internet, there is no such concern, therefore, MKV can be quickly popularized on the Internet.

However, the disadvantages of MKV are also obvious. The Haali separator is the only good Separator in terms of separators. In addition to the folk standards, it is difficult for us to see its existence outside the PC.

Why are there so many formats and specifications?


In fact, it is not the case. Think about some dishes, such as pork ribs, which are relatively large and cannot be placed in a bowl. You have to change the pot. Some meals are hot and cannot be placed in plastic containers. Of course, personal preferences also have a certain relationship. Therefore, the selection of containers basically lies in its compatibility with video/audio and its applicability. Now we should understand that many people have always regarded the Encapsulation Format as the video encoding described earlier, and there is no direct connection between the two.
++ Encoding method: mpeg1: Used in earlier VCD versions. The resolution is 352*288 and the compression ratio is low.
MPEG2: generally used for DVDs, including NTSC (720*480) and PAL (720*576)
The compression ratio is higher than mpeg1.
MPEG4: currently, the most widely used technology, the origin of AVI files, greatly improving Compression
Quality comparable to DVD
DivX: developed based on MPEG4 and optimized some algorithms
Xvid: developed after the DivX technology is blocked and cracked, it is also based on MPEG4
More advanced coding technology, open source code, better image quality
H.261: Early low bit rate encoding, used in 352x288 and 176x144.
No
H.263: at a low bit rate, it can provide better image effects than h.261.
Some Algorithms
Improved H.263 +: H.263
H.264: H.264 integrates the advantages of previous standards, efficient compression, and H.263 +
Compared with MPEG4 sp, this solution reduces the bit rate by 50% and provides high-quality applications.
Rm/rmvb: the high compression encoding applied to networks by real. rm is fixed.
Bit Rate. rmvb indicates the Dynamic Bit Rate (that is, the static image uses Low Bit Rate and dynamic
High Bit Rate)
H.263 and MPEG are different international standards
Encapsulation Format (also called container): the so-called Encapsulation Format is to put the compressed video track and audio track in a certain format into a file, that is, it is just a shell, you can also regard it as a folder for storing video tracks and audio tracks. In plain words, video tracks are equivalent to meals, while audio tracks are equivalent to dishes. The encapsulation format is a bowl or a pot, which is used to hold food containers.
Avi: The encapsulation standard that Microsoft created in early 1990s was a confrontation
The quick time format (mov) can only support fixed CBR constant
Audio file encoded by bit rate.
TS and PS: the PS package can only be in the original hddvd version,
MoV: mov is a QuickTime encapsulation.
WMV: launched by Microsoft as a market competition
MKV: a universal package with good compatibility, cross-platform performance, and error correction.
External subtitles.
FLV: H for H.263 family format
Rmvb/RM: real video, which is developed by RealNetworks for rmvb and RM
MP4: Mainly used in MPEG4 Encapsulation
H.264 has the highest compression ratio and is mainly used for real-time online playback at low bit rates. The rmvb compression ratio is relatively low, but the quality is much better.

A complete multimedia file consists of two parts: audio and video. H264 and Xvid are video encoding formats, while MP3 and aac are audio encoding formats. Subtitle files are only included.
  You can package video encoding and Audio Encoding into a complete multimedia file in different ways. This method is called encapsulation. Different encapsulation methods have different suffixes. Because some encapsulation methods have strong flexibility, they can package different audio and video files into one file. Therefore, this situation occurs, although the file suffix is the same, however, some can play normally, while others cannot. After all, none of the playing software is omnipotent. Some advanced encapsulation methods can encapsulate multiple Audio Encoding files at the same time, or even subtitle files at the same time, such as the MKV encapsulation method. The MKV file can be used to pronounce a file in multiple languages. Multilingual subtitles are suitable for different users.

Bytes ----------------------------------------------------------------------------------------------

Currently, the most common encoding method is as follows:

 

   Mpeg1: This encoding format is used for VCD. The resolution is 352*288, and the compression ratio is low.

   MPEG2: generally used for DVDs, including NTSC (720*480) and PAL (720*576). It is in the same format as mpeg1.

   MPEG4: currently, the most widely used technology, the origin of AVI files, greatly improves the compression ratio, and the quality is comparable to that of DVDs.

   DivX: developed based on MPEG4 and optimized some algorithms

   Xvid: After the DivX technology is blocked, it was cracked and developed. It is also based on MPEG4 encoding technology that is more advanced, with open source code and better image quality.

   H.261: Early low bit rate encoding, applicable to 352x288 and 176x144.

   H.263: it can provide better image effects than H.261 at a low bit rate and improve some algorithms.

   Improved H.263 +: H.263

   H.264: H.264 integrates the advantages of previous standards, efficient compression,

   Rv.10 rv.13 rv.20 rv.30 rv40

 Bytes -----------------------------------------------------------------------------------------

 Encapsulation Format (also called container): the so-called Encapsulation Format is to put the compressed video track and audio track in a certain format into a file, that is, it is just a shell, you can also regard it as a folder for storing video tracks and audio tracks. In plain words, video tracks are equivalent to meals, while audio tracks are equivalent to dishes. The encapsulation format is a bowl or a pot, which is used to hold food containers.

 

 Avi: The encapsulation standard that Microsoft created in early 1990s was launched to combat the QuickTime format (mov) and can only support fixed CBR

     Specifies the bit rate encoded audio file.

 TS and PS: the PS package can only be in the original hddvd version,

 MoV: mov is a QuickTime encapsulation.

 WMV: launched by Microsoft as a market competition

 MKV: a universal encapsulation device with good compatibility, cross-platform performance, and error correction. It can contain external subtitles.

 FLV: This encapsulation method can protect the original address and is not easily downloaded. Currently, some video sharing websites use this encapsulation method.

 Rmvb/RM: Real Video, developed by RealNetworks, is used in different encapsulation modes of rmvb and RM. Rm is a fixed bit rate, while rmvb is a dynamic

          Bit Rate (Low Bit Rate for static images and high bit rate for dynamic images)

 MP4: It is mainly used in MPEG4 encapsulation and is mainly used on mobile phones.

 3GP: It is mainly used in H.263 encapsulation and is mainly used on 3G mobile phones.

Bytes ----------------------------------------------------------------------------------------------

 Theoretically, you can package any video file and audio file into a complete multimedia file. However, different encapsulation methods have different computing methods, it requires a high compression rate while taking into account the high definition effect. Therefore, no one encapsulation method will package any video file with an audio file. For example, the MKV encapsulation container can be any combination! However, generally, the most common MKV is the h264 + AAC combination, which has the smallest size and highest definition. Therefore, many MKV videos on the Internet are of high definition.


Below are some common combinations:
Encapsulation container video stream encoding format audio stream encoding format
Avi Xvid MP3
Avi DivX MP3
Matroska (Suffix: MKV) Xvid MP3
Matroska (Suffix: MKV) Xvid AAC
Matroska (Suffix: MKV) h264 AAC
MP4 Xvid MP3
MP4 h264 AAC
3GP H.263 AAC

Bytes --------------------------------------------------------------------------------------------

Optimal Bit Rate for various encodings

 The encoding specifications and encapsulation formats are diverse because they correspond to different best bit rates. The low resolution of 640x272 is mainly real video. The best bit rate is 350-600kbps, And the encapsulated file format is RM or rmvb. We often download about M movies online, which are basically realvideo-standard rmvb files; when the resolution is increased to x438, Xvid encoding is generally started, and the bit rate also ranges from to kbps. The encapsulated file is often Avi, and the file size is about MB, we often download x264/AVC-encoded MKV package files with a bitrate of 5-6 MB, and the audio part can reach 5.1 sound effects. The audio and video effects are very good, but the file volume is above GB, the size of a DVD disk usually takes several days to download from the Internet. H is often used for P videos. 264 encoding and vc1 encoding. the bit rate is 30 Mbps and the size reaches 22-40 Gb. Although the effect is shocking, it is not convenient for network sharing. For MP4 with a size of about 8 GB, the most suitable video source and size is Xvid encoding, the bit rate is around kbps, and the file size is mb-1.4gb Avi, and the rv40 encoded rmvb with the same bit rate and volume, and rmvb with a bit rate of 350-600kbps.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.