By Lucas, founder of FixMyVideos · Updated
Recover a Corrupted Blackmagic RAW (.braw) File
A Blackmagic camera set to Blackmagic RAW writes each clip as a .braw file, from the Pocket Cinema Camera 4K up to the PYXIS and URSA Cine bodies. When the camera loses power or the card comes out before you press stop, the frames written before the cut are normally still on the card, and at most the frame being written is lost. On the power-cut file we measured, that was exactly one frame, 70% written. What it lacks is the index the camera writes at the very end, and without that index DaVinci Resolve and Blackmagic RAW Player have nothing to open.
What a .braw file is made of
A .braw uses the QuickTime box layout, but the pictures inside are Blackmagic's own RAW codec. The file has two parts that matter here.
The first is the media: one long mdat box holding the frames, the sound and, on newer bodies, the gyro and accelerometer stream, written as the camera records. Each frame starts with its own size field, a bmdf block of per-frame metadata and a braw header. That header names the camera family, the coded resolution and the recording mode. Sound is 24-bit PCM, written as one chunk per second.
The second is the moov box, written only when the clip is stopped cleanly. It lists where every frame and sound chunk sits, the frame rate, and the clip-level settings: the codec tier (constant quality Q0 to Q5, or constant bitrate 3:1 to 12:1), the colour science generation, the gamma, the crop window the decoder should use.
Cut the power mid-take and the media is on the card, frame after frame, but the moov never gets written. Every Blackmagic decoder reads the moov first, so the file looks dead even though nearly all of it is intact.
Check these before you assume the worst
A healthy BRAW won't play in VLC or QuickTime either. ffmpeg cannot decode BRAW, and neither can the players built on it, so only Blackmagic's software (DaVinci Resolve, Blackmagic RAW Player, and apps using the Blackmagic RAW SDK) will show you these pictures. Test the clip in one of those before deciding it is broken.
If Blackmagic RAW Player does nothing when you open the clip, that proves nothing about the file. It happened to us on a Mac while checking a rebuilt file. The Player had been open for hours, received every open request and showed no window, for good files as well as the one under test, and a fresh instance played all of them. Quit the Player fully with Cmd+Q, make sure no copy is left running, then open the clip again.
Copy the clip off the card before you try anything, and work on that copy. Keep the card untouched and out of the camera until you know what you have. If you can still read the clip straight off the card, upload that one. If the only copy you have came out of card-recovery software, upload it anyway, because the engine looks for the runs those tools splice in. One of the two files further down was such a copy.
Don't read the recording length from the file size either. Cameras reserve space on the card while recording, so a 12.0 GB upload we rebuilt held 7.05 GB of recording, followed by 4.97 GB of zeros the card had set aside and never filled.
What the engine does with a .braw that has no index
The rebuild is container-only. No frame is decoded, re-encoded or altered.
- Walk the chain. Starting at the first frame, the engine reads each size field and jumps to the next structure: a frame, a sound chunk or a motion-data chunk. Every byte has to be accounted for, or the walk stops and says where.
- Drop what the power cut left unfinished. A frame's size is written with its header, so the last frame can claim more bytes than ever reached the card. On the URSA Cine file below, the final frame stated 2.3 MB and only about 70% of it was written before the card's zeros began. A frame like that is left out.
- Rebuild the
moov. The sample tables (where each frame and sound chunk sits, how long each lasts) are computed from the walk. The clip-level description comes from a template derived from a real clip of the same camera family and recording mode. We tested this on public Pocket 4K clips with theirmoovcut off. Rebuilt from another clip's template, every sample table came out identical to the camera's own. Rebuilt from the clip's own description, the wholemoovwas byte-identical. - Decode with Blackmagic's own decoder. Our server runs the Blackmagic RAW SDK. The 5-second preview is decoded with it from an excerpt built the same way as the delivery, which we measured pixel-identical to the full rebuild. The delivered
.brawis also decoded frame by frame with the SDK, sound included, and the result is recorded. What you get back is a.brawthat decodes in the Blackmagic RAW SDK and plays in Blackmagic RAW Player.
Templates are what decide which files get an automatic preview today, and each one covers particular recording modes rather than a whole camera. We have them for some modes of the URSA Cine 12K LF, the PYXIS 12K and the Pocket Cinema Camera 4K (4K DCI and UHD, not HD). The walk itself is not tied to a camera model, so the diagnosis can still count the frames of a clip shot in another mode or on another body. With no template, though, there is no description to give the decoder. Those files are not previewed: the diagnosis asks for your email and a person on our team takes the rebuild over. The diagnosis tells you which case you are in.
Two BRAW files we rebuilt
A URSA Cine 12K LF take, 4K 16:9 at 24 fps, cut by a power loss. The 12.0 GB upload was told "no recognisable frames" before we added this lane. It held 2,947 whole frames, 122 seconds of sound and the camera's gyro and accelerometer records, plus the unfinished frame described above. The rebuilt 7.05 GB .braw decodes 2,947 of 2,947 frames in the Blackmagic RAW SDK on Linux and on a Mac, and plays in real time in Blackmagic RAW Player. We measured sync on a clap in the take. It closes in frame 239, and the sound onset falls at frame position 238.57, less than one frame apart.
A Pocket Cinema Camera 4K take, UHD at 29.97 fps, 687 MB, from card-recovery software. This one was not a power cut. The camera had finished the clip, but the copy we received had 16.9 MB of foreign data (15 MiB of zeros, then something else) sitting in the middle of frame 152. Our first walk stopped there and reported 151 frames. The engine now cuts such a run out and rejoins the frame, but only after checking that the run is whole sectors long, that the frame's two halves add up to its stated size, and that the frame count of that second matches the sound. The take came back at 263 frames, all 263 decoded by the SDK, with all 384,000 sound samples read. The end of the take, about 6 frames and the last 0.8 s of sound, was past the end of that copy and is lost.
Rebuilding that file also exposed a bug of ours: at 23.976, 29.97 and 59.94 fps the sound track's length came out 1,001 times too short, so a decoder read 8 ms of an 8-second track. It was fixed before any such file was delivered.
What we cannot do
- Bytes damaged inside a frame stay damaged. We copy frames as the camera wrote them. If a frame's own data is corrupt, the rebuild does not repair it.
- The look is borrowed when we use a template. Colour science generation, gamma and the codec tier label come from the template's camera, not from your settings. Resolve lets you change the colour science generation and gamma in the RAW tab.
- A gap of zeros smaller than about 8 MiB is walked through. If a card-recovery tool replaced part of the recording with zeros, the frames after it are kept but play slightly early against the sound.
- Foreign data that does not start with zeros is not detected. Only a spliced run that opens with zeros is found and cut.
- Off-speed clips come back at the sensor rate. The project frame rate lives only in the
moov, so a moov-less off-speed clip plays its frames at capture speed. - Sound written after the last frame is lost. Some first-generation layouts store their sound chunks after the picture. Without the
moov, that sound is not recovered.
When there is nothing to recover
These classes apply to any camera, BRAW included, and the diagnosis says so instead of offering a preview:
- All zeros. We have examined uploads that were 0x00 from the first byte to the last. The name and size looked real; the recording was never in the file.
- A header and nothing else. A 24-byte upload holding a single box with no media behind it.
- One block repeated. A 20 MB file carrying 12,288 bytes of distinct data, because the reader kept returning the same sectors. The first thing to try is copying it again through a different reader or card slot.
Trying it on your file
Upload the .braw, up to 150 GB. The diagnosis tells you within a few minutes how many whole frames and how much sound the file holds and whether anything had to be cut out. If your clip's recording mode has a template, you then get a free 5-second preview decoded with Blackmagic's own decoder; other modes go to a person. It is watermarked and shown in the file's flat Film look, which is how the clip opens in Resolve. If you keep the file, it costs €6 under 2 GB, €18 from 2 to 20 GB, €35 from 20 to 50 GB and €59 above that, VAT included. Uploads are deleted automatically after 48 hours.
FAQ
Will DaVinci Resolve open the rebuilt file?
The delivered .braw is decoded frame by frame with Blackmagic's own RAW SDK, and our URSA Cine rebuild plays in Blackmagic RAW Player. Resolve itself was not part of our measurements.
Is anything re-encoded? No. The frames and the PCM sound are the camera's own bytes, in their original order. Only the index is new. The preview is an H.264 encode for your browser; the delivery is not.
My camera or recording mode has no template. Is it worth uploading? Yes, if you want to know what the file holds, since the diagnosis counts whole frames and seconds of sound whatever the body. The rebuild is then done by a person, so leave an email when the page asks for one.
Should I run a generic MP4 repair tool on it first? No. Tools built around ffmpeg cannot decode BRAW, so they cannot tell whether their output works, and a tool that writes back to the card can destroy the frames you still have. Work on a copy if you try anything.
Does a healthy clip from the same camera help? The engine can use a healthy clip in place of a template when its frame headers match your file exactly, and then the rebuild carries your camera's own settings. The page does not ask for one, and we cannot promise a given clip will match.
Is my footage safe? It is processed on our servers, deleted automatically after 48 hours, and never shared or used for training. Details in the privacy policy.
Related
- DaVinci Resolve cannot decode or shows Media Offline
- MOOV atom not found: what it means
- Recover ProRes files
- Atomos Ninja recording stopped
Free preview · No commitment
Ready to recover your video?
Upload your file and get a free 5-second preview in about a minute. Pay only if the preview looks right.
Upload your file →