Repository navigation
1.6.0 — Cinema RAW: ARRIRAW, RED, X-OCN, CRM/CRL + per-frame metadata
Added
- ARRIRAW (MXF) — full slate / lens / camera / medium / frameline / LUT JSON harvest. ARRI cameras (ALEXA 35, ALEXA Mini LF, AMIRA, …) carry production-side metadata as a set of JSON documents wrapped in MXF KLV metadata sets (tag
0x807AMIME,0x807BJSON payload,0x807Cschema URL). NewARRIJSONParser.swiftdecodes the six well-known schemas —slate_info,camera_device,lens_device,recording_medium,frameline,custom_lut3d_design— and surfaces them viaCameraMetadata.userMeta*.MXFReaderroutes ALEXA-codec MXF clips through this path;FormatDetectorreportsarrirawso consumers can distinguish ARRI MXFs from generic broadcast MXF. - Sony X-OCN (MXF + NRT AcquisitionRecord) — VENICE / BURANO / F55 / F65 cinema RAW. Format detection routes
.mxfclips with the X-OCN essence descriptor through a deep harvest of the embeddedNonRealTimeMetaXML (camera attributes, ISO, shutter angle, gamma, gamut, monitoring transform, ASC CDL, roll/tilt sensor metadata). Surfaces alongside ARRIRAW underFileFormat = XOCN. Tested against VENICE 8K samples (8664×5784, ISO 3200, ShutterAngle 173°, full ASC CDL). - Canon Cinema RAW Light (.CRM / .CRL) — clip + per-frame CTMD metadata. New
CRMReader.swiftrecognises the Canon-flavored ISOBMFF (brandcrx+ Canon UUID), exposesFileFormat = CRM, and decodes the CTMD timed-metadata sample groups for ISO, shutter time, focal length, aperture, white balance, and per-frame lens metadata across both the CRAW master format and the proxy CRL. - RED RAW (.R3D) — REDCODE clip metadata. New
R3DReader.swiftparses the RED2 atom and decodes OBKM / RDLG metadata (lens model, slate, sensor, codec). Verified against KOMODO Chroma Key and V-RAPTOR LUT samples. - Nikon RAW Video (.R3D, codec
NR3D) — N-RAW detection. Nikon Z8 / Z9 N-RAW recordings happen to use the.R3Dextension but are an ISOBMFF derivative (ftyp niko, codecNR3D), not REDCODE. Format dispatch sniffs the magic bytes to pick the right reader; misnamed files in "RED RAW" folders no longer get misclassified. - Sony RTMD per-frame attributes + IMU export.
RTMDReaderalready surfaced clip-level summaries; the newrtmd-framesCLI subcommand walks everyrtmdsample and emits one of three CSV streams —attributes(frame-level ISO, exposure, F-number, focal length, white balance, GPS, date-time, serial),gyroscope(timestamp + pitch/roll/yaw), oraccelerometer(timestamp + xyz). Verified against Sony A1 / FX3 / FX30 footage at 2 kHz IMU sampling.
Changed
MP4Parser.swiftdecomposed (no behavior change). The 3,277-line monolith is now split along its existingMARK:boundaries into five files held together byextension MP4Parser:MP4Parser.swift(477 lines) — top-level dispatch,mvhd, format detectionMP4UserData.swift(775) —udta/meta/ilst, GPS©xyz, XMP/NRT uuid, BRAW per-framebmdfheaderMP4VisualSampleEntry.swift(557) —stsdvisual entry, codec configs (avcC/hvcC/av1C/vvcC/dvcC/dvvC), HDR side-data (mdcv/clli), ProRes/APV FourCC defaultsMP4AudioSampleEntry.swift(290) —stsdaudio entry,chan,esdsMP4TrackParser.swift(881) —trakwalking,tkhd/mdhd/edts, timecode-track decodingMP4Chapters.swift(364) — Nerochpl, QuickTimetref→chap, sample-table helpers shared withRTMDReader/BRAWFrameReader
6.9× reduction in the main file. Verified by diffing the JSON read sweep over 332 mixed video / image files in the local corpus before and after — output is byte-identical.
Fixed
- Linux cross-compile broken by the ARRIRAW commit.
CFNumberIsFloatTypeis CoreFoundation, Apple-only — swift-corelibs-foundation doesn't ship it, so the static-musl Linux builds failed at the ARRI JSON slate stringifier added in af31434. Replaced with a Swift cast-order check (as? Int64first; otherwise format as%g), preserving observable output on both platforms. - Phase26
--maptest asserted lowercaseXMP-dc:title/:descriptionwhile ExifTool-conventional capitalization (XMP-dc:Title/:Description) had already landed in 3374496. Test now asserts the canonical form.
Tests
1478 tests, 0 failures (26 skipped). Verified end-to-end across the local corpus:
- 47 images (jpg / arw / cr3 / heic / jxl) read sweep — 0 errors
- 64 videos (8 X-OCN, 12 MXF, 2 ARRIRAW, 2 RED, 1 Nikon RAW, 3 BRAW, 2 CRM, 18 MP4, 11 MOV, …) — 0 errors
- 3/3 BRAW clips × 821 per-frame rows
- 7/7 RTMD-bearing clips × ~27k attribute rows + ~1.1M IMU samples each
- MCA labels match the bmx
labels.txtground truth byte-for-byte - macOS arm64 + Linux aarch64 + Linux x86_64 binaries all return identical metadata for image / X-OCN / BRAW spot checks
Binaries
This release ships three CLI binaries:
swift-exif-macos-arm64(5.7 MB, Mach-Oarm64,-O+WMO)swift-exif-linux-aarch64(24 MB, static ELF muslaarch64,-Onone)swift-exif-linux-x86_64(26 MB, static ELF muslx86_64,-Onone)
Linux binaries tested on alpine:3.20 for both arches.