mp4 文件 trak 解析

8.3 Track Structure
8.3.1 Track Box
8.3.1.1 Definition

Box Type: ‘trak’
Container: Movie Box (‘moov’)
Mandatory: Yes
Quantity: One or more
This is a container box for a single track of a presentation. A presentation consists of one or more tracks. Each track is independent of the other tracks in the presentation and carries its own temporal and spatial information. Each track will contain its associated Media Box. Tracks are used for two purposes: (a) to contain media data (media tracks) and (b) to contain packetization information for streaming protocols (hint tracks). There shall be at least one media track within an ISO file, and all the media tracks that contributed to the hint tracks shall remain in the file, even if the media data within them is not referenced by the hint tracks; after deleting all hint tracks, the entire un‐hinted presentation shall remain.

8.3.1.2 Syntax
aligned(8) class TrackBox extends Box(‘trak’) {
}

000005b0: 0000 0000 0000 0400 0002 2874 7261 6b00 ……….(trak.
000005c0: 0000 5c74 6b68 6400 0000 0300 0000 0000 ..\tkhd………

size 00 00 02 28 == 552

type 74 7261 6b trak