5

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 192 kbit/s.

The file has a total size of 734 MB, which would probably means more than 8 hours of audio. We would like to restore as much as possible of this file, but common media applications do not recognize it.

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.

MarianD
  • 445
  • 1
  • 4
  • 10
just.kidding
  • 151
  • 2
  • 1
    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 Nov 12 '17 at 13:03
  • @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 Nov 12 '17 at 13:22
  • How large is the original file? – Schizomorph Nov 13 '17 at 16:37
  • @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 Nov 14 '17 at 13:49
  • Sorry, I wasn't clear enough. I meant the file that's missing the header. Just to check the audio data is there... – Schizomorph Nov 14 '17 at 15:38
  • @Schizomorph Its total size is 734MByte, that's why I guessed about 8 hours of audio. – just.kidding Nov 14 '17 at 16:31
  • 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 Nov 14 '17 at 17:26
  • 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 Nov 14 '17 at 17:28
  • @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 Nov 14 '17 at 17:38
  • Oh, I see. I guess I can't be of much help as you seem to know more about this than me. – Schizomorph Nov 14 '17 at 17:59

2 Answers2

0

If you know that the raw data is all there, you could just load the data blob into a web browser. You can tell the browser how to interpret the data by specifying the MIME type as "audio/mp4". This might work.

heatsink
  • 21
  • 3
0

The same topic has been answered on the sister project of Sound Design, Stack Overflow. Looks like there are some good approaches. The following may solve your issue. On a console (terminal), try

ffmpeg -i input_video_file.mp4 -vcodec copy -acodec copy -movflags faststart output_video_file.mp4 

... whereby you adjust the filenames of course.

Anyway, always work with a copy of course and keep the original file untouched until you are sure to have the complete desired result.

philburns
  • 311
  • 1
  • 6