A lightweight, native macOS SwiftUI desktop app that automatically detects black letterbox and pillarbox bars in MKV files using ffmpeg (cropdetect) and removes them losslessly in-place by editing Matroska pixel-crop-* headers with mkvpropedit.
- Zero re-encoding — updates only the four
pixel-crop-left/right/top/bottomheader tags ontrack:v1in milliseconds (display-width,display-height, anddisplay-unitare left untouched). - Safe multi-timestamp detection & Deep Scan — standard scan samples across
20%,50%,80%(10 s each); Deep Scan (per-file or Deep Scan All) scales intervals by video duration (10intervals ≤ 25 min,+1per 15 min past 25 min, skipping 5% intro / 8% credit tails, or a full-video pass on short clips) and extracts up to 5 representative preview frames including any outlier scenes. - Smart Deep Scan suggestions — automatically flags Variable AR (IMAX shifts), subtle film-transfer gate-weave / edge jitter (≥ 4 px), or pure-black standard samples with a 1-click Run Deep Scan recommendation.
- Codec-accurate re-scanning — uses
-apply_cropping codecso H.264/HEVC macroblock padding (e.g.,1088 → 1080) is handled accurately while ignoring existing container crop flags. - Visual verification, fine-tuning & batch Crop All — previews SAR-corrected frames with dimmed bars, crisp crop boundaries, live
±2 pxmanual offset steppers, a before-and-after Matroska header diff, and 1-click Crop All (automatically skippingNo Bars,Error, and unconfirmedVariable ARfiles). - 1-Click Undo / Restore — records original
pixel-crop-*header states locally (distinguishing absent vs. explicit0elements via a pure-Swift EBMLSeekHeadreader) so edits can be reversed cleanly even after restarting. - Native macOS 15+ & macOS 26 Liquid Glass — built in pure Swift 6 + SwiftUI with Universal Binary (
arm64+x86_64) support.
Download the latest Universal .dmg (CropBlock-<version>-universal.dmg) from GitHub Releases, open it, and drag Crop Block into /Applications.
Optional checksum verification:
shasum -a 256 -c CropBlock-<version>-universal.dmg.sha256GitHub Release builds are ad-hoc signed without a paid Apple Developer ID certificate. On first launch, macOS Gatekeeper may display an "unidentified developer" or "damaged" warning for quarantined downloads.
You can allow the app in either of two ways:
- Terminal (fastest):
xattr -cr /Applications/CropBlock.app
- System Settings: Try opening Crop Block, then open System Settings → Privacy & Security, scroll to Security, and click Open Anyway.
Crop Block delegates media probing and lossless MKV header editing to local copies of ffmpeg, ffprobe, and mkvpropedit. Install both packages with Homebrew:
brew install ffmpeg mkvtoolnixIf any binary is missing when you launch Crop Block, a non-blocking Tool Setup sheet walks you through installing via Homebrew or browsing to custom binaries.
Binary lookup priority (ToolResolver):
- Explicit custom paths set in Settings → Tools
- Bundled helpers in
CropBlock.app/Contents/Helpers/(when present) - Homebrew (
/opt/homebrew/bin,/usr/local/bin) and$PATH
Crop Block edits standard Matroska PixelCropLeft, PixelCropRight, PixelCropTop, and PixelCropBottom header elements on track:v1 without touching the encoded video bitstream or DisplayWidth/DisplayHeight/DisplayUnit.
| Player / Client | Matroska PixelCrop* Support |
|---|---|
| mpv / IINA (mpv-based) | Supported |
| MPC-BE | Supported |
| Kodi | Supported |
| VLC, web browsers, many smart TV / streaming clients | Improper Playback |
A future bitstream cropping backend (
h264_metadata/hevc_metadata) is accounted for in theCropBackendprotocol architecture for players that ignore container crop headers.
Requirements: macOS 15+ (Xcode / Swift 6.2+ toolchain; macOS 26 SDK recommended for Liquid Glass icon compilation).
# Run Swift Testing unit & integration tests
swift test
# Build and install ~/Applications/CropBlock.app
./build.sh --open# Default: Universal Binary (arm64 + x86_64), ad-hoc signed, outputs dist/CropBlock-<version>-universal.dmg + .sha256
./scripts/release.shOptional release flags:
VERSION=1.0.0— override release version string.BUNDLE_HELPERS_DIR=/path/to/helpers— embed self-containedffmpeg,ffprobe, andmkvpropeditintoContents/Helpers/.DEVELOPER_ID="Developer ID Application: ..."— sign with Hardened Runtime instead of ad-hoc.NOTARY_PROFILE="your-profile"— submit signed DMG toxcrun notarytooland staple (requiresDEVELOPER_ID).
Sources/CropBlockKit/— Pure-Swift, SwiftUI-free core library (CropCalculator,MatroskaHeaderReaderwithSeekHeadEOF support,ToolResolver,ProcessRunner,CropDetectRunner,FrameExtractor,MKVFileDiscovery,CropBackend+MKVHeaderCropBackend,BatchApplyPlanner,ReceiptStore).Sources/CropBlock/— Native macOS SwiftUI app (NavigationSplitViewqueue & detail workspace, SAR-corrected preview canvas, manual offset steppers, 4-tab Settings, Tool Setup sheet, Player Compatibility popover).Tests/CropBlockKitTests/— Swift Testing unit and liveffmpeg/mkvpropeditround-trip tests.
Fully made using Gemini 4 Neon Extra High.
Copyright © 2026 MobiusGT.
Crop Block is free software licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for the full license text.



