Skip to content

Instantly share code, notes, and snippets.

@AGFeldman
Created May 14, 2023 18:46
Show Gist options
  • Save AGFeldman/c484bad40cf1fbe79c6c7ac88c42f836 to your computer and use it in GitHub Desktop.
Save AGFeldman/c484bad40cf1fbe79c6c7ac88c42f836 to your computer and use it in GitHub Desktop.
~> python3.11 parse_cr3.py EYA_0236.CR3
00000:ftyp: major_brand=b'crx ', minor_version=1, [b'crx ', b'isom'] (0x18)
00018:moov: (0xd2f8)
00020: uuid: b'85c0b687820f11e08111f4ce462b6a48' (0xca18)
00038: CNCV: b'CanonCR3_001/00.11.00/00.00.00' (0x26)
0005e: b'CCTP' b'000000000000000100000003000000184343445400000000' (0x5c)
0003a: b'CCDT' b'00000000000000100000000000000001' (0x18)
00052: b'CCDT' b'00000000000000010000000000000002' (0x18)
0006a: b'CCDT' b'00000000000000000000000000000003' (0x18)
000ba: CTBO: (0x70)
1 d310 10018
2 1d328 67c38
3 84ff0 27c616a
4 0 0
5 0 0
0012a: b'free' b'000000000000' (0xe)
00138: 00340: 00948: 08950: 09158: THMB: width=160, height=120, jpeg_size=0x38c6 (0x38e0)
0ca38: b'mvhd' b'00000000e085bca3e085bca3000000010000000100010000' (0x6c)
0caa4: b'trak' b'0000005c746b686400000007e085bca3e085bca300000001' (0x1f4)
0caac: b'tkhd' b'00000007e085bca3e085bca3000000010000000000000001' (0x5c)
0cb08: b'mdia' b'000000206d64686400000000e085bca3e085bca300000001' (0x190)
0cb10: b'mdhd' b'00000000e085bca3e085bca3000000010000000115c70000' (0x20)
0cb30: b'hdlr' b'000000000000000076696465000000000000000000000000' (0x21)
0cb51: b'minf' b'00000014766d686400000001000000000000000000000024' (0x147)
0cb59: b'vmhd' b'000000010000000000000000' (0x14)
0cb6d: b'dinf' b'0000001c6472656600000000000000010000000c75726c20' (0x24)
0cb75: b'dref' b'00000000000000010000000c75726c2000000001' (0x1c)
00010: b'url ' b'00000001' (0xc)
0cb91: b'stbl' b'000000807374736400000000000000010000007043524157' (0x107)
0cb99: b'stsd' b'000000000000000100000070435241570000000000000001' (0x80)
00010: CRAW: (0x70)
width=6960, height=4640, bits=24
0005a: b'JPEG' b'00000000' (0xc)
00066: b'free' b'0000' (0xa)
0cc19: b'stts' b'00000000000000010000000100000001' (0x18)
0cc31: b'stsc' b'0000000000000001000000010000000100000001' (0x1c)
0cc4d: b'free' b'00000000000000' (0xf)
0cc5c: stsz: version=0, size=0x0, count=1 (0x18)
0x37dd34
0cc74: b'free' b'00000000' (0xc)
0cc80: co64: version=0, count=1 (0x18)
0x85000
0cc98: b'trak' b'0000005c746b686400000007e085bca3e085bca300000002' (0x258)
0cca0: b'tkhd' b'00000007e085bca3e085bca3000000020000000000000001' (0x5c)
0ccfc: b'mdia' b'000000206d64686400000000e085bca3e085bca300000001' (0x1f4)
0cd04: b'mdhd' b'00000000e085bca3e085bca3000000010000000115c70000' (0x20)
0cd24: b'hdlr' b'000000000000000076696465000000000000000000000000' (0x21)
0cd45: b'minf' b'00000014766d686400000001000000000000000000000024' (0x1ab)
0cd4d: b'vmhd' b'000000010000000000000000' (0x14)
0cd61: b'dinf' b'0000001c6472656600000000000000010000000c75726c20' (0x24)
0cd69: b'dref' b'00000000000000010000000c75726c2000000001' (0x1c)
00010: b'url ' b'00000001' (0xc)
0cd85: b'stbl' b'000000e4737473640000000000000001000000d443524157' (0x16b)
0cd8d: b'stsd' b'0000000000000001000000d4435241570000000000000001' (0xe4)
00010: CRAW: (0xd4)
width=1624, height=1080, bits=24
0005a: CMP1: (0x3c)
00096: CDI1: (0x34)
00048: IAD1: (0x28)
000ca: b'free' b'0000' (0xa)
0ce71: b'stts' b'00000000000000010000000100000001' (0x18)
0ce89: b'stsc' b'0000000000000001000000010000000100000001' (0x1c)
0cea5: b'free' b'00000000000000' (0xf)
0ceb4: stsz: version=0, size=0x0, count=1 (0x18)
0x1a6de0
0cecc: b'free' b'00000000' (0xc)
0ced8: co64: version=0, count=1 (0x18)
0x402e00
0cef0: b'trak' b'0000005c746b686400000007e085bca3e085bca300000003' (0x268)
0cef8: b'tkhd' b'00000007e085bca3e085bca3000000030000000000000001' (0x5c)
0cf54: b'mdia' b'000000206d64686400000000e085bca3e085bca300000001' (0x204)
0cf5c: b'mdhd' b'00000000e085bca3e085bca3000000010000000115c70000' (0x20)
0cf7c: b'hdlr' b'000000000000000076696465000000000000000000000000' (0x21)
0cf9d: b'minf' b'00000014766d686400000001000000000000000000000024' (0x1bb)
0cfa5: b'vmhd' b'000000010000000000000000' (0x14)
0cfb9: b'dinf' b'0000001c6472656600000000000000010000000c75726c20' (0x24)
0cfc1: b'dref' b'00000000000000010000000c75726c2000000001' (0x1c)
00010: b'url ' b'00000001' (0xc)
0cfdd: b'stbl' b'000000f4737473640000000000000001000000e443524157' (0x17b)
0cfe5: b'stsd' b'0000000000000001000000e4435241570000000000000001' (0xf4)
00010: CRAW: (0xe4)
width=6960, height=4640, bits=24
0005a: CMP1: (0x3c)
00096: CDI1: (0x44)
00048: IAD1: (0x38)
000da: b'free' b'0000' (0xa)
0d0d9: b'stts' b'00000000000000010000000100000001' (0x18)
0d0f1: b'stsc' b'0000000000000001000000010000000100000001' (0x1c)
0d10d: b'free' b'00000000000000' (0xf)
0d11c: stsz: version=0, size=0x0, count=1 (0x18)
0x2284bf0
0d134: b'free' b'00000000' (0xc)
0d140: co64: version=0, count=1 (0x18)
0x5a9c00
0d158: b'trak' b'0000005c746b686400000007e085bca3e085bca300000004' (0x1b8)
0d160: b'tkhd' b'00000007e085bca3e085bca3000000040000000000000001' (0x5c)
0d1bc: b'mdia' b'000000206d64686400000000e085bca3e085bca300000001' (0x154)
0d1c4: b'mdhd' b'00000000e085bca3e085bca3000000010000000115c70000' (0x20)
0d1e4: b'hdlr' b'00000000000000006d657461000000000000000000000000' (0x21)
0d205: b'minf' b'0000000c6e6d6864000000000000002464696e660000001c' (0x10b)
0d20d: b'nmhd' b'00000000' (0xc)
0d219: b'dinf' b'0000001c6472656600000000000000010000000c75726c20' (0x24)
0d221: b'dref' b'00000000000000010000000c75726c2000000001' (0x1c)
00010: b'url ' b'00000001' (0xc)
0d23d: b'stbl' b'0000005c7374736400000000000000010000004c43544d44' (0xd3)
0d245: b'stsd' b'00000000000000010000004c43544d440000000000000001' (0x5c)
00010: CTMD: (0x4c)
0d2a1: b'stts' b'00000000000000010000000100000001' (0x18)
0d2b9: b'stsc' b'0000000000000001000000010000000100000001' (0x1c)
0d2d5: stsz: version=0, size=0x1c95a, count=1 (0x14)
0x1c95a
0d2e9: b'free' b'00000000000000' (0xf)
0d2f8: co64: version=0, count=1 (0x18)
0x282e800
0d310:uuid: b'be7acfcb97a942e89c71999491e3afac' (0x10018)
1d328:uuid: b'eaf42b5e1c984b88b9fbb7dc406e4d16' (0x67c38)
1d348: PRVW: width=1620, height=1080, jpeg_size=0x67bfb (0x67c18)
84f60:b'free' b'000000000000000000000000000000000000000000000000' (0x90)
84ff0:b'mdat' b'ffd8ffdb008400060404060404060604' (0x27c616a)
warning CMDT type:16842759/7 size:0x178a/0x178a
warning CMDT type:16842760/8 size:0x1a136/0x1a136
warning CMDT type:16842761/9 size:0x1032/0x1032
Traceback (most recent call last):
File "/Users/agf/Desktop/canon_cr3/parse_cr3.py", line 379, in <module>
if TiffIfd.TIFF_CANON_VIGNETTING_CORR2 in ctmd_makernote7.ifd:
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ifd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment