Reprinted please indicate the source and the author contact: http://blog.csdn.net/mimepp
Contact information: Yu Tao <yut616 at Sohu dot com>
Cover Art in MP4 video format
Keywords: MP4, cover art, covr, iTunes, album art
After processing the cover art diagram in the MP4 file, check the information and take a note here.
At present, many MP4 videos contain a movie description image, which is mainly the video of iTunes and stored in MP4 format.
The corresponding tag is "covr"
Format description:
Box types are cover art = 'covr '; iTunes specific info = '----'
* 8 + bytes Apple item data box
= Long unsigned Offset + long ASCII text string 'data'
-> 4 bytes version/flags = byte hex version + 24-bit hex flags
(Current version = 0; contains text flag = 0x000001
Contains data flag = 0x000000; For tmpo/cpil flag = 0x000015
Contains image data flag = 0x00000d)
-> 4 bytes reserved = 32-bit value set to zero
-> Annotation text or data values = text or Hex dump
(Note: genre is either text or a 16-bit short ID3 value and
Most other non-text data are short unsigned values
With the exception of compilation which is a byte flag)
Example:
63 6f 76 72 00 00 8C 0C 64 61 74 61 00 00 00 00 00 00 89 50 4E 47 0d 0a 1A 0a 00 00 00 00 0d 49 48 44
Covr | Len | data | ver, flags | reserved2 | picture-Data
4 bytes 4 bytes 4 bytes 1 byte, 3 bytes 4 bytes 35836 bytes
35852 bytes
Type covr
Type data
Version = 0 (0x00)
Flags = 0 (0x000000)
Reserved2 = <4 bytes> 00 00 00
Metadata = <35836 bytes>
89 50 4E 47 0d 0a 1A 0a 00 00 00 0d 49 48 44 52
8C 0C = 35852 = 16 + 35836 = Len + "data" + Ver + flags + reserved2 + 35836
Reference connection:
1. Tag format description:
Http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt
2. MP4 test file, indiancrow160.mp4:
Http://www.ncsu.edu/it/multimedia/mpeg4.html
3. tool:
Apt-Get install mpeg4ip-utils easytag-AAC hexedit
Mp4art: save cover art as an image directly
Mp4dump: Dump an MP4 tag to a file.
Easytag: you can add a cover art image to MP4.
Hexedit: View MP4 binary
4. Lib
Mpeg4ip: www.mpeg4ip.net
Atomicparsley: http://atomicparsley.sourceforge.net/