我們的客戶一直強調不可以播 Quick Time 格式. 但是什麼是 Quick Time 格式呢? 我 Google 了一下, 但是 keyword 不對, 怎麼也抓不到重點. 像是 "wiki quicktime" 這些都沒用. 唯一有用的 keyword 是 "quicktime spec.", 只有願意看規格的人才找得到答案.
Apple 認為 Quick Time 格式是 MPEG4 的基礎, 雖然 quick time 和 MPEG4 長得很像, 但是 Quick Time 是 Apple 的智慧財產權, 和 MPEG4 不能混為一談!如果因為長得很像, 就當做同一個東西的話, Apple 豈不是要和 MPEG-LA 分權利金了嗎?當然不行囉!
Important: The QuickTime File Format has been used as the basis of the MPEG-4 standard and the JPEG-2000 standard, developed by the International Organization for Standardization (ISO). While these file types have similar structures and contain many functionally identical elements, they are distinct file types.
QuickTime file format 由一個個的 atom 組成, 每個 atom 都和 MPEG-4 的 box 差不多. 再強調一次, 只是看起來很像…
Note: An atom, as described in this document, is functionally identical to a box, as described in the ISO specifications for MPEG-4 and JPEG-2000. An atom that includes version and flags fields is functionally identical to a full box as defined in those specifications.
對於一個典型的 MOV 檔, 它就是以 movie atom, movie data atom 所構成的 quick time file. 這個 movie atom 後面會跟著 4 bytes 的 atome size, 接著就是 4 個 byte 的 atom type. 當 atom type = ftyp, 那麼它可能就是一個 MPEG-4 或是 JPEG2000.
緊接在 ftyp 後面就是這個 atom 的 data, data 的開頭則可能是 major band.
Major_Brand
A 32-bit unsigned integer that should be set to 'qt ' for QuickTime movie files. If a file is compatible with multiple brands, all such brands are listed in the Compatible_Brands fields, and the Major_Brand identifies the preferred brand or best use.
所以 ftypqt 連在一起, 就是 quick time 的 MPEG04. 除了 major band 還有 compatible band, 它包含了 major band.
Compatible_Brands
A series of unsigned 32-bit integers listing compatible file formats. The major brand must appear in the list of compatible brands. One or more “placeholder” entries with value zero are permitted; such entries should be ignored.
如果 compatible band 沒有一個是 qt, 那麼這個 file 就不是 Quicktime movie. 因此, 判斷方式很明顯了. 就算附檔名看起來一樣, 檔案結構很相似, 但是有個明顯的標記區分著 QuickTime 和一般 MPEG4 或 MOV, 賴也賴不掉~~~
Note: A common source of this error is an MPEG-4 file incorrectly named with the .mov file extension or with the MIME type incorrectly set to “video/quicktime”. MPEG-4 files are automatically imported by QuickTime only when they are correctly identified as MPEG-4 files using the Mac OS file type, file extension, or MIME type.
[ref]