## Repair audio file without header

2

1

We recorded the audio of a rather long meeting of a couple of hours on a phone. Someone forgot to turn off sound recording at the end of the meeting and the phone must have turned off due to low battery at some point. It is an MP4 container file which should contain an AAC stream at 192kbit/s. The file has a total size of 734MB, which would probably mean more than 8 hours of audio. We would like to restore as much as possible of this file, but it is not recognized by common media applications.

We tried ffprobe which says

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002602660] moov atom not found
recording-20171111-135205.mp4: Invalid data found when processing input


According to what I found via search engines, this means that the header of the container file has not been written properly, which kind of makes sense.

Is there any way to restore the audio from the file? The first couple of hours are probably enough, if that makes things any easier.

Generate a short recording with the same device and use it with recover_mp4. The download link is at the bottom. Haven't tried the new online service, but the old s/w should be enough.

– Gyan – 2017-11-12T13:03:21.243

@Mulvya Thanks for the tip, looks promising! Creating the header appears to work using --analyze, but when I try to restore the file, it says: 'result.aac' created, size 0 (0.000%), so no audio is actually extracted. – just.kidding – 2017-11-12T13:22:43.600

How large is the original file? – Schizomorph – 2017-11-13T16:37:11.587

@Schizomorph Do you mean the non-corrupted file I used with recover_mp4? It's about 200MB and from a previous meeting. Should I use a smaller file? – just.kidding – 2017-11-14T13:49:15.460

Sorry, I wasn't clear enough. I meant the file that's missing the header. Just to check the audio data is there... – Schizomorph – 2017-11-14T15:38:31.743

@Schizomorph Its total size is 734MByte, that's why I guessed about 8 hours of audio. – just.kidding – 2017-11-14T16:31:02.027

Oh I see. Seems like it's there then. I wonder if you could write or copy the header from a file from the same device and same settings yourself using something like VIM. Of course, make a backup first. – Schizomorph – 2017-11-14T17:26:29.007

P.S. Don't take my word for that. I think it would work for a .wav but I'm not too sure what mp4 headers contain and in what format. – Schizomorph – 2017-11-14T17:28:33.240

@Schizomorph I tried that, and I believe it is what recover_mp4 is supposed to do as well. The problem seems to be that the mvhd box is usually written at the end of the file and contains metadata, but as the recording was stopped due to power loss, the metadata was not written thus the data cannot be read by applications. I am trying to create an mvhd box. – just.kidding – 2017-11-14T17:38:01.180

Oh, I see. I guess I can't be of much help as you seem to know more about this than me. – Schizomorph – 2017-11-14T17:59:09.690