Need help fixing an audio file

Posted:
in Genius Bar edited January 2014
Hi,



I was recording a lecture with audio hijack and put my laptop to sleep before stopping the recording process. So now I have a 140 mb .m4a file that won't play. When I try and open it in VLC I get the message "MP4 plugin discarded (no moov box)". When I open the message window I get this
main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU

main debug: looking for memcpy module: 3 candidates

main debug: using memcpy module "memcpymmxext"

main debug: waiting for thread completion

main debug: thread 42052608 (playlist) created at priority -47 (playlist/playlist.c:184)

main debug: waiting for thread completion

main debug: thread 42898432 (preparser) created at priority -47 (playlist/playlist.c:210)

main debug: looking for interface module: 1 candidate

main debug: using interface module "hotkeys"

main debug: thread 42910208 (interface) created at priority -47 (interface/interface.c:198)

main debug: looking for interface module: 3 candidates

main debug: using interface module "macosx"

main debug: thread 42904576 (manage) created at priority -47 (interface/interface.c:164)

main debug: adding playlist item `Built-in Microphone- Internal microphone 20070827 1834.m4a' ( /Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a )

main debug: creating new input thread

main debug: waiting for thread completion

main debug: thread 43018752 (input) created at priority 37 (input/input.c:265)

main debug: creating statistics handler

main debug: `/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a' gives access `' demux `' path `/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a'

main debug: creating demux: access='' demux='' path='/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a'

main debug: looking for access_demux module: 1 candidate

main debug: creating access '' path='/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a'

main debug: looking for access2 module: 5 candidates

vcd debug: trying .cue file: /Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.cue

vcd debug: could not find .cue file

access_file debug: opening file `/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a'

main debug: using access2 module "access_file"

main debug: pre-buffering...

main debug: received first data for our buffer

main debug: pre-buffering done 1408981 bytes in 0s - 391676 kbytes/s

main debug: creating demux: access='' demux='' path='/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a'

main debug: looking for demux2 module: 44 candidates

mp4 debug: found Box: ftyp size 32

mp4 debug: found an empty box (null size)

mp4 debug: dumping root Box "root"

mp4 debug: | + ftyp size 32

mp4 debug: unrecognized major file specification (M4A ).

mp4 error: MP4 plugin discarded (no moov box)

macosx debug: input has changed, refreshing interface

ffmpeg debug: detected format: mov,mp4,m4a,3gp,3g2,mj2

ffmpeg debug: AVFormat supported stream

ffmpeg debug: - format = mov,mp4,m4a,3gp,3g2,mj2 (QuickTime/MPEG4/Motion JPEG 2000 format)

ffmpeg debug: - start time = -1

ffmpeg debug: - duration = -1

main debug: using demux2 module "ffmpeg"

main debug: `/Users/mike/Desktop/Built-in Microphone- Internal microphone 20070827 1834.m4a' successfully opened

main debug: EOF reached

macosx debug: input has stopped, refreshing interface

main debug: closing input

main debug: removing module "ffmpeg"

main debug: removing module "access_file"

main debug: thread 43018752 joined (input/input.c:412)

main: nothing to play

Any ideas on how I can fix this?



Thanks.

Comments

  • Reply 1 of 4
    MarvinMarvin Posts: 15,333moderator
    First you'll need a hex editor to see what state the file is in. Hex fiend is very good:



    http://ridiculousfish.com/hexfiend/



    Drop the file onto it and if the file is full of zeroes or repeating symbols then the file can't be recovered.



    If it has a lot of what appears to be random symbols then it might be recoverable. What to do first is to create another recording using the same method and format and open that inside the hex editor.



    Usually a file will have a header, data and then sometimes a footer. The header code will have codes like WMV if it's windows media or MooV for quicktime at the start. This header is pretty standard and if you have the same format of media, it should be the same between files.



    So copy the data that is after the header from the broken file over the data segment that is in the working recorded test file. Save it and then try and open it.



    Some formats are easier to fix than others. I've corrected quite a few mpegs this way - usually they have corrupted/missing headers or incorrect aspect ratios.
  • Reply 2 of 4
    Thanks Marvin,



    Fortunately it looks like the data is basically intact. It don't see a header or footer in Hex Fiend. There is a left, middle (with a large amount of random numbers) and a right column (where I see at the beginning a reference to "moov"). So I copy the data from the middle column? It doesn't look like Hex Fiend allows you to do that though without taking everything from the right column also(?)
  • Reply 3 of 4
    MarvinMarvin Posts: 15,333moderator
    Quote:
    Originally Posted by soobaaaa View Post


    Thanks Marvin,



    Fortunately it looks like the data is basically intact. It don't see a header or footer in Hex Fiend. There is a left, middle (with a large amount of random numbers) and a right column (where I see at the beginning a reference to "moov"). So I copy the data from the middle column? It doesn't look like Hex Fiend allows you to do that though without taking everything from the right column also(?)



    The hex editor columns are the addresses of the data in the file on the left, the hexadecimal representation of the data in the middle and the ascii representation on the right. So basically the two right columns show the same data in a different form and the left one tells you where in the file the data is. This is why when you select the right column it selects the middle column too.



    What you want to do is open a working recording (a short clip) as well as the broken one. Then look for similarities at the top of the ascii section (the right column) between the two files. The top part of the ascii data is the header and it varies in length between formats but it should be the same length in two similar recordings.



    When you see the similarities end, that is most likely when the header ends.



    Scroll down near the end of the file and look for similarities too. Then try and copy the data from the broken file minus the header and footer into the working file. It's actually best that you don't work with your original broken file btw. Make a duplicate and keep the original unmodified.



    Once you have pasted the data into the working file either in amongst the data it had or in place of it, save the file and try opening it in a media player. It may take quite a number of copy/pastes to get anything meaningful and you might want to turn your volume down a bit as corrupted audio can start making a lot of loud garbled noises.



    Sometimes the data segment needs padding added in the form of zeroes. This is the case with movie clips anyway as it deals with whole frames so you can try adding 00 to the hex column.



    One thing to note with hex editors is that there are different modes, you can append to a file or replace. Replacing doesn't change the size of the file so it doesn't have to save it again. You'll probably want to append most of the time but it will write 140MB every change saved. If I remember about Hex fiend, there is a setting in one of the menus.



    Another Hex editor you can try is 0xed if Hex Fiend isn't working out:



    http://www.suavetech.com/0xed/0xed.html



    I'm sure one of them doesn't have an undo which is a useful feature to have when doing lots of copying/pasting.
  • Reply 4 of 4
    Ha Ha...It works! Thanks so much for time you spent to help me. This was an important class lecture that I needed to listen to again.
Sign In or Register to comment.