By Lucas, founder of FixMyVideos · Updated

Atomos Ninja or Shogun Recording Stopped: Recovering the ProRes File

A Ninja or a Shogun writes the index of a recording, the moov box, only when you press stop. If the battery runs flat, the D-tap cable pulls out or the unit locks up first, the SSD keeps a file that is the right size for the take and opens in nothing. Premiere, Resolve and QuickTime all need that index and refuse the file without it.

If the recorder kept writing until the power went, the pictures are still there. Below is the inside of one such file and the mistakes we made on its first recovery, then a few checks you can run before sending it to anyone, us included.

What a stopped Atomos recording contains

We took apart a 12.9 GB ProRes ISO recording from an Atomos recorder, 21 minutes 44 seconds at 25 fps, that had lost its index. Read from the start, the file was:

ftyp (32 bytes)  wide (8 bytes)  mdat (size 0 = "runs to end of file")
  464-byte recorder header
  13 ProRes frames
  one audio chunk, 150,016 bytes
  13 ProRes frames
  one audio chunk, 150,016 bytes
  ... 2,507 audio chunks in all ...
end of file, no moov

So the recorder interleaves its own way: a group of 13 frames, then the sound that goes with them (13 frames at 25 fps is 0.52 s). There were 32,600 frames on the disk, exactly 1,304 seconds of picture. Nothing had been lost from the recording itself; only the table of contents was missing.

Two details let us rebuild it without a reference clip. Each ProRes frame declares its own size in a short header just before its icpf marker, so the engine can walk the mdat frame by frame and know where each one ends; the same header names the encoder and the picture size, which is how a frame is recognised as part of the stream. And the 464 bytes the recorder leaves at the head of the mdat state the audio sample rate (48,000), the channel count and bit depth (2 channels, 24 bits), the audio format (in24), the picture size, the frame rate and the ProRes flavour. The frame headers do not carry the flavour. Before we read the recorder header, every index-less ProRes file came back labelled as ProRes 422; this one was 422 LT. The engine now takes the flavour and the frame rate from that header, and only trusts it when its picture size matches the frames.

Why the audio is the part that goes wrong

The picture of that 12.9 GB recording came back on the first attempt. The sound did not, and every automated check passed the broken delivery anyway.

The chunks are padded to the disk sector. The real audio in each chunk was 149,760 bytes (24,960 stereo 24-bit samples). The recorder writes whole 512-byte sectors, so it ran on to 150,016 bytes, and the extra 256 bytes were a copy of the start of the next chunk. Our filter at the time kept only chunks whose length was a whole number of audio samples, which 150,016 is not, so it dropped all 2,506 real chunks. What it kept instead was the 620,544-byte run at the very end of the take, the last small frames with the final audio chunk among them, because that run happened to have a sample-shaped length. The delivered file had a 2.15-second "soundtrack" made of picture bytes.

The fix trims the pad only where it can prove it: the end of one chunk has to match the start of the next, byte for byte, on pairs of chunks taken from across the file. Cutting each chunk down to the nearest whole sample instead would have kept 42 duplicated samples per chunk, a click at every seam and about 2.2 seconds of drift over a 21-minute take.

The samples are little-endian. Atomos writes 24-bit PCM with the low byte first (in24 with that byte order), and our camera database records it that way for the Ninja V and Ninja V+. Read in the wrong order, the audio has exactly the right length and is noise from start to finish. No duration check can see it. Listen to the preview before you pay: noise from the first second to the last is what a wrong byte order sounds like.

The sound sits after its pictures. Because the recorder flushes each audio chunk after the 13 frames it belongs to, picking preview audio by file position made the preview open 12 frames (0.48 s) behind the picture. The preview now cuts its audio from the same timeline as the full delivery; measured against the delivered file it lines up within 21 ms, which is the AAC encoder's start-up delay. The full file was never affected, because it lays every chunk end to end from zero.

On the corrected delivery the video stream is byte-identical to the frames in the source, all 32,600 frames decode, and the decoded audio (62,574,720 samples, 1,303.64 s) is byte-identical to the 2,507 chunk payloads with the pads removed. We have no clapperboard or healthy twin of that take, so lip sync rests on the file's layout (each chunk follows its 13 frames, and 2,507 × 13 accounts for all but the last 9 frames, the group the recorder never flushed) rather than on a measurement.

Black frames that looked like nothing

