Author Archive: Yumi Chan

Introduction to H.264: (2) SODB vs RBSP vs EBSP

Here is a summary of the relationship between SODB, RBSP, EBSP, NALU and H.264 Byte Stream.
SODB: String of Data Bits
RBSP: Raw Byte Sequence Payload
EBSP: Encapsulate Byte Sequence Payload

SODB + RBSP Stop bit + 0 bit(s) => RBSP

RBSP part 1 + 0x03 + RBSP part 2 + 0x03 + … + RBSP part n => EBSP

NALU Header + EBSP => NALU

In Byte Stream Format (Annex B),

Start CodeNALU + … + Start CodeNALU => H.264 Byte Stream

String of Data Bits (SODB)


3.149  string of data bits (SODB): A sequence of some number of bits representing syntax elements present within a raw byte sequence payload prior to the raw byte sequence payload stop bit. Within an SODB, the left-most bit is considered to be the first and most significant bit, and the right-most bit is considered to be the last and least significant bit.


Introduction to H.264: (1) NAL Unit

H.264 / MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a common video compression format developed by ITU-T Video Coding Experts Group (VCEG) and ISO/IEC JTC1 Moving Picture Experts Group (MPEG). Network Abstraction Layer (NAL) and Video Coding Layer (VCL) are the two main concepts in H.264. A H.264 file consists of a number of NAL units (NALU) and each NALU can be classified as VCL or non-VCL. Video data is processed by the codec and packed into NAL units.

NALU in Packet-Transport Protocol V.S. Byte-Stream Format

There are two ways to pack a NAL unit for different systems, Packet-Transport System and Byte-Stream Format. For Packet-Transport systems like RTP, the transport system protocol frames the coded data into different pieces. Hence, the system can easily identify the boundaries of NAL units and we don’t need to add extra start code, which is a waste of resources. This method is usually used in streaming.


免費下載:H.264和MP4文件格式的標準/規範 官方文件


對於要學習 H.264 和 MP4 文件格式的人來說,看懂官方的標準/規範是十分重要的。以下是有提供免費下載的鏈接:

H.264 (MPEG-4 Part 10 / MPEG-4 AVC), Advanced Video Coding

ITU-T 和 ISO 網站中均有提供。在ITU-TH.264 被分類在 Series H: Audiovisual and multimedia systems 中而在ISO,它是在ISO/IEC 14496 (MPEG-4)中(Part 10)。如果要學習H.264和MP4的關係,Part 15也有參考價值,但需付費購買。


Free Download: H.264 and MP4 file format Standard / Specification

Studying the standard is very important for learning H.264 and MP4 container format. Here are the download links of the free official documents.

H.264 (MPEG-4 Part 10 / MPEG-4 AVC), Advanced Video Coding

It is available on both ITU-T and ISO website. H.264 is in Series H: Audiovisual and multimedia systems in ITU-T while it is in Part 10 of ISO/IEC 14496 (MPEG-4) in ISO. If you need to study the relationship between H.264 and MP4 container, you should also refer to Part 15 (not free).


Explanation of Descriptors in the ITU-T Publication on H.264 Coding Standard / Recommendation (with example)

I have started to learn H.264 for a week. My job required me to decode some H.264 video clips streamed from a media processor Hi3518 manufactured by Hisilicon. Yet, I have no background in video coding and it is a hard time for me now. I will keep writing and organizing the related materials for my revision and also for your reference. In this section, I am going to explain the descriptors used in the ITU-T official Publication on H.264 Coding Recommendation: Advanced video coding for generic audiovisual services and illustrate with some example. It is the basic thing you need to understand first before you could understand how to decode a H.264 video clip. There are 10 main descriptors, which are as follows (extracted from the document, edition 2013):

The following descriptors specify the parsing process of each syntax element. For some syntax elements, two descriptors, separated by a vertical bar, are used. In these cases, the left descriptors apply when entropy_coding_mode_flag is equal to 0 and the right descriptor applies when entropy_coding_mode_flag is equal to 1.


如何在Mac OS X上讀寫NTFS格式的外置硬碟機/USB? (含疑難排解)

NTFS(New Technology File System)是一個由Microsoft發展標準文件系統,FAT32則是另一個常用的文件系統的例子。文件系統定義了數據(或文件)如何存儲於儲存裝置,或從儲存裝置中檢索及讀取。不過,在默認情況下Mac OS X只支持讀取NTFS,不能寫。雖然網路上有軟件可以啟用NTFS的寫入,但是其實,只要幾個簡單的步驟,便可以啟用,而且是完全免費!以下是完整的指南。

1. 打開工具 “Terminal“(終端).


  1. 通過在右上角的 “Spotlight” 或同時按 “Cmd + Space”(默認快捷鍵)一下,然後輸入“Terminal“。
  2. 另一種方法是打開“Finder“, “Go to Folder…”/Applications/Utilities你應該找到“Terminal”在那裡。
  3. 按“F4”鍵 >> 打開文件夾”Other” / “其他” >> 點擊 Terminal 的圖標



How to Read/Write External Hard Drive / USB with NTFS on Mac OS X? (with Troubleshooting)

NTFS (New Technology File System) is a file system developed by Microsoft. FAT32, which is also commonly used, is another example of file system. They define and control how the data, or files, are stored and retrieved from a storage drive. However, Mac OS X supports NTFS read only, but not write, by default. There are software that can enable NTFS write. Yet, it is easy and free to enable the access by a few steps. Here is a complete guide.

1. Open “Terminal“.

There are 3 ways to open terminal.

  1. Open it via “Spotlight” on the top-right comer or “Cmd + Space” (default short-cut key), and type “Terminal“.
  2. Another way is to open “Finder“, “Go to Folder…”/Applications/Utilitiesand you should find “Terminal” there.
  3. Press “F4” >> open folder “Other” >> click the icon of Terminal

A new Terminal window should be prompted out. If you are a geek, I believe you need it quite often, keep it in Dock now~


你好, 世界!


我將會在此分享一些在學習或工作的心得,主要是關於計算機工程 / 計算機科學及科技相關資訊,包括:

      圖像處理 / 圖像分析
      科技産品 / 電子産品(如智能電話、平板電腦)知識


如果你喜歡本Blog,歡迎讚好我的Facebook Page 臉書專頁

Yumi Chan