Preface
Preambule
The purpose of this documentation is to describe the Digital Cinema Package (DCP) as comprehensively as possible.
Started naively in 2020 , this documentation began as a collection of technical tips and information I have been using for years (probably since the early days of the DCI). This documentation aims to be, at last , a compilation of my own research on Digital Cinema, especially about DCP, all in one place.
Since the early release of the DCI specifications (2004-2005), getting information about DCP and its details is really complicated (above all because of standards not publicly available). Everyone who implements the standards has never explained to less knowledgeable people.
This documentation is intended for experts and beginners :
Beginners : a quick and easy understanding of what a DCP is.
Experts : avoid having to read thousands of pages of the SMPTE standards
This documentation doesn't claim to be perfect, its may have mistakes, omissions or lack of understanding :
If you have technical or historical skills and you find mistakes or omissions, do not hesitate to report them .
If you are a beginner and some paragraphs seem unclear, do not hesitate to report them as well
If you have in mind a new potential subject or a missing one, do not hesitate to request it.
This documentation doesn't aim to be a translation of SMPTE standards or DCI specifications : They are too vast, it would be counterproductive to do that, especially because they often change.
This documentation aims to be evolving and updated over time : this is not a static documentation, it evolves to add new technological features and updates to the SMPTE standards. Keep an eye on changelog .
The Source code through this documentation doesn't aim to be "best practices of coding" , they are intentionally oversimplified, in order to understand each step. I don't like documentation with complicated source code that only experts can understand. In my point of view, it's a bad way for the original author to prove their own expertise. If you find any unclear source code, report it, I will try to simplify further. This source code aims to have a second purpose : to be used and integrated into any other source code or project. It's like a library of ready-to-use source code, or snippets.
Tools and prototypes
During the writing of this documentation, I needed some tools, so I wrote them concurrently. You may see their outputs throughout some chapters. In addition, you may find some lighter versions of these tools to help with understanding. You can take a look in the assets directory , you will find small software and source code.
Below, a brief description of these main tools.
To be clear, at this time, these tools are only proof-of-concept, they need a complete rewriting.
However, they are functional for the purpose of this documentation.
It's a MXF analyzer, it provides several options, such as analyzing and extracting data and metadata from MXF files.
The project is now available in the github repository : https://github.com/sherpadown/mxf-reader/
$ mxf_analyzer.py --help
-h, --help show this help message and exit
-f FILENAME, --filename FILENAME = mxf filename
-x EXTRACT, --extract EXTRACT = extract each KLV into files
-k KEY, --key KEY AES Key, ex. --key 00000000000000000000000000000000
-v, --verbose increase output verbosity
-n, --no-resolv Do not resolv UL (speed)
--filter FILTER filter by name
--fuzzy Fuzzy mode only (very slow)
--limit LIMIT stop after x klv parsed
--slow Slowdown parse to avoid flood loadavg
# mxf_analyzer.py -f 2D.mxf
offset │ uuid │ ber : data-size │ data │ name
0 │ 060e2b34.02050101.0d010201.01020400 │ 83.000078: 120 │ 00010002000000010000000000000000 │ Partition Pack - Header - Closed & Complete
140 │ 060e2b34.02050101.0d010201.01050100 │ 83.000596: 1430 │ 0000004f000000120201060e2b340101 │ Primer Pack
1590 │ 060e2b34.02530101.0d010101.01012f00 │ 83.0000be: 190 │ 3c0a0010aaffbd07420e44a2b3f87d3c │ Preface
1800 │ 060e2b34.02530101.0d010101.01013000 │ 83.0000d8: 216 │ 3c0a0010c00c5d91bc1b4e58aefabf33 │ Identification
2036 │ 060e2b34.02530101.0d010101.01011800 │ 83.00005c: 92 │ 3c0a0010acc6d12cda0c465b861a1c33 │ Content Storage
2148 │ 060e2b34.02530101.0d010101.01012300 │ 83.000048: 72 │ 3c0a0010bf8a6ebc3aca4164a47e45e0 │ Essence Container Data
2240 │ 060e2b34.02530101.0d010101.01013600 │ 83.0000a0: 160 │ 3c0a001096b13153bd5d4cd29abcd608 │ Material Package
2420 │ 060e2b34.02530101.0d010101.01013b00 │ 83.000070: 112 │ 3c0a0010005ea82d6afb4a37aae4d74b │ Timeline Track
2552 │ 060e2b34.02530101.0d010101.01010f00 │ 83.000050: 80 │ 3c0a00108afb9187a608464f85713462 │ Sequence
2652 │ 060e2b34.02530101.0d010101.01011400 │ 83.00004b: 75 │ 3c0a00108fe911af95d4464e9e794651 │ Timecode Component
2747 │ 060e2b34.02530101.0d010101.01013b00 │ 83.00006e: 110 │ 3c0a0010f8427198af884d4f8c9855f3 │ Timeline Track
2877 │ 060e2b34.02530101.0d010101.01010f00 │ 83.000050: 80 │ 3c0a0010e2bfd055e5d249a0bfcb4da8 │ Sequence
2977 │ 060e2b34.02530101.0d010101.01011100 │ 83.00006c: 108 │ 3c0a00106daf21bab69a41c99ec54f4f │ Source Clip
3105 │ 060e2b34.02530101.0d010101.01013700 │ 83.000116: 278 │ 3c0a0010b87f0871f98446d39a842893 │ Source Package
3403 │ 060e2b34.02530101.0d010101.01013b00 │ 83.000070: 112 │ 3c0a00106378d2218be746d28508fedf │ Timeline Track
3535 │ 060e2b34.02530101.0d010101.01010f00 │ 83.000050: 80 │ 3c0a001075ef53606937484a9ee14472 │ Sequence
3635 │ 060e2b34.02530101.0d010101.01011400 │ 83.00004b: 75 │ 3c0a001059cf1ad86f314b5db0164871 │ Timecode Component
3730 │ 060e2b34.02530101.0d010101.01013b00 │ 83.00006e: 110 │ 3c0a0010d4e733700afb45329cc796c6 │ Timeline Track
3860 │ 060e2b34.02530101.0d010101.01010f00 │ 83.000050: 80 │ 3c0a0010e2f035aa64684a7f98eddfa7 │ Sequence
3960 │ 060e2b34.02530101.0d010101.01011100 │ 83.00006c: 108 │ 3c0a0010c93d2257b09a4dbea24c782e │ Source Clip
4088 │ 060e2b34.02530101.0d010101.01012900 │ 83.0000bd: 189 │ 3c0a00102cb46505be6b41c3abbe8848 │ RGBA Essence Descriptor
4297 │ 060e2b34.02530101.0d010101.01015a00 │ 83.0000b5: 181 │ 3c0a00106054268f8fdf47ba98db7167 │ JPEG2000 Picture Sub-Descriptor
4498 │ 060e2b34.01010102.03010210.01000000 │ 83.002e5a: 11866 │ 00000000000000000000000000000000 │ KLV Fill item (SMPTE)
16384 │ 060e2b34.02050101.0d010201.01030400 │ 83.000078: 120 │ 00010002000000010000000000004000 │ Partition Pack - Body - Closed & Complete
16524 │ 060e2b34.01020101.0d010301.15010801 │ 83.009cc8: 40136 │ ff4fff51002f00040000100000000870 │ Picture Essence - 1 frame
56680 │ 060e2b34.02050101.0d010201.01040400 │ 83.000078: 120 │ 0001000200000001000000000000dd68 │ Partition Pack - Footer - Closed & Complete
56820 │ 060e2b34.02530101.0d010201.01100100 │ 83.000083: 131 │ 3c0a00101c86aa0136fb414ebcd47120 │ Index Table Segment (2-bytes LocalTags, 2-bytes Length)
With more verbosity :
# mxf_analyzer.py -f 2D.mxf
offset │ uuid │ ber : data-size │ data │ name
0 │ 060e2b34.02050101.0d010201.01020400 │ 83.000078 : 120 │ 00010002000000010000000000000000 │ Partition Pack - Header - Closed & Complete
╓────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
║ Major Version ║ 1
║ Minor Version ║ 2
║ KAGSize ║ 1
║ ThisPartition ║ 0
║ PreviousPartition ║ 0
║ FooterPartition ║ 56680
║ HeaderByteCount ║ 16244
║ IndexByteCount ║ 0
║ IndexSID ║ 0
║ BodyOffset ║ 0
║ BodySID ║ 0
║ Operational Pattern ║ 060e2b34.04010102.0d010201.10000000 (Operational Pattern - Specialized Pattern - OP Atom - SMPTE)
║ EssenceContainers ║ 2 item(s): 060e2b34.04010103.0d010301.027f0100, 060e2b34.04010107.0d010301.020c0100
║ Resource [1] ║ SMPTE.ST.0377-1-2011 - MXF - File Format Specification - page 41-44-46
╙────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
140 │ 060e2b34.02050101.0d010201.01050100 │ 83.000596 : 1430 │ 0000004f000000120201060e2b340101 │ Primer Pack
╓────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
║ 0201 ║ 060e2b34.01010102.04070100.00000000 - Statically Local Tags - Data Definition
║ 0202 ║ 060e2b34.01010102.07020201.01030000 - Statically Local Tags - Duration
(...)
A (very-very) lighter version of MXF analyzer is available here : https://github.com/sherpadown/js-mxf/ (demo )
A (very) quick & dirty Universal Label parser.
$ ul "060e2b34020401010d010301027e0100"
SMPTE UL Format 060e2b34.02040101.0d010301.027e0100
Hex Format (lower) 06.0e.2b.34.02.04.01.01.0d.01.03.01.02.7e.01.00
Hex Format (upper) 06.0E.2B.34.02.04.01.01.0D.01.03.01.02.7E.01.00
Hex Format (small) 060e2b34020401010d010301027e0100
────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────
name Encrypted Essence Container (SMPTE)
parser essence_encrypted
resource SMPTE.ST.0429-6-2006 - DCP - MXF Track File Essence Encryption, Page 10
───────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────
UL Header (2 bytes) 060e
UL Designator (6 bytes) 2b3402040101
Item Designator (8 bytes) 0d010301027e0100
──────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────
1 - Object ID 06
2 - UL Size 0e (14 bytes)
3 - ISO/ORG Identifier / UL Code 2b
4 - SMPTE Designator 34
5 - Category Designator 02 (Groups - Sets & Packs)
6 - Registry Designator 04 (Variable-Length Pack) - [Length=BER short/long] (All Length)
7 - Structure Designator 01 (Set/Pack Registry)
8 - Version 01
─────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────
9 - Item Designator 0d
10 - Item Designator 01
11 - Item Designator 03
12 - Item Designator 01
13 - Item Designator 02
14 - Item Designator 7e
15 - Item Designator 01
16 - Item Designator 00
An Immersive Audio Bitstream analyzer for IAB assets, such as Dolby Atmos, DTS-X, Barco Auro assets.
The project is now available in the github repository: https://github.com/sherpadown/iab-reader/
Usage: iab-analyzer.py <IAB data> or <IAB directory>
┌────────────────────────────────────────────────────────────────────────────────────────────────────
│▐━━━━ IABitstream Frame ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━▐ [1]
│───── Preamble ──────────────────────────────────────────────────────────────────────── [1]
│ PreambuleTag : 0x01
│ PreambuleLength : 1603 bytes
│ PreambuleValue : 11010effffffffffffffffffffffffff(...1571 bytes...)ffffffffffffffffffffffffffffffff
│───── IAFrame ───────────────────────────────────────────────────────────────────────── [1]
│ IAFrameTag : 0x02
│ IAFrameLength : 44501 bytes
│ IAFrameValue : 08ffadd10110529bff0200ff020e6402(...44469 bytes...)0173ffc1bfffc0300000200000000500
│───── IAElement ─────────────────────────────────────────────────────────────────────── [1]
│ ElementID : 0x08 (IAFrame: Frame Header)
│ ElementSize : 0xadd1 (44497 bytes)
│ SubElementValue : 0110529bff0200ff020e64020b12d0202aad16adb68b4ab6daa55b4ab4aa0a2a(..) (44497 bytes)
┌ ┌────────────────────────────────────────────────────────────────────────────────────────────────────
│ │▐━━━━ IAFrame ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━▐ [2]
│ │ IAVersion : 1
│ │ SampleRate : 0b00 (48000 Hz)
│ │ BitDepth : 0b01 (24 bits)
│ │ FrameRate : 0x0 (24 fps)
│ │ MaxRendered : 0x52 (82 bytes)
│ │ AlignBits(0)
│ │ SubElementCount : 0x9b (155 elements)
┌ ┌ ┌────────────────────────────────────────────────────────────────────────────────────────────────────
│ │ │───── SubElement 0 ──────────────────────────────────────────────────────────────────── [3]
│ │ │ SubElementID : 0x0200 (Audio Data DLC Encoded)
│ │ │ SubElementSize : 0x020e (526 bytes)
│ │ │ SubElementValue : 64020b12d0202aad16adb68b4ab6daa55b4ab4aa0a2a96d5156d55aab6db6d5b(..) (526 bytes)
┌ ┌ ┌ ┌────────────────────────────────────────────────────────────────────────────────────────────────────
│ │ │ │▐━━━━ Audio Data DLC ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━▐ [4]
│ │ │ │ AudioDataID : 100
│ │ │ │ DLCSize : 523 bytes
│ │ │ │ DLCSampleRate : 48000 Hz
│ │ │ │ ShiftBits : 9
│ │ │ │ ────── Predictor Informations ─────
│ │ │ │ NumPredRegions : 0b01 (1 regions)
( .. .. .. )
A JPEG2000 DCI 2K/4K images analyzer.
The project is now available in the github repository: https://github.com/sherpadown/jpeg2000-reader/
# jpeg2000-parser.py <file.j2c> <fileN.j2c> ...
read file.j2c
[SOC] Start of codestream (FF4F)
[SIZ] Image and tile size (FF51)
SIZ - rsiz : Profile 4
SIZ - Xsiz : 4096 px
SIZ - Ysiz : 1716 px
( . . . )
[COD] Coding style default (FF52)
COD - Scod : 01 Binary Parameters: 00000001
COD - Progression order : 04 Binary Parameters: 00000100
COD - Number of Layers : 1
COD - Multiple Component Transform : 01 00000001
COD - Decomposition levels : 6
COD - CodeBlockSize : 32 x 32
( . . . )
[QCD] Quantization default (FF5C)
QCD - Sqcd (Scalar coefficient dequantization), Quantization style for all components: 00100010
QCD - Sqcd binary parameters (bit1-3): Number of guard bits 0—7: 0b001 ─➤ 1 bits
QCD - Sqcd: 0b00010 ─➤ Scalar explicit
QCD - SPqcd (Exponent+Mantissa), Quantization step size value sub-band 0:
─➤ SPqcd : 0111111100010110 (0x7f16)
─➤ Mantissa : 01111 : 15
─➤ Exponent : 11100010110 : 1814
( . . . )
[CME] Comment and extension (FF64)
CME - Registration values 1: Text ISO 8859-1
CME - Text: Created with Doremi Labs DMS2000 SN70062 server v1.8.0. Src0.
( . . . )
[POC] Progression Order Change (FF5F)
POC - [2K] RSpoc (Resolution Start) : 0 (0x00)
POC - [2K] CSpoc (Component Start) : 0 (0x00)
POC - [2K] LYEpoc (Layer) : 1 (0x0001)
POC - [2K] REpoc (Resolution End) : 6 (0x06)
POC - [2K] CEpoc (Component End) : 3 (0x03)
POC - [2K] Ppoc (Progression Order) : 4 (0x04)
POC - [4K] RSpoc (Resolution Start) : 6 (0x06)
( . . . )
[TLM] Tile-part lengths, main header (FF55)
TLM - Ztlm: Index of this marker segment: 0
TLM - Stlm: Size of the Ttlm and Ptlm parameters: 01010000
TLM - Stlm Bit-Parameters: SP = 1; Ptlm parameter 32 bits
TLM - Stlm Bit-Parameters: ST = 1; Ttlm parameter 8 bits
TLM - Ttlm - Tile number of tile-part 1: 0
TLM - Ptlm - Length SOT+SOD of tile-part 1: 190 bytes
( . . . )
[SOT] Start of tile-part (FF90)
SOT - Isot, Tile number : 0
SOT - Psot, Length of SOT+SOD : 190
SOT - TPsot, Tile-part number : 0
SOT - TNsot, Number of tile-parts : 6
( . . . )
[SOD] Start of data (FF93)
data: 176 bytes : eff07ffe0fc0115054afff5574bcab4000000000000c2425ff69dc40000000000309097fe4a5400000000061212ffc94a8000000000c2425ff494a8000000000c2425ffd3c115054afff5574bcab4000000000000c2425ff69dc40000000000309097fe4a5400000000061212ffc94a8000000000c2425ff494a8000000000c2425ffd3c8080808080808080808080808080808080808080808080808080808080808080808080808080808080808080
( . . . )
Conclusion
Go back to table of contents of this documentation.