We have audio recorded as IMA4 file, and stored with incorrect headers, causing audio completely distorted. I am trying to fix the headers, to see if I can recover the audio. I tried with ffmpeg, hex editor, I am no expert there, so seeking community help for any ways to recover the audio.

Sample distorted audio attached

Incorrect Headers that is set currently -

    format.mSampleRate = NGAudioCommon.sampleRate
    format.mFormatID = kAudioFormatAppleIMA4
    format.mChannelsPerFrame = 1

Correct Headers that we want to set -

format.mSampleRate = 11025
format.mFormatID = kAudioFormatLinearPCM
format.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked
format.mBytesPerPacket = 2
format.mFramesPerPacket = 1
format.mBytesPerFrame = 2
format.mChannelsPerFrame = 1
format.mBitsPerChannel = 16
format.mReserved = 0

Will be of much help, if any help to recover the attached audio.

New contributor
Deepak Raj is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.


Your Answer

Deepak Raj is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.