I recorded the audio of a seminar with my iPhone (Voice Record App), but unfortunately the battery died in the middle.
Now the file is corrupted and I cannot play it anymore.
I've tried many things that people recommended here:
- VLC, quicktime, avidemux with no success
- ffmpeg had no success in reading it
- Audacity failed reading it
- Grau's video repair tool failed as well
What seems to work is the online-tool on
The audio quality of the repaired file isn't great, it's very very silent. Then again, I can't judge how good the quality was to begin with. They do want $120 for it, though, and I hoped to get a cheaper solution. (and I'm really curious how they do it!)
And more importantly, mp4repair.org gets the sampling rate wrong! So I hope that there can be a better audio quality than what they achieved.
The file is audio-only, AAC embedded in a mp4 container.
The settings I used on the recorder are 44.1 kHz, 16 bit depth, stereo, 128 kBit, encode quality "high".
There is no video track because it was an audio-only recording. I have a Mac but also run Windows, so I can try whatever program there is.
Do you have any idea what I could try? I'm not afraid of using a hex editor or so. mp4repair can do it, so I know it is possible.
I'd appreciate any help.
Below you find 3 infos of MediaInfo, as usually asked for in the forum:
1) broken file
2) reference file recorded with same app
3) repaired mp4 preview of mp4repair.org
Here's the output of MediaInfo of the broken file:
Code:General Complete name : /tmp/fixme.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 419 MiB
Here's the output of a good reference file with the same recorder with the same settings:
Code:General Complete name : /tmp/reference.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 4.76 MiB Duration : 5mn 8s Overall bit rate mode : Constant Overall bit rate : 129 Kbps Encoded date : UTC 1986-03-19 13:55:29 Tagged date : UTC 1986-03-19 13:55:29 Audio ID : 1 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 5mn 8s Bit rate mode : Constant Bit rate : 128 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz Compression mode : Lossy Stream size : 4.70 MiB (99%) Language : English Encoded date : UTC 1986-03-19 13:55:29 Tagged date : UTC 1986-03-19 13:55:29
Here's the output of MediaInfo of the repaired preview that mp4repair.org produces:
Code:General Complete name : /tmp/XXX.pbad-0-0320000-AAC_audio-.jpg.m4a Format : MPEG-4 Codec ID : M4V File size : 28.9 KiB Duration : 2s 836ms Overall bit rate mode : Constant Overall bit rate : 83.6 Kbps Encoded date : UTC 2015-05-10 23:37:15 Tagged date : UTC 2015-05-10 23:37:15 Writing application : Mac OS X v10.8.5 (CMA 914, CM 926.106, i386) Audio ID : 1 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 2s 836ms Source duration : 2s 880ms Bit rate mode : Constant Bit rate : 76.3 Kbps Nominal bit rate : 128 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 26.4 KiB (91%) Source stream size : 26.9 KiB (93%) Title : Core Media Audio Language : English Encoded date : UTC 2015-05-10 23:37:15 Tagged date : UTC 2015-05-10 23:37:15
+ Reply to Thread
Results 1 to 17 of 17
Last edited by holger123; 12th May 2015 at 08:29.
I just tried it, but when opening the file, GoldWave asks me whether I want to import it as either
- Raw (snd, raw)
- Dialogic (vox)
There is no option for MP4, AAC, or so. Also for "custom" format, there are only uncompressed WAV-alike formats available.
Just add the header from a working mp4 to the broken mp4 with a hex editor. How? I have no idea....
If you find some other software let us know.
I analyzed the files with a hex editor and read up on the MP4 standard and I think I know the problem now.
There are no stsz and stco atoms in moov.
Do you have any idea how they can be rebuilt? (I know that it is possible to rebuilt them...)
Guys, the solution was very easy.
In case someone ever has the problem again, here's how I did it:
1) Find out in a hex editor where the actual data starts. In my case, it was NOT(!) after mdat, but after a whole bunch of zeros in the beginning
copy everything afterwards using a hex editor to another binary file, e.g. raw.aac . For AAC format, every sample seems to begin with 0x21, that gives you a hint if you got the right position
2) In Linux, use
faad -a out.aac raw.aac
That restored the file completely.
Hey thanks for this thread! I had the same problem, a telephone interview that got corrupted
I've tried a hex editor. My file starts with ftyp3gp4 isom3gp4 efree. Then a whole bunch of zero's and then mdat starts. I've tried deleting all the starting zero's and re saving at as an .aac but this didn't work so far.
Which hex editor did you use?
Do the following:
1. Use Mediainfo on the broken file and post everything here as I did above
2. Record another, good, file with the same recorder and same settings and then post what Mediainfo says here also.
The last guy didn't post his MediaInfo data, but may I do it? I'm having a very similar problem. My MP4 Audio file recorder by phone got corrupted due to the lack of drive space.
Here's the output of MediaInfo of the broken file:
Complete name : D:\Programs\HxD\Plik audio 127.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 22.2 MiB
General Complete name : D:\Programs\HxD\Plik audio 125.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 274 KiB Duration : 33s 344ms Overall bit rate mode : Constant Overall bit rate : 67.2 Kbps Encoded date : UTC 2015-06-26 14:56:35 Tagged date : UTC 2015-06-26 14:56:35 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 33s 344ms Bit rate mode : Constant Bit rate : 64.1 Kbps Channel(s) : 2 channels Channel(s)_Original : 1 channel Channel positions : Front: C Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 261 KiB (95%) Encoded date : UTC 2015-06-26 14:56:35 Tagged date : UTC 2015-06-26 14:56:35
I managed to recover all recorded audio, turns out it wasn't that hard in my case. All I had to do was to follow the steps from http://sysfrontier.com/en/2014/12/31/hello-world/
In case site goes offline, here are the steps:
STEPS for Windows PC 1. Download faad.exe Open http://rarewares.org/aac-decoders.php Click “Download (225kB)” of “FAAD2v20100614 CVS snapshot for Win32“. Extract faad.exe from the downloaded zip file. Place it in the “Downloads” folder, for example. 2. Download faac.exe Open http://rarewares.org/aac-encoders.php Click “Download (191kB)” for “FAACv1.28 Binary for Win32“. Extract faac.exe from the downloaded zip file. Place it in the same folder as above. 3. Download binary editor You can choose any favorite binary editor. If you don’t know well, I will recommend HxD. Download a zip file from http://mh-nexus.de/en/downloads.php?product=HxD Extract setup.exe and click it to install. 4. Place the file to the same directory. You can get the voice memo file from your iPhone via iTunes. Please place the copied file to the same directory as where you placed the above faad.exe and faac.exe. We call the file “20140615 163625.m4a”, for example. 5. Open the file with binary editor. Press F key with control key to open the Find box. Type “mdat” and press the Find button. Select from the begining to the “t” of “mdat”. Press Delete key to delete the selected bytes. Press S key with control key to save. 6. Decode by faad.exe Press R key with Windows key to open the dialog. Type “cmd” and press OK button. In the command prompt window that was opened, type “cd Downloads” to move the Downloads folder. Type faad.exe “20140615 163625.m4a” and press the Enter key. In seconds or tens of seconds, you will find the decoded wave file named “20140615 163625.wav”. 7. Encode by faac.exe In the command prompt window, type faac.exe -b 160 -o repaired.m4a “20140615 163625.wav” and press the Enter key. In minutes, you will find the encoded file named repaired.m4a. Please replay the repaired.m4a and check if it is what you want.
Last edited by Varrok; 29th Jun 2015 at 06:10.
Hello , please can anybody help me ? I tried to follow up the steps but it never worked for me. I am really in need to repaire my m4a files. I am not very expert though like you guys.
I just made an account to reply saying thank you, this solution worked. I have Nvidia Shadowplay Clips 1440p@60fps which I use WonderShare UniConverter to convert to audio-only .AAC files to save space (just wanted to record funny audio soundbites) .
UniConverter corrupted the AAC, I could listen to playback in VLC but couldnt import to Sony Vegas / Handbrake / Reeaper and Hex Editor didnt show any 0000's at the start and the time left show in VLC kept resetting back to the length of the clip.
Following this, i converted my 14mb AAC to 121mb wav and back to fixed .m4a. THANK YOU