A ProRes frame of a black or static 1080p picture is about 22 KB. The detector used to ignore anything under 100 KB, to avoid mistaking a stray byte pattern for a frame. That had two effects. The black frames at the end of a take where the recorder lost its input were skipped. And one ISO from the same multicam shoot, a 1.1 GB file that had recorded black from the first frame to the last, was diagnosed as H.264 and its owner was asked for a reference clip it did not need.

Inside a stream the engine has already locked onto, a small frame is now accepted when its header repeats the encoder and picture size of the frames around it. A stream that opens on small frames needs more proof, so there the size each frame declares has to land exactly on the next frame header. That file now comes back as ProRes, all 32,600 frames, with its real audio. If your recorder was armed with no signal coming in, the recovery will be black too, because the recording is.

What you can try yourself first

  1. Copy the file off the SSD before anything else. Work on the copy and leave the drive alone; do not format it in the recorder or let anything "repair" it in place.
  2. Look at the size. A take that ran 20 minutes in ProRes should be gigabytes. If the file is tiny, or a few hundred megabytes for a long take, the data may never have been written.
  3. Run ffprobe yourfile.mov. "moov atom not found" is the expected answer for a recording that stopped early. If ffprobe reads it fine, the problem is somewhere else (the codec on your machine, or a damaged region in the middle), and our MOOV atom guide will not apply.
  4. Try untrunc if you have a healthy clip from the same unit, shot at the same resolution, frame rate and ProRes flavour. It rebuilds the index from that reference. Our untrunc comparison covers where it works and where it doesn't.
  5. Open the start of the file in a hex viewer. If everything after the first few dozen bytes is 00, or the same block repeats over and over, read the next section before paying anyone.

When a file cannot be recovered

Some files carry no recording at all, and no tool can put one back. The engine says so instead of offering a rescue:

  • All zeros. The file has its full size but holds no data. Either the recorder never wrote it, or the copy off the SSD failed.
  • Header only. We have seen a 24-byte upload that was a single ftyp box with nothing after it. There is no picture at any offset.
  • One block repeated. A failing card or reader can hand back the same sector for every read. We measured one upload of 20,971,520 bytes that held 12,288 bytes of distinct data. Copying the file again through a different reader is the only move that can still work.
  • Cut off almost at the start. If the take was stopped so early that the last, partial frame is a large share of everything present, there is not enough picture to rebuild.

In the first and third cases the original may still be readable on the SSD, so try another copy before giving up.

How the recovery works on our side

Upload the file, up to 150 GB. The engine reads the frames and the recorder header, rebuilds the index, and gives you a free 5-second preview with picture and sound, a few minutes after the upload finishes. The preview window is taken from near the start of the take, and on an interview that is often room tone: on the 12.9 GB recording above the preview sat at about -59 dB while speech, two and a half minutes in, was around -27 dB. A quiet preview is not necessarily a broken one.

If it is your take, you pay for the full file: €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; see our privacy page.

FAQ

Which Atomos recorders does this cover? The ones that write ProRes to an SSD in a MOV, which includes the Ninja V, Ninja V+ and the Shogun family. The recovery depends on what is in the file (ProRes frames and 24-bit PCM), not on the model name. We have mapped the recorder header from one recording so far; when a file's header does not match its frames, the engine ignores it and works from the frames alone.

My preview has no sound, or the sound is hiss. Should I change the audio settings? Please don't pay on a setting you guessed. One customer, hunting for sound on a preview that was silent because of the padding bug above, switched to 16-bit and paid; the delivery held 1,896 seconds of noise on 1,304 seconds of picture. The engine now flags a delivered audio track shorter than half the picture or more than 1.25 times its length, and the recorder header's audio settings now win over guesses. If the preview is silent, escalate the job from the repair page instead.

What about ProRes RAW? When the file still has its index, we have extracted Atomos ProRes RAW audio exactly (it is 4-channel, not stereo). A ProRes RAW take with no index is not something we have rebuilt successfully yet. Upload it and the diagnosis will tell you before you pay anything.

My take is larger than 150 GB. Can I still send it? The upload accepts files up to 150 GB. Long ProRes HQ or 4444 recordings on a Shogun can pass that, so check the size before you start.

Does it matter which camera fed the recorder? Not for the recovery. The recorder encodes whatever arrives over HDMI or SDI into ProRes, and the file layout is the recorder's.

Related

Upload your Atomos file

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 →