Difference between revisions of "PMP"

From MultimediaWiki
Jump to navigation Jump to search
 
 
Line 4: Line 4:


header:
header:
0-3  "pmpm"
  0-3  "pmpm"
4-7  1 (version?)
  4-7  1 (version?)
8-b  video format (0 = MPEG-4 ASP, 1 = H.264)
  8-b  video format (0 = MPEG-4 ASP, 1 = H.264)
d-f  number of packets (== number of frames?)
  d-f  number of packets (== number of frames?)
10-13 video width
10-13 video width
14-17 video height
14-17 video height
18-1b time base num
18-1b time base num
1c-1f time base den
1c-1f time base den
20-23 audio format (0 = MP3, 1 = AAC)
20-23 audio format (0 = MP3, 1 = AAC)
24-27 number of audio streams (all the same format)
24-27 number of audio streams (all the same format)
28-2b ??
28-2b ??
2c-2f ??
2c-2f ??
30-33 sample rate
30-33 sample rate
34-37 channels - 1?
34-37 channels - 1?
38-  list of packet sizes, 4 bytes each, lowest bit is keyframe flag
38-  list of packet sizes, 4 bytes each, lowest bit is keyframe flag
following: data packets
following: data packets


data packet:
data packet:
0  number of audio packets (per audio stream)
0  number of audio packets (per audio stream)
1-4 ?
1-4 ?
5-8 ?
5-8 ?
9-c length of video data
9-c length of video data
audio packet sizes, 4 bytes each
audio packet sizes, 4 bytes each
video data
video data
audio data, AAC packets lack 7 bytes of AAC header
audio data, AAC packets lack 7 bytes of AAC header

Latest revision as of 12:41, 4 November 2010

PMP format

All values are stored as little-endian

header:

 0-3   "pmpm"
 4-7   1 (version?)
 8-b  video format (0 = MPEG-4 ASP, 1 = H.264)
 d-f  number of packets (== number of frames?)
10-13 video width
14-17 video height
18-1b time base num
1c-1f time base den
20-23 audio format (0 = MP3, 1 = AAC)
24-27 number of audio streams (all the same format)
28-2b ??
2c-2f ??
30-33 sample rate
34-37 channels - 1?
38-   list of packet sizes, 4 bytes each, lowest bit is keyframe flag
following: data packets

data packet:

0   number of audio packets (per audio stream)
1-4 ?
5-8 ?
9-c length of video data
audio packet sizes, 4 bytes each
video data
audio data, AAC packets lack 7 bytes of AAC header