MPL

From MultimediaWiki
Jump to navigation Jump to search
  • Extensions: mpl, mpls
  • This is a playlist file used in BluRays and AVCHD (Lite) video camcorders and foto cams.

Please correct or beautify the language used in this article!

This site tries to collect information about this file. This information partly comes from reverse engineering. There is no free specification available on the net.

The file is located in a directory structure like this:

/BDMV/PLAYLIST/00000.MPL

it corresponds with the files in this directory:

/BDMV/STREAM/00000.MTS

The following information are reverse engineered from MPL files from a Panasonic GH1 foto cam.

The following file sizes are known:

  • 638 bytes
  • 800 bytes
  • 962 bytes
  • 1124 bytes
  • 1286 bytes
  • 1448 bytes
  • 1772 bytes
  • 2096 bytes
  • 2420 bytes

The difference in size is always a multiple of 162 bytes.

File Structure

The values are written only when they are equal in every file.

Header
 M2TS File Meta Data [1]
 M2TS File Meta Data [2]
 ...
 Next Part 1
 Next Part 2 [1]                only there when more than one file is described in this document
 Next Part 2 [2]
 ...
 PLEX Part
 Next Part 3
 Video Part [1]
 Video Part [2]
 ...
 Trailer

Header

char[4] 'MPLS'            FOURCC?
char[4] '0100'            might be version number
char[4] {0, 0, 0, 0x3A}
char[2] {0, 0}
char[2]                   this corresponds with the file size
char[2] {0, 0}
char[2]                   this corresponds with the file size differs from the former one
char[12] {0, 0, ...}
char[8] {0, 0, ...}
char[4] {0, 0, 0, 0x0E}
char[4] {0, 1, 0, 0}
char[4] {0, 0, 1, 0xCF}
char[4] {0x40, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[2]                    this corresponds with the file size
char[2] {0, 0}
char[2] {0, X}             file size = 476 + 162*X in bytes
char[2] {0, 0}

M2TS File Meta Data ?

This part ist contained X-times and is 82 bytes in size. The corresponding M2TS file name on the Panasonic is 00012.MTS.

char[2] {0, 'P'}
char[10] "00012M2TS"       this is a null terminated string of the corresponding MTS file name (without dot '.')
char[4] {1, 0, 0, 0}
char[2] {0x40, 0x74}
char[2]
char[2]
char[2] {0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0x2E}
char[4] {0, 0, 1, 1}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 9, 1}
char[4] {0x10, 0x11, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {5, 0x1B, 0x43, 0}
char[4] {0, 0, 9, 1}
char[4] {0x11, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {5, 0x81, 0x31, 0x75}
char[2] {0x6E, 0x64}

Next Part 1

unknown contents

char[4] {0, 0, 0, A}                         A corresponds with file size
char[4] {0, B, 0, 1}                         B = number of described MTS files
char[4] {0, 0, 0, 0}
char[4] {0x40, 0x74, 0xFF, 0xFF}

Next Part 2

This part is 14 bytes in size. One of this parts is inlcuded for each file description. Except when only on file is described.

char[4] {0, 0, 0, 0}
char[4] {0, 1, 0, A}             A = number of description
char[4] {0, 0, _, _}
char[2] {0xFF, 0xFF}

PLEX Part

unknown contents

char[4] {0, 0, 0, 0}
char[4] {0, _, _, _}                        
char[4] {0, 0, 0, 0x18}
char[4] {0, 0, 0, 1}
char[4] {0x10, 0, 1, 0}
char[4] {0, 0, 0, 0x18}
char[4] {0, 0, _, _}
char[4] 'PLEX'
char[4] {0, 0, 0, 0}
char[4] {0, 0, 01, 0x44}
char[4] {0, 0, _, _}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 1, 0x18}
char[4] {1, 3, 5, 0x18}
char[4] {0, 0, 0, 0}
char[2] {0xFF, 0xFF}

Next Part 3

This part is 276 bytes in size.

char[1] {0x1E}
char[1] {C}                  C = BCD (Century)
char[1] {D}                  D = BCD (Decade)
char[1] {E}                  E = BCD (Month)
char[1] {F}                  F = BCD (Day)
char[1] {G}                  G = BCD (Minute)
char[1] {H}                  H = BCD(Second)
char[2] {0x90, 0x0A}  or  {0x90, 0x0C}
char[11]                     date as string (null terminated; no time) e.g. "2010. 4.18"
char[4] {0, 0, 0, 0}
...
char[4] {0, 0, 0, 0}         
...
char[4] {0, 0, 0, 0}         
char[1] {0, _, 0, A}         A = number of Video Parts following

Video Part

This part contains time stamps of the corresponding MTS file. Right before the first occurance of one of such part is a char that tells how many such parts are following.

This part is 66 bytes in size.

char[4] {1, 3, 5, 0x81}
char[4] {0, 0, 0, 0}
char[2] {A, B}               (A<<8 + B).MTS = 00012.MTS, A=0, B=0x0C; 
char[1] {0x1E}
char[1] {C}                  C = BCD (Century)
char[1] {D}                  D = BCD (Decade)
char[1] {E}                  E = BCD (Month)
char[1] {F}                  F = BCD (Day)
char[1] {G}                  G = BCD (Minute)
char[1] {H}                  H = BCD(Second)
char[2] {0x90, 0x0A} or {0x90, 0x0C}
char[11]                     date as string (null terminated; no time) e.g. "2010. 4.18"
char[2] {0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0, 0, 0, 0}
char[4] {0x11, 0x10, 0, 0}
char[4] {0, I, J, _}         I = 0x65 or 0x66; J=2 for SH or 0 for FHD
char[1] {0x03}
char[3] 'FHD'; 'SH\0'        video format
char[4] {0, 0, 0, 0}
char[4] {0xFF, 0xFF, 0xFF, 0xFF}
char[2] {0, 0}

A and B tell the name of the corresponding MTS file e.g. (A<<8 + B).MTS = 00012.MTS, A=0, B=0x0C

Trailer

This part is 50 bytes in size.

char[4] {0, 0, 0, 0}
char[4] {_, _, _, _}
...
char[4] {_, _, _, _}
char[4] {0, 0, 0, 0}
char[2] {0, 0}

Definitions

BCD
Binary Coded Decimal
_
unknow but different in different files
FHD
Full HD Quality (1080p25)
SH
Super High Quality (720p50)