Repairing a Corrupt MP4 Video File

Steve C. picture Steve C. · Apr 21, 2014 · Viewed 83.7k times · Source

I have an MP4 video that I took with a Flip camera. The camera froze up while I was stopping the recorder and now the video appears corrupt. I can still download it off the camera, but it won’t play. Now, the video is still over 2 Gigabytes in size, so I think the data is still there.

So, I scoured the web looking for solutions, and I found paid services and software that claim to be able to fix such a thing. One diagnostic service (“Treasured”), showed me stills from the video, confirming my believe that there probably is something salvageable there. Unfortunately, though, the price requested to fix it is not in the budget. It requires more of a homespun solution.

Does anyone know how to fix a corrupted MP4? Or of a service or software that is not too much money?

Answer

Andrew picture Andrew · Sep 9, 2014

give this a shot Official tool Link This utility can recover H.264/AVC stream from unfinalized MP4/MOV files without (or empty) header. You may got the unfinalized file in case of damaging camcorder during recording or such. This utility has been tested with files recorded by GoPro, but it may work with other camcorders too.

Usage:

recover_mp4_to_h264 in_good_similar.mp4 --analyze
recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [out_audio.aac | out_audio.wav | out_audio.mp3] []
recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [--aac | --pcm | --mp3] []

Supported recorders:

Default is Ambarella (used in GoPro, etc.)
Specify --eos in case of Canon EOS
Specify --apple in case of some Apple software encoder
Specify --htc in case of HTC smartphone
Specify --motorola in case of Motorola smartphone
Specify --samsung in case of Samsung camcorder

Step 1: Use any good previous file with the same resolution and bitrate to generate the AVC configuration record, for example

recover_mp4_to_h264.exe GOPR0346.MP4 --analyze

Note: It will create the file 'avcc.hdr' in the current directory.

Step 2: Recover H.264 stream from the corrupted file, for example

recover_mp4_to_h264.exe GOPR0347.MP4 GOPR0347.h264 GOPR0347.aac

Note: The file 'avcc.hdr' must be exist. Note: Specify --pcm or the WAV file name in case of recovering MOV file written by Canon EOS.

Step 3: Use any other utility (Yamb or ffmpeg for example) to recreate the MP4/MOV file from the H.264 stream (GOPR0347.h264). Note MP4 does not support PCM sound, you must create MOV in this case:

ffmpeg.exe -r 30 -i recovered.h264 -i recovered.wav -vcodec copy -acodec copy result.mov

Edit: add official tool link. thanks The Compiler

Old Link: Mega Link