Fix Corrupted MP4 Video Files

How to Fix Corrupted MP4 Video Files

Last updated:

No robots used, our articles are crafted by humans under strict Editorial Guidelines.

Written by Jordan Jamieson-Mane Jordan Jamieson-Mane Staff Writer • 50 articles Jordan Jamieson-Mane, a data recovery and Windows troubleshooting expert, joined Handy Recovery Advisor in 2021. Starting as a contributing writer, he quickly established himself as a skilled technical writer and researcher, earning his current staff writer position. LinkedIn Approved by Andrey Vasilyev Andrey Vasilyev Editor Andrey Vasilyev is an Editorial Advisor for Handy Recovery. Andrey is a software engineer expert with extensive expertise in data recovery, computer forensics, and data litigation. Andrey brings over 12 years of experience in software development, database administration, and hardware repair to the team. LinkedIn

There are more than a few ways that an MP4 video can become corrupted and unplayable. Truthfully, I’d say it’s unlikely to occur often – but when it does, it’s gut-wrenching to think you’ve lost all that footage.

The peculiarities of the MP4 format make it susceptible to corruption if you’re recording a video and the process gets interrupted. I’ve only experienced it a handful of times, but while digging into this topic I realized it’s a pretty well-documented problem with a lot of solutions. I’ve compiled my research and personal experience into this guide on how to fix corrupted MP4 files.

7 Ways to Fix a Corrupted MP4 Video File

Let me start by saying that there’s never a guarantee that you’ll be able to fix a broken MP4 file. It all comes down to how much damage the file has sustained, as well as what type of corruption is present. You have a range of options at your disposal, from online tools to specialized repair services. It’s important that you make a copy of your MP4 video file and only work on the copy. The original should be left untouched.

👀

If you were recording a video and noticed that the video file wasn’t showing up, your device may not display files that weren’t completely finished. This is quite rare, but in such cases, you can scan your device with a data recovery tool like Disk Drill to recover the hidden video file and then create a copy to work on.

Method 1: Use a Video Repair Tool to Fix the MP4 File

In my opinion, trying to repair the video with an online-based video repair tool first is the best approach. It’s quick, you don’t need to download any software, and there are lots of free options. This works best when you have a reference video, as these tools use information from the healthy video to repair the corrupted MP4 file.

My go-to is Clever Online Video Repair. It’s still relatively new but works excellent for repairing videos that were cut prematurely while recording, also known as truncated, like in the event your drone crashes or your phone battery dies mid-recording.

Here’s a quick look at what it looks like to repair an MP4 file with an online repair tool:

  1. Go to Clever Online Video Repair.
  2. Upload the broken video.Uploading the damaged file.
  3. Choose the type of device that was used to capture the video. Click Repair.Choosing a device.
  4. Upload a healthy sample that was recorded on the same device with the same settings.Uploading a healthy reference file.
  5. Register for an account or sign in to your existing one.Account login.
  6. Select your repaired file.Selecting the repaired file.
  7. Download the MP4 file.Downloading the repaired file.

Method 2: Download the Correct Codecs

In order for video players to decode and play video files, you must have the correct codecs installed. A codec is responsible for encoding and decoding the contents of the video file for playback. If you don’t have the necessary codecs installed, your video player may show a general message misidentifying the file as corrupted. If this is the case, downloading the correct codecs will fix the issue.

The vast majority of MP4 videos will be using H.264/AVC (Advanced Video Coding) for video playback and AAC (Advanced Audio Codec) for audio playback. Videos shot in higher quality may use the newer H.265 codec. These codecs are usually preinstalled on your system, but in the event that they’ve been uninstalled or corrupted, you can always redownload a codec pack like the popular K-Lite Codec Pack which includes everything you need.

Method 3: Change the Format and Fix with VLC

VLC has the built-in ability to repair damaged or incomplete AVI files that you try to play. One way of trying to repair the MP4 file is by creating a copy, changing that copy to the AVI format, and seeing if VLC can repair it.

⚠️

Any corrupted segments of the video file that VLC finds will be removed, meaning the final result will contain frame skips where the corrupted frames were deleted.

This is how you can try to fix the MP4 file using VLC:

  1. Create a copy of your MP4 file and change the extension to AVI.
  2. Open VLC.
  3. Go to Tools, then Preferences.Opening VLC Preferences.
  4. Click Input / Codecs.Accessing Inputs / Codecs.
  5. Set the dropdown option for Damaged or incomplete AVI file to Always fix.Choosing to always fix AVI files.
  6. Click Save and try to play your damaged file.

Method 4: Convert It With VLC

By converting the video you’re rebuilding the video’s file structure, which has a chance of repairing the corruption that’s present. In the instructions below, I’ve re-encoded the video as an MP4 file, but you are also able to choose a different profile and convert it to a different file format.

Follow these steps to fix a corrupted MP4 file by converting it with VLC:

  1. Open VLC.
  2. Go to Media, then click Convert / Save.Opening VLC Convert / Save.
  3. Click Add and select the damaged file. Click Convert / Save when you’re ready.Beginning conversion.
  4. Change the profile to Video – H.264 + MP3 (MP4) and set a destination for the file.Choosing a Profile.
  5. Click Start.

Method 5: Re-encode the File With Handbrake

Handbrake is an open-source video transcoder used for converting video files to another format. I list it as a solution because there’s a chance you can uncorrupt the MP4 video file by re-encoding it with Handbrake. Re-encoding the file will reassemble its contents into a new and healthy container, rewriting the file structure.

Follow these steps to re-encode and repair a broken MP4 file with Handbrake:

  1. Download and install Handbake.
  2. Select the corrupted MP4 file you want to re-encode.Selecting the corrupted MP4 file.
  3. Choose a preset and click Start Encode.Re-encoding with Handbrake.

Method 6: Re-encode with FFmpeg

FFmpeg is another free and open-source software tool designed to decode, encode, and transcode video files. What makes it different from HandBrake is that it runs on a command-line interface (CLI).

We’ll be using the following command to instruct FFmpeg to aggressively scan for errors in the input (damaged) MP4 file, discard any corrupted data, and transfer all healthy data to a new file.

ffmpeg -err_detect aggressive -fflags discardcorrupt -i inputfilename.mp4 outputfilename.mp4

Follow these steps to install FFmpeg and re-encode your corrupted MP4 file:

  1. Download FFmpeg and unpack its contents.
  2. Right-click Start and click Terminal (Admin).Opening Terminal.
  3. Now you need to specify where FFmpeg resides. Type the following command into Terminal, replacing * with the directory for the bin folder where ffmpeg.exe resides, and press Enter.
    $ffmpeg = '*'

    Setting the location of FFmpeg.

  4. Type the following command and press Enter.
    $path = [Environment]::GetEnvironmentVariable('Path', 'User').TrimEnd([Char]';')

    $path command.

  5. Type the following command and press Enter.
    [Environment]::SetEnvironmentVariable("Path", "$path;$ffmpeg", 'User')

    SetEnvironmentVariable

  6. Open the folder containing the corrupted video. Right-click a blank space and click Open in Terminal.Opening the location in Terminal.
  7. Type the following command and adjust it to include the name of your corrupted MP4 file. Press Enter.
    ffmpeg -err_detect aggressive -fflags discardcorrupt -i inputfilename.mp4 outputfilename.mp4

    Command to re-encode.

Method 7: Treasured by AeroQuartet (Service)

Treasured Video Repair

In instances where software is not enough, or the steps involved with fixing a corrupted MP4 video file prove too difficult to perform on your own, you can rely on a professional video repair service instead. Treasured by AeroQuartet is a done-for-you video repair service that utilizes the expertise of video repair professionals to fix your corrupted MP4 video and return it to a working state.

The Treasured video repair service comes highly recommended, as seen in this glowing review on Reddit. Bear in mind, however, that you’re enlisting the services of professionals. As all repairs are done manually and you’re guaranteed a high-quality result, this is definitely going to be the most costly option. Personally, I’ve never lost any videos valuable enough to try the service myself, but I keep it at the back of my mind in case the day does come when I need help repairing footage that I cannot afford to lose.w

How an MP4 File Becomes Corrupted

An MP4 file consists of a lot of data that’s kept inside what’s known as a container. This container includes information relating to the video file, such as essential data that helps media players identify and play the file. One of the most important pieces of information in the file is the moov atom. Without getting too technical, the moov atom contains information about the timing and structure of the file so media players can easily seek within the file.

MP4 is a widely adapted format due to its efficient playback and streaming qualities. A limitation of the MP4 format is that the moov atom is only written once the recording has stopped. If the recording is interrupted, the moov atom will not be written to the file at all, resulting in it becoming unplayable.

👀

The moov atom is usually placed at the end of the file, but can sometimes be moved to the beginning of the file to enable faststart playback.

This remains one of the most common forms of corruption with the MP4 format. Thankfully, there are numerous online tools and downloadable software applications that can fix corrupted MP4 files with little issue. Bear in mind, however, that other forms of file corruption can also impact MP4 files and may be more difficult to address, such as audio-visual synchronization issues, compression errors, and broken or incomplete frames.

Conclusion

File corruption is a problem that is here to stay and strikes at the most inopportune moments. Thankfully, there are so many solutions out there that can fix corrupted MP4 video files, oftentimes for free.

Like with any file repair, I cannot guarantee that the solutions I’ve included will work for you. Despite that, in my experience and research, I’ve found them to be among the most reliable for fixing unreadable MP4 files that suffer from some type of corruption.

FAQ

What are the most common methods to repair corrupted MP4 files?

Online tools are usually the first stop for repairing corrupted MP4 files because they’re easy to find, usually free, and very quick. Alternatively, downloading MP4 video repair software is also a pretty common option.

Is there free software available to repair damaged MP4 files?

Yes. Untrunc GUI is a very popular software tool for repairing damaged MP4 files that suffer from truncation. There’s also recover_mp4.exe, though it has been a while since this one has seen an update.

How can I prevent MP4 video files from getting corrupted in the future?

Create backups of the MP4 video files as soon as possible. Aside from that, you should employ common ‘best practices’ for handling data; don’t remove the storage device while it’s in use, handle your hardware with care, and make sure your battery-powered devices have sufficient charge.

Does file corruption affect MP4 video quality after repair?

It depends on the type of corruption the video suffers from. If it’s metadata-related, fixing the corruption will not impact the video quality. However, if the image contents of the file is corrupted, the footage will need to be repaired and rendered again, causing some quality loss.

What are some signs that an MP4 video file is corrupted?

A clear indication of corruption to an MP4 video file is when it is unplayable. Trying to open it with a video player like VLC will prompt an error message stating that the file cannot be read. Corruption to the actual footage will be present in the form of visual artifacts or glitching.

About article

This article was written by Jordan Jamieson-Mane, a Staff Writer at Handy Recovery Advisor. It was also verified for technical accuracy by Andrey Vasilyev, our editorial advisor.

Curious about our content creation process? Take a look at our Editor Guidelines.

How do you rate the article? Submitted: