EN ES FR

Unsupported Browser

This page probably won't work great in Internet Explorer. We generally only support the recent versions of major browsers like Chrome, Firefox, Safari and Edge.

This page was written a few years ago

Some information needs to be updated, we will do it soon.

Please accept our apologies for not having up-to-date information about this topic.

Nevertheless, we keep offering repair services for this type of damaged footage — with same level of quality as ever — and we will continue to do so in the future.

Feel free to tell us about the content you would like to see in the revised page, using the feedback widget at the end of the page.

AIFF is an audio container format, still used as a standard for data exchange. It contains uncompressed audio data.
Check Wikipedia article for general information: http://en.wikipedia.org/wiki/AIFF

AIFF files usually contain raw PCM audio (8, 16 or 24 bits, mono or stereo, at any sampling rate)
This old format is very simple: it uses a short header with a nested atoms structure. Main atoms FORM, AIFF, COMM, CHAN, MARK, APPL, SSND.

FORM atom contains COMM and SSND, raw audio is inside SSND atom. Nested atoms are like boxes.

If you look inside an AIFF file with an hex editor, we can read the file header:

0000000: 464f 524d 0000 8ed2 4149 4646            FORM....AIFF
FORM and AIFF atoms identify the file format as AIFF. Between FORM and AIFF, we have 0x8ED2, the length in bytes of the payload of FORM. Since FORM is the top atom, payload is the rest of the file, so our length corresponds to the file size minus 8.
000000c: 434f 4d4d 0000 0012 0001 0000 4340 0010  COMM........C@..
000001c: 400d ac44 0000 0000 0000                 @..D......
Next comes a COMM atom, length 0x12 bytes, containing audio configuration and duration:
  • 0x01 = 1 channel (mono)
  • 0x10 = 16 bits
  • 0x4340 = number of samples of audio in audio track (17126 samples)
  • 0xAC44 = 44100 bytes/seconds, or 22050 Hz since it's 16 bits (2 bytes per sample)
We can calculate duration of audio: 17126 samples at 22050 Hz gives us 0.78 second.
0000026: 5353 4e44 0000 8688 0000 0000 0000 0000  SSND............
0000036: 0084 007b 0035 0055 0014 fff1 000e fffe  ...{.5.U........
0000046: 002f 0060 0073 00b5 00cf 00f8 011c 0144  ./.`.s.........D
0000056: 0166 0171 0177 015e 014f 0131 00fa 00bc  .f.q.w.^.O.1....
0000066: 00a4 0090 008a 0097 0097 00a6 009f 00aa  ................
Finally, SSND atom contains the PCM raw data. Note that length 0x8688 corresponds to 2 x 0x4340 + 8: Payload consists of 8 bytes of padding followed by 17126 audio samples.

How to fix a corrupt AIFF file?

The easiest way is certainly to ask our Treasured Repair Service to do it for you.
But for those who are not afraid of using an Hex editor and want to experiment a bit, use this technique:

Success rate: High
Technique used: Container Structure Correction
Tools: Hex editor

If the file is damaged and doesn't open, it's probably because some atoms in the file header are not properly written. If a live recording session has crashed or hanged, the following atoms will not have the proper value set:

  • FORM must be followed by (file length - 8), encoded on 32-bits (little endian)
  • SSND must be followed by remaining file length, encoded on 32-bits (little endian)
  • Inside COMM, at address 0x16, encoded on 32 bits, is the number of audio samples.

In this example, our 3 values are set to 0 because recording did not end gracefully. If we enter the correct values, audio will be playable.

0000000: 464f 524d 0000 0000 4149 4646 434f 4d4d  FORM....AIFFCOMM
0000010: 0000 0012 0002 0000 0000 0010 400d ac44  ............@..D
0000020: 0000 0000 0000 5353 4e44 0000 0000 0000  ......SSND......
0000030: 0000 0000 0000 ffd4 ffd7 ffd6 ffd9 ffca  ................
0000040: ffcd ffc5 ffcb ffc2 ffc8 ffc6 ffcb ffc3  ................

  • File size is 429794 bytes (0x68EE2), so length after FORM is 0006 8EDA.
  • Length after SSND is 0006 8EB4 (429794 - 46).
  • Number of audio samples is calculated this way:
    COMM indicates 2 channels, 16 bits, so we need 4 bytes per sample. PCM payload has (429794 - 46 - 8) = 429740 bytes, or 107435 samples. Therefore, the value to enter at address 0x16 is 107435 (0x1A3AB).

The repaired header looks like this:

0000000: 464f 524d 0006 8eda 4149 4646 434f 4d4d  FORM....AIFFCOMM
0000010: 0000 0012 0002 0001 a3ab 0010 400d ac44  ............@..D
0000020: 0000 0000 0000 5353 4e44 0006 8eb4 0000  ......SSND......
0000030: 0000 0000 0000 ffd4 ffd7 ffd6 ffd9 ffca  ................
0000040: ffcd ffc5 ffcb ffc2 ffc8 ffc6 ffcb ffc3  ................

Don't forget to add one of those extensions to the file name: .aif or .aiff

Try Treasured on your damaged files!

Our service offers:

  • FREE diagnostics and preview with Treasured
  • FREE sample of repaired video
  • Try before you buy with a FREE trial of your Repair Kit
  • Enjoy FREE customer support by speaking directly with our trained experts
  • Invaluable expertise, dedication and second to none customer service
Video Repair app online

Treasured

Video Repair — online

Mac, Windows, Linux

CLICK TO DOWNLOAD APP
app.aeroquartet.com
Click to try