r/blackmagicdesign • u/laurentchicoine • 1h ago
Tool to shrink BRAW footage for Archival
Hey all. I shoot a lot on a BMPCC 4K and keep everything in a cloud provider which was recently full. So I built braw-pack, a free, open-source tool for Windows and Linux that allows to compress BRAW footage while keeping BRAW capabilities. I shoot a lot of sports where I'm not always able to dial these in properly, so losing that flexibility would have been far from ideal.
It does two things:
1. Archive. It packs a .braw clip into a compact archive (MKV in a special format). Later you unpack it back into a normal .braw that opens in Resolve with ISO, white-balance control, highlight recovery, gyro data, timecode and sound intact.
2. Smaller BRAW. It re-saves a clip as a regular .braw, as if the camera had recorded it at a stronger compression setting. For example, a Q3 clip becomes the equivalent of 12:1. There’s nothing to unpack, and it opens anywhere BRAW does.
Real numbers from my own clips (default settings):
| Clip | Original | Archive | Detail kept |
|---|---|---|---|
| Q3 clip, 5.9:1 | 2.19 GB | 174 MB (8%) | 96.7% |
| 10.9:1 clip | 1.65 GB | 386 MB (23%) | 97.4% |
| Smaller BRAW (Q3 clip, 2.19 GB) | Size | Detail kept |
|---|---|---|
| → 12:1 | 1.08 GB | 99.1% |
| → 18:1 | 743 MB | 98.0% |
“Detail kept” compares real picture structure with the original. Random sensor noise is mostly left out of it, more on that below. An Estimate button tries several quality levels on your clip before you commit.
Honest caveats:
- It’s lossy. A rebuilt clip is very close to the original, not identical. Keep your originals until you’ve checked it in your own workflow.
- The default archive mode smooths fine sensor noise, a bit like light noise reduction. There’s a “Keep sensor noise” option that preserves it, but the files get several times bigger.
- Only tested on Pocket Cinema Camera 4K clips, Q5 and Q3. A clip it doesn’t fully understand is refused before anything is written.
- Fast mode needs an NVIDIA GPU. Without one it uses the CPU, which works but is much slower.
- Your source files are never modified or deleted.
GitHub (download on the Releases page): https://github.com/laurentchicoine/braw-pack
Feedback is very welcome, especially from people with other Blackmagic cameras.
🤓 Nerd section: how BRAW works and why this is possible
What’s actually inside a .braw frame
BRAW isn’t “raw” like a DNG full of Bayer pixels. Each frame is already compressed, roughly JPEG-like:
- The picture is split into tiles, and each tile into 16×8 macroblocks. Each macroblock holds two 8×8 “luma” blocks and two 8×4 “chroma” blocks, each run through a DCT (the same transform as JPEG).
- The DCT coefficients are divided by a quantisation table of 96 entries stored in every frame. That table is essentially what the Q-settings and ratios change.
- The quantised values are packed with variable-length codes (DC values plus run-length-coded AC values, with an end-of-block code).
- What gets transformed is still in sensor space: no white balance, ISO or colour science is applied. Those are metadata, applied by the decoder. That’s why you can change them in post.
- Every frame stands on its own (intra-only). There’s no prediction between frames.
How “Smaller BRAW” works
It never decodes the picture. It reads each block’s quantised coefficients, re-quantises them with a coarser table, and re-codes them. That’s exactly what the camera does at a higher ratio. The coarsening is tilted so the finest frequencies go first, which gives a smooth range of sizes. The DC value (each block’s average) is never touched, which is why it tops out around 25–30:1.
Everything else in the file is copied byte for byte: sound, timecode, gyro and accelerometer data, per-frame camera metadata. Every new frame is read back and checked before the file gets its final name.
How the archive works
- It undoes only the entropy coding and the DCT. That gives three 12-bit planes with 4:2:0 geometry, still in sensor space.
- Those planes are stored as H.265 video: NVIDIA NVENC at 10 bits, or x265 on the CPU at 12 bits.
- The big win is that BRAW is intra-only, while H.265 predicts each frame from its neighbours. Most of a typical shot barely changes from one frame to the next, so it compresses enormously.
- Everything that isn’t picture is kept losslessly in the archive (a
.mkv): the original index, sound, timecode, motion data, camera metadata and the.sidecarfile. - To rebuild, it decodes the H.265, runs the forward DCT, quantises with a table it measured while packing (the coarsest one that loses nothing the archive still has), re-codes the frames, and reassembles the original container.
Safety checks
- Before packing, every frame must survive a decode → re-encode bit for bit. Otherwise the clip is refused.
- After packing, every frame of the archive is compared with its source, and an archive that fails is discarded.
Why the archive looks green
If you play the .mkv directly, you’re looking at raw sensor planes, so it looks green and flat. braw-pack can optionally fit a per-clip 3D LUT (.cube):
- It asks Blackmagic’s own decoder (from an installed Blackmagic RAW) for a few reference frames, then fits a 65-point LUT that maps the archive’s look to the as-shot decode.
- On frames held out of the fit it lands at about 49–56 dB, so you can view or rough-cut archives without unpacking.
- It can’t recover highlights or change ISO later. Unpack for that.
Credits
The bitstream work builds on the public FFmpeg BRAW decoder patches by Paul B Mahol (2019) and Lynne (2025). braw-pack is MIT-licensed, except a few LGPL files derived from those patches. It’s not affiliated with Blackmagic Design.