Link to home
Start Free TrialLog in
Avatar of TedMorey
TedMoreyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Accessing corrupt m4a audio file

Hi - I was recording an interview with my iPhone 5 when after about 75 minutes into it someone called my phone. Although an m4a audio file was created (it's about 29MB in size) and I am able to copy it to my computer, my usual audio editor (AVS Audio Convertor) is telling me that the file is corrupt and it won't play in Windows Media Player when double clicked (although other m4a files do). Any ideas how I can get at the contents of this file? Cheers Ed
Avatar of BillDL
BillDL
Flag of United Kingdom of Great Britain and Northern Ireland image

You are aware that the M4A file type is just a "container" or "wrapper" and that the audio content inside it could be of any number of encodings.  Not knowing this, we can't really be certain whether an interrupted recording is missing header data or perhaps significant "markers" that need to be read by software.  It is possible that the file is still in a "temp" stage, never having been properly saved.

The first application I would normally install to see if it plays the file would be VLC Player.  It supports a wide variety of formats natively using its own codecs, and might just play the file.  If so, you can then play it and use the streaming option to "record" it out to a new file, or else set the input source of any other audio recording software to your sound card and record the audio as VLC Player plays it back.

Just be careful after installing VLC Player not to associate it with any of your commonly used file types or else some files that formerly opened in eg. Windows Media Player will then open in VLC Player when double-clicked.  It normally shows a file association preferences dialog during setup, but if not you can do so post-setup:
Tools > Preferences > Interface > (scroll down) > Click "Set Up Associations" button.
Untick those you don't want associated > Click "Apply" > click "Save" back in main Preferences window.

Even if you have no file associations ticked, you can open the audio file from the Media menu > Open File option.

If you don't intend keeping the application, then you may also wish to de-select the following options in the Preferences:
Interface > Deselect "updates" and set album art to "manual download"
Audio > "submit last played tracks to last.fm

Let us know how you get on.
Avatar of TedMorey

ASKER

Hi BillDL - thanks for the comprehensive response, much appreciated. Unfortunately VLC player wouldn't play the play. It looked like it was going to for a split second but the start / end times went blank. I agree with your supposition that the file is missing header / marker info - is there a way to get at the raw audio data inside the file??? Cheers Ed
Pity about that Ed, I had my fingers crossed.
I've successfully transposed good header data from a good JPG image file to a corrupt JPG image using a hex editor a few times, but it was time consuming trial and error stuff using some notes from an expert in the field, and I have a feeling that the audio file might be considerably more complicated given that the actual (probably) AAC audio content is effectively wrapped in an M4A blanket.

I have to confess that I'm not at all familiar with iPhones and how deeply you can delve into the filing structure using interface software, nor exactly how the recording process works, but here's a shot in the dark.  Could it be possible that, like many PC processes, an empty shell file is created as the destination one and it is then populated in stages from a "temp" file that remains when the process is terminated suddenly?  I'm just wondering if it might be possible to monitor the file creation process my starting a recording then pausing it and looking at the files created, then transplanting the current temp file with important temp file and renaming it accordingly.  Just thinking out loud here.  This would probably be something that only a Forensic Data Expert would know about though.

Do you think you could make a very short recording and finish it normally, then start another and have somebody phone you to interrupt it?  Maybe if the complete and incomplete M4A audio files are small enough you can upload them here (changing the extensions to *.txt) and we can have a look at them?
The only software that I know of which even CLAIMS to be able to fix corrupt m4a's is this:

http://www.realconvert.com/MediaFixer/index.htm

(The "what's new" page says that it can fix m4a format starting at version 7.9...)

I can't personally vouch for it, but depending how desperate your situation is, it might be worth a try.
Hello BillDL - sorry to have gone quiet, holidays got in the way! I have spent a few hours this evening playing with my (new!) Hex editor and taken a look at the insides of both the good and bad files to see what's going on, here's what I found...

1. The good file had a different header - so I copied and pasted that into the bad file. The bad file still would not play.

2. The good file had a different footer - so I copied and pasted that into the bad file. The bad file still would not play.

3. I then wondered if the MD5 / CRC32 checksums would make any difference so I found a utility to calculate those for me and pasted the new values into the bad file. Still the bad file would not play.

From your previous response I agree that I need the help of an expert in the M4A file format to help get at all the data - I can see it all it just won't play!! Got any ideas what to do next??

Cheers
Ed
SOLUTION
Avatar of AeroQ_Tech
AeroQ_Tech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi again Bill

An update on how I've got on.

I contacted Aeroquartet and uploaded my file to their system for a free of charge analysis of the chances it could be recovered. It scored 50%. I then requested that they have a go at recovering it - which they offered on a 'no win-no fee' basis. The outcome is that they were able to recover and the cost was $79 (which is based upon length of the clip - just over 1.5 hours - and the device it came from, in my case of course an iPhone). I also swapped emails with Javier a few times and I found him to be helpful and friendly. So all-in-all I'm very happy with the whole experience!

Cheers
Ed
Check out http://aeroquartet.com/ - it works!
That's great news Ed.  50 UK pounds isn't bad for an important multimedia file, and the fact that you were offered a "no win no fee" was excellent.  Thanks for updating.