- Make a backup copy of your corrupted MP4 file.
-
Get a sample MP4 file. This must be a valid (playable) video file recorded with the same camera and settings as the damaged file (e.g. same resolution, orientation, frame rate, etc.).
If you use a valuable video as a sample file, make a backup copy of this video too.
-
Download our free MP4 repair tool, called recover_MP4, by clicking on this link.
-
Download another free tool, called FFmpeg. You'll need it later on to combine the fixed video and audio streams into a final MP4 file. You can download FFmpeg here.
-
At this stage, you should have two zip archives downloaded on your PC. Now, extract ffmpeg.zip on your C:\ disk drive. Rename the extracted folder to ffmpeg.
-
Inside the ffmpeg folder, there is a bin directory. Open that directory and then extract all files from recover_MP4.zip into it. Once done, you should have all the .exe files from both archives stored in the /ffmpeg/bin folder.
-
Rename your corrupted MP4 file to "bad.mp4" (without quotes).
Rename your valid video file (sample) to "good.mp4" (without quotes).
Then copy both the bad.mp4 and good.mp4 into the \ffmpeg\bin folder.
-
Now, you need to launch the Command Prompt as an administrator. For this, click Start and type CMD in the search box. A Command Prompt option should appear. Right-click on it and choose Run as administrator. This will open the Command Prompt in a new window.
-
In the Command Prompt change the working directory to one where the ffmpeg.exe, recover_mp4.exe and MP4 files are stored.
For example, if you've extracted all the files to your C:\ drive as described in the previous steps, the working directory should be: C:\ffmpeg\bin
To switch to this directory, enter the following command in the Command Prompt:
cd C:\ffmpeg\bin
-
Copy the following command into the Command Prompt and press Enter:
recover_mp4.exe good.mp4 --analyze
- recover_mp4.exe – executes (calls) the video recovery app
- good.mp4 – specifies a path to the sample video needed for the recovery app
--analyze – instructs the tool to extract the needed data from the sample file
-
Once the processing is done, you will get a message containing two commands. First one is to fix the missing metadata. And the second one is to build the resulting video and audio streams into a final MP4 file.
At this stage we recommend that you copy the second command to a text document, so that you can run it later.
Now, run the first command in the Command Prompt (just copy/paste it and hit Enter). The command should look the following way:
recover_mp4.exe bad.mp4 recovered.h264 recovered.aac
- recover_mp4.exe – executes (calls) the video recovery app
- bad.mp4 – specifies a path to the corrupted MP4 file
- recovered.h264 – specifies the output filename for the video stream of the fixed file
- recovered.aac – specifies the output filename for the audio stream of the fixed file
-
Now you need to merge the resulting video and audio streams into a final valid MP4 file. For this, run the command you saved in a text document earlier. The command should look the following way:
ffmpeg.exe -r 30 -i recovered.h264 -i recovered.aac -bsf:a aac_adtstoasc -c:v copy -c:a copy recovered.mp4
Essentially, this command will call the FFmpeg tool to merge the streams. The final MP4 file will be saved into the same folder (C:\ffmpeg\bin), titled recovered.mp4.
Your MP4 file is fixed now! You can play it in your favorite media player.
-
Please note that the above commands may differ depending on the paths you used to extract FFmpeg and the MP4 repair tool. So, be sure to follow the instructions from the Command Prompt.
Also, please note that we do not provide support for the free tool – recover_MP4.
If you're stuck with the Command Prompt and can't repair corrupted MP4 video files for any reason, we encourage you to try Restore.Media instead. It has a wizard-like interface and is much easier to use.