Skip to content

MXF: skip essence via partition index; report display rectangle (3.0.3) - #2

Merged
aagedal merged 3 commits into
mainfrom
t3/mxf-partition-skip
Oct 22, 2026
Merged

aagedal merged 3 commits into
mainfrom
t3/mxf-partition-skip

Conversation

@aagedal

@aagedal aagedal commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Skip MXF essence via the partition index. The KLV walk used to visit every essence KLV (~10 per frame in frame-wrapped XAVC/XDCAM), issuing small reads across the whole file. It now uses the Random Index Pack (or the footer's PreviousPartition chain) to jump from a partition's first essence KLV to the next partition. Essence KLVs are no longer peeked, and the NRT/ARRI fallback scan is bounded to the header metadata. Files without a valid partition index keep the full walk.
    • 16 GB Sony FX9 XAVC clip: 7.5 s → 0.02 s on SSD. Large MXFs in iCloud Drive: 14–86 s → ~0.2 s.
    • Fixes Aagedal Media Converter camera-card imports where probes missed the 15 s deadline on slow cards and clips showed "No video metadata".
  • Report the MXF display rectangle. XAVC 1080p stores 1920x1088 (macroblock padding). Using StoredHeight gave 1088 and a 136:135 SAR; it now matches ffprobe (1920x1080, 1:1).
  • Bump to 3.0.3 (CLI version, README, CHANGELOG, checklist).

Testing

  • Scripts/verify-release.sh 3.0.3 passes locally (1677 library tests, 50 CLI tests, archive build).
  • New tests: RIP-based skip, footer-chain skip without RIP, invalid-RIP fallback, display vs stored rectangle.
  • Metadata output is identical to 3.0.2 for 63 local MXF files (Sony XAVC/XDCAM card clips, FX6, Avid, DJI, Premiere transcodes), apart from the 1080 fix. All 41 video MXFs match ffprobe width/height/SAR.

🤖 Generated with Claude Code

aagedal and others added 3 commits October 22, 2026 15:43
Frame-wrapped XAVC/XDCAM files carry ~10 KLVs per frame, so the KLV walk
issued reads across the whole file. Use the Random Index Pack (or the
footer PreviousPartition chain) to jump from a partition's first essence
KLV to the next partition, skip essence without peeking, and bound the
NRT/ARRI fallback scan to the header metadata.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XAVC/AVC-Intra 1080p descriptors store 1920x1088 (macroblock padding) with
a 1920x1080 display rectangle. Using the stored height produced 1088 and a
136:135 SAR; ffprobe reports 1920x1080 1:1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aagedal
aagedal merged commit 74794cf into main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant