VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Hi there,

    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:
    What seems to work is the online-tool on
    http://mp4repair.org/
    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.

    Holger.

    ----
    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
    Last edited by holger123; 12th May 2015 at 09:29.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You could try goldwave.
    Quote Quote  
  3. Originally Posted by Baldrick View Post
    You could try goldwave.
    Thanks for the hint.
    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.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    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.
    Quote Quote  
  5. 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...)
    Quote Quote  
  6. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Isn't the moov atoms only required if you want to stream it and play it directly? It should work if you have the complete file.

    You can also ask or search in http://stackoverflow.com/search?q=stsz
    Quote Quote  
  7. 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.
    Quote Quote  
  8. 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?
    Quote Quote  
  9. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Originally Posted by holger123 View Post
    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.
    Great. But I wouldn't call it very easy though....

    Now help the user above.
    Quote Quote  
  10. I can't promise that it'll work for your file. What does MediaInfo say?
    I used Hex Fiend on my Mac.
    Quote Quote  
  11. Originally Posted by Rez123 View Post
    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?
    You deleted all the beginning until and including "mdat", right?
    So the raw stream you saved starts with 0x21, right?
    Quote Quote  
  12. Originally Posted by Rez123 View Post
    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?
    Just double-checked, the file I fixed had an mp42 container, yours seems to be a different container
    ftypmp42mp42isomfl‡free

    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.
    Quote Quote  
  13. Member
    Join Date
    Jun 2015
    Location
    Poland
    Search PM
    Hello!

    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:

    Code:
    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
    And the output of a refference file, the healthy one, recorder in the exact same way:
    Code:
    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 would appreciate any help from you, and if I managed to recover the file myself, I will post the exact steps I took

    EDIT:

    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:
    Code:
    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.
    Cheers!
    Last edited by Varrok; 29th Jun 2015 at 07:10.
    Quote Quote  
  14. Member
    Join Date
    Feb 2018
    Location
    Vietnam
    Search Comp PM
    Originally Posted by Varrok View Post
    Hello!

    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:

    Code:
    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
    And the output of a refference file, the healthy one, recorder in the exact same way:
    Code:
    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 would appreciate any help from you, and if I managed to recover the file myself, I will post the exact steps I took

    EDIT:

    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:
    Code:
    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.
    Cheers!
    Thank you so much!
    You saved my life
    Quote Quote  
  15. 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.
    Quote Quote  
  16. Originally Posted by holger123 View Post
    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.
    holger123 — nearly 4 years after your post, your helpful guide enabled me to recover an important medical recording. Big, big thanks!
    Quote Quote  
  17. 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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!