H.264/MPEG-4 AVC
H.264/MPEG-4 파트 10 또는 AVC(Advanced Video Coding, 고급 영상 부호화)는 영상 압축 표준의 하나로, 현재 고선명 비디오의 녹화, 압축, 배포를 위한 가장 일반적인 포맷 가운데 하나이다. 매우 높은 데이터 압축률을 자랑한다.
이 표준은 ITU-T의 비디오 코딩 전문가 그룹(Video Coding Experts Group, VCEG)과 ISO/IEC의 동화상 전문가 그룹(Moving Picture Experts Group, MPEG)이 공동으로 조인트 비디오 팀(Joint Video Team, JVT)을 구성하고 표준화를 진행한 결과물로 나온 것이다. 그러므로 ITU-T의 H.264와 ISO/IEC의 MPEG-4 파트 10 AVC(공식적으로는 ISO/IEC 14496-10-MPEG-4 파트 10, 고급 비디오 부호화)은 기술적으로 동일한 표준안이다. 표준안은 2003년 5월에 발표되었다.
H.264는 블루레이 디스크를 위한 코덱 표준 중 하나로 잘 알려져 있다. 모든 블루레이 디스크 플레이어는 항상 H.264를 디코딩할 수 있어야 하기 때문이다. H.264는 또한 비메오, 유투브, 아이튠즈 스토어 영상 등의 인터넷 스트리밍 서비스와 어도비 플래시 플레이어 및 마이크로소프트 실버라이트 등의 웹 소프트웨어, 다양한 HDTV 방송(지상파: ATSC, ISDB-T, DVB-T, DVB-T2 케이블: DVB-C 위성: DVB-S, DVB-S2)에 널리 사용된다.
H.264 vs MPEG-4
동영상 Encoding/Decoding을 Smart-I 플랫폼에서 지원하기 위해 여러 프로세서들의 데이터 쉬트들을 읽다보면 MPEG-4와 H.264를 지원한다는 표현이 자주 등장하는데, 이 두 표준이 사실은 표기 방식이 모호하여 많은 혼동을 불러 일으킨다. 확실히 정리해 보자. MPEG은 ISO(세계표준화기구) 에서 제정하는 표준이고, H.264는 ITU(국제전기통신연합) 에서 제정하는 표준이여서 원래는 따로 진행되고 있었다. MPEG4가 먼저 등장했고, MPEG4는 많은 part로 구성되어 있다. 별다른 표기 없이 MPEG4라고 쓸 때는 MPEG4 part2를 의미한다. 기술적으로는 ITU의 H.263과 유사하며 추가로 많은 내용이 들어가 있다. 이후 ITU에서 H.263을 개선한 H.264를 제안하였고, ISO에서도 H.264를 표준으로 받아들여 MPEG4 part10으로 들어간다. 따라서 편의상 MPEG4 part2는 MPEG4 로 표기하고, MPEG4 part10 은 H.264라고 불리우고 있는 것이다.
프로파일과 레벨
범용 비디오 부호화 기술을 사용 영역에 맞게 특정 기술들만을 사용할 수 있도록 설정 해둔 이것을 프로파일이라고 한다. 최초 발표된 표준에는 모바일 방송과 같은 저전력, 저해상도에 적합한 베이스라인(Baseline) 프로파일과, 압축률을 최대한 높이기 위한 기술들로 이루어진 메인 프로파일, 스트리밍 환경에 적합한 기술들이 추가된 확장(Extended) 프로파일의 세 가지가 있었으며 표준안이 개정되면서 몇 가지의 프로파일들이 추가되었다.
프로파일
현재 H.264/AVC에서 제공되고 있는 프로파일은 다음과 같다.
프로파일 번호 | 프로파일 이름 | 주요 특징 | |
66 | Baseline | 저전력, 저해상도, 낮은 딜레이를 가짐. CAVLC만 사용, B픽처 사용하지 않음 | |
66 | Constrained Baseline | Baseline과 Main프로파일의 교집합이 되는 기술만 사용 | |
77 | Main | 산술부호화 및 B픽처 사용으로 효율을 높임 | |
88 | Extended | 스트리밍을 위한 기술 및 오류 내성기술 사용 | |
FRExT | 100 | High | 8x8 DCT 사용,8x8 화면내 예측 사용 |
110 | High 10 | High 프로파일 + 10bit/pixel인 영상 지원 | |
110 | High 10 Intra | High10 프로파일에서 화면 내 예측 기술만 사용 | |
122 | High 4:2:2 | High10 프로파일 + 4:2:2 컬러 포맷 지원 | |
122 | High 4:2:2 Intra | High 4:2:2에서 화면 내 예측 기술만 사용 | |
244 | High 4:4:4 Predictive | 최대 14bit/pixel 지원, 4:4:4 컬러 포맷 지원 | |
244 | High 4:4:4 Intra | High 4:4:4 Predictive에서 화면 내 예측 기술만 지원 | |
44 | CAVLC 4:4:4 Intra | High 4:4:4 Intra에서 CAVLC로 사용(CABAC사용하지 않음) | |
레벨
레벨 | 최대 | 최대 | 최대 비디오 | 고해상도 예시 추가 상세 정보 보기/숨기기 |
1 | 1,485 | 99 | 64 | 128×[email protected] (8) 176×[email protected] (4) |
1b | 1,485 | 99 | 128 | 128×[email protected] (8) 176×[email protected] (4) |
1.1 | 3,000 | 396 | 192 | 176×[email protected] (9) 352×[email protected] (2) |
1.2 | 6,000 | 396 | 384 | 320×[email protected] (7) 352×[email protected] (6) |
1.3 | 11,880 | 396 | 768 | 320×[email protected] (7) 352×[email protected] (6) |
2 | 11,880 | 396 | 2,000 | 320×[email protected] (7) 352×[email protected] (6) |
2.1 | 19,800 | 792 | 4,000 | 352×[email protected] (7) 352×[email protected] (6) |
2.2 | 20,250 | 1,620 | 4,000 | 352×[email protected] (12) 720×[email protected] (5) |
3 | 40,500 | 1,620 | 10,000 | 352×[email protected] (12) 720×[email protected] (5) |
3.1 | 108,000 | 3,600 | 14,000 | 720×[email protected] (13) 1,280×[email protected] (5) |
3.2 | 216,000 | 5,120 | 20,000 | 1,280×[email protected] (5) 1,280×1,[email protected] (4) |
4 | 245,760 | 8,192 | 20,000 | 1,280×[email protected] (9) 2,048×1,[email protected] (4) |
4.1 | 245,760 | 8,192 | 50,000 | 1,280×[email protected] (9) 2,048×1,[email protected] (4) |
4.2 | 522,240 | 8,704 | 50,000 | 1,280×[email protected] (9) 2,048×1,[email protected] (4) |
5 | 589,824 | 22,080 | 135,000 | 1,920×1,[email protected] (13) 3,672×1,[email protected] (5) |
5.1 | 983,040 | 36,864 | 240,000 | 1,920×1,[email protected] (16) 4,096×2,[email protected] (5) |
5.2 | 2,073,600 | 36,864 | 240,000 | 1,920×1,[email protected] (16) 4,096×2,[email protected] (5) |
6 | 4,177,920 | 139,264 | 240,000 | 3,840×2,[email protected] (16) 8,192×4,[email protected] (5) |
6.1 | 8,355,840 | 139,264 | 480,000 | 3,840×2,[email protected] (16) 8,192×4,[email protected] (5) |
6.2 | 16,711,680 | 139,264 | 800,000 | 3,840×2,[email protected] (16) 8,192×4,[email protected] (5) |
네트워크 대역폭 효과적으로 사용하기
- [강추] 네트워크 카메라 대역폭 효과적으로 쓰기 고급편 2 (CCTV, H264)
CCTV 항목 참조.
Spec
H.264 Video Encoding Guide
ITU-T Rec. H.264 & Annex B
Recommendation H.264 is a video codec standard defined by the International Telecommunication Union, Telecommunications Standardization Sector (ITU-T). It is available free of charge and can be downloaded from their website.
The standard defines a bytestream format, whose lowest level of abstraction is the NALU (Network Layer Abstraction Unit).
32 types of NALUs can exist, although about 11 are reserved or unused. Some carry video slice data, some don’t. Two NALU types will be important later in this discussion: SPS (Sequence Parameter Set) and PPS (Picture Parameter Set). Both are required to decode a video slice, and provide important information about the stream, such as its size and interpretation of the raw data.
H.264 leaves undefined how these NALUs are transported and framed. However, it does describe one possible scheme, in the Standard’s own Annex B. This scheme, for want of a better name, is generally referred to as Annex B.
The scheme consists in prefixing the NALUs with an easy-to-synchronize-to start code that cannot occur within a NALU: A 3- or 4-byte pattern 00 00 01
or 00 00 00 01
. The rest of the NALU then follows. This scheme is popular in hardware and/or streaming situations because it allows acquiring bit-lock and byte-alignment easily, sends the SPS/PPS “in-band” periodically and thus allows one to tune into the stream at a random point to begin decoding, and has the interesting property that between NALUs one can validly send an arbitrary number of 0 bits or bytes.
FFmpeg Encoding
FFmpeg:Tool#H.264 항목 참조.
License
참고로 "라이브러리 license"와 "특허 license"는 다르다.
See also
- MPEG (i-frame 및 GOP 등 용어 설명 포함)
- 이산 코사인 변환 (Discrete Cosine Transform)
- x264
- ts
- Broadway.js (JavaScript)
- Bitrate - 계산 방법과 자주 사용하는 비트레이트 포함.
Favorite site
- Wikipedia (en) H.264/MPEG-4 AVC에 대한 설명
- H.264 : Advanced video coding for generic audiovisual services
- ITU-T H.264 (V9) (02/2014) 4
Project
- H.264/AVC Software Coordination / Current software version: JM 19.0
- [추천] H.264/AVC 인코더 참조 소프트웨어 구조 분석 5 (JM)
Guide
- H.264: Discrete Cosine Transform(DCT) 이산 코사인 변환 6
- H.264: Quantization(양자화)과 Zig-zag scanning 7
- H.264: 동영상 압축의 기본 개념 - RGB, YCbCr, 서브샘플링 8
- H.264/AVC 기초지식
- Overview of the H.264/AVC Video Coding Standard
- H.264/AVC 비디오 압축 표준 H.264/AVC의 전체구성과 "프로파일과레벨"에 관한규정
- The h.264 Sequence Parameter Set
- [추천] x264 옵션 정리 :: 유레카 블로그 9
분석
Spec
References
-
https://www.itu.int/ITU-T/recommendations/rec.aspx?rec=13189 ↩
-
Network_Camera_Bandwidth_Effective_Use_Advanced_Guide.pdf ↩
-
Blog.naver.com_-onlyou_4ever-_H.264_stream_analysis.pdf ↩
-
T-REC-H.264-201402-I.pdf ↩
-
JM_Analysis_Korean.pdf (한글로 잘 정리되어 있다) ↩
-
H264-Discrete_Cosine_Transform.pdf ↩
-
H264-Quantization_Zig-zag-scanning.pdf ↩
-
H264-RGB_YCbCr_Subsampling.pdf ↩
-
Dongho.tistory.com_-_x264_options.pdf ↩
-
Ligel.tistory.com_-_MeGUI_2460_x264_Options.pdf ↩