Stuck with a video that won’t play because it didn’t finish downloading completely? Or perhaps you recovered some footage from your crashed drone, only to find it’s unplayable. While the file is useless in its current state, it may still be salvageable. We have helped many people fix truncated MP4 files, and we’re going to show you how to as well.
A video is considered truncated when the media’s size in the header doesn’t line up with its actual size, the end-of-stream marker is missing, or one or more streams (like audio, subtitles, cover art, etc.) are either corrupted or missing. Some truncated files will be playable up until a certain point, while others may not play at all (as is the case when the moov atom is not found).
Super Easy Fix: Repair Truncated Video Files Online
By far the easiest way to fix truncated MP4 videos quickly and easily is by using an online tool because it’s all done in-browser. These online-only tools are specifically created to fix certain types of corruption in files. For fixing truncation in particular, our go-to is Clever Online Video Repair. Time and time again, it has proven invaluable in fixing truncated videos that were either unplayable or only playable up to a certain point. Best of all, it’s completely free – you just need to create an account.
We’ll be using it to repair MP4 files today, it also works with other formats such as MOV, DAT, 3GP, and M4V. And, while many other online tools limit file uploads to around 500 MB, Clever Online Video Repair allows files up to 5 GB in size; perfect for high-resolution video like 4K. The biggest requirement is that a healthy video recorded on the same device must be provided for repairs to work, as the tool will extract key information from the healthy video to restore the damaged one.
File truncation is commonly caused by an interrupted file transfer or canceled download. You can try transferring/downloading the video again. If that’s not an option, these steps will guide you through how to repair the video, whether you’re doing it from a computer or directly from your smartphone.
This is how you can repair a truncated MP4 video with an online tool:
- Go to repair.cleverfiles.com and upload your file.
- Select the device the video was recorded on, or click Unknown device if you’re unsure.
- Upload the healthy sample file.
- Download the repaired file.
Easy Fix: Try VLC Media Player’s Repair Feature
No doubt you’re aware of VLC. You probably already have it installed. But did you know it can repair videos, as well as play them? Well, sort of. It allows you to repair unplayable AVI files. But this can be used to your advantage by simply renaming your file. We included it in our guide on how to fix corrupted MP4 files for that reason.
Before we start, go ahead and make a copy of your truncated MP4 file and rename it with the AVI extension. For example, if your file is named video.mp4, it should become video.avi. Making a copy ensures the original file remains as it is.
If the extension of your files isn’t visible in File Explorer, click View > Show and then make sure the File name extensions option is ticked.
Follow these steps to repair a truncated MP4 file using VLC’s automatic repair feature:
- Download and open VLC.
- Click Tools, then Preferences.
- Click Input / Codecs.
- Change the dropdown option for Damaged or incomplete AVI file to Always fix.
- Click Save, then attempt to play the AVI file.
Keen to explore what other video repair options are out there? See our list of the best video repair software.
Intermediate Fix: Convert Truncated Videos
Converting (re-encoding) the video can sometimes fix truncation. Unlike remuxing, which involves taking the streams and moving them to a new container without compromising the quality, re-encoding completely reprocesses the video into a new container of the same format or another. Doing so can fix the corrupted container structure or bypass corrupted or missing parts of the file. However, some quality loss is to be expected.
This option will only work if the critical meta atoms are present, but misplaced. If said meta atoms are missing, try the next method instead.
There are numerous tools out there (the majority of them free) that can achieve this. Handbrake is a popular open-source option, as well as FFmpeg (for more advanced users), which is actually utilized by Handbrake under the hood. VLC also includes this ability, and seeing as you’ve already downloaded it from the previous method, we’ll avoid downloading another tool and show you how to convert truncated videos using VLC:
- Open VLC.
- Click Media, then Convert / Save.
- Click Add and select the corrupted video.
- Click Convert / Save.
- Choose a profile (or create a new one), choose where the repaired file will be stored, then click Start.
Earlier in this article, we mentioned the FFmpeg method. If you’re interested in learning more about it, we have a separate guide on how to use FFmpeg to repair damaged MP4 video files.
Advanced Fix: Use the Dedicated Untrunc Tool
Untrunc is an open-source tool used to repair truncated video files that use one of the following formats: MP4, M4V, MOV, or 3GP. It’s a command-line tool that usually needs to be compiled first, but we’re going to be using the automatic Windows build by AppVeyor.
Similar to Clever Online Video Repair, a healthy reference file recorded on the same device is required in order for repairs to be made. A bonus, however, is that you don’t need to upload the file anywhere online – which is sometimes a pain point of using online tools.
Here’s how you can fix a truncated MP4 video file using Untrunc:
- Download and extract Untrunc.
- Right-click an empty space in the folder where Untrunc was extracted, then click Open in Terminal.
- Enter the following command, updating it with the paths to your files. Remember to enclose the path with quotation marks to account for any spaces.
./untrunc /path/to/working-video.m4v /path/to/broken-video.m4v
In this instance, it didn’t work for us. As we mentioned, there’s never a guarantee that it will always work. But if it worked for you, a copy of your working video should appear with the filename “broken-video_fixed.m4v”.
MP4 Repair (Untrunc GUI)
Having to use a command-line interface (CLI) can be a nuisance for those who prefer a graphical user interface (GUI). If you’re one of those people, you may prefer to repair truncated MP4 videos with MP4 Repair, a GUI wrapper for Untrunc. It has the exact same functionality as Untrunc with the added benefit of being able to point and click rather than typing our commands.
These instructions will guide you through repairing a truncated MP4 file using MP4 Repair:
- Download, extract, and open MP4 Repair.
- Select your reference file.
- Select your corrupted file.
- Click Execute.
Stuck in Your Repair Attempts? Need Help?
The fixes outlined in this article are useful in the majority of cases, but there’s no way of guaranteeing that they will work for your damaged MP4 file. Sometimes these tools won’t work right away, as seen with this Reddit user who failed to repair their video with Untrunc.
Struggling with it on your own can be a huge demotivator and may deter you from attempting to fix it, when in reality there may be a fix out there that you just haven’t tried yet. Reach out for help in relevant communities, like r/VideoEditing. We also have our own Handy Recovery Advisor Community where experts and experienced readers can chime in on the situation to assist you. Just remember to include as many details as possible, like the type of recording device used, technical information pertaining to the file, and what symptoms the file is displaying.
FAQ
What causes video files to become truncated?
Anything that can cause a video recording or transfer to be interrupted. It could be that while recording, your camera suddenly runs out of battery, or your drone crashes. Or, you could have been transferring a file to your computer, only for it to crash halfway through. Essentially, a file is considered truncated when some information wasn’t transferred or downloaded.
What’s the best tool to repair truncated video files?
The answer to this question is very subjective, but we’d recommend Clever Online Video Repair because it specializes in fixing truncated video files and it’s completely free. Untrunc, and open-source tool that specializes in repairing truncated videos, is another great option. Alternatively, you can try converting the video file to see if it fixes the problem.
Can I fix a truncated MP4 file without software?
Yes, but the process is much more complicated (and less practical). It involves examining the contents of a healthy MP4 file recorded on the same device with a HEX editor, like HxD or WinHex, and copying valid information across to the damaged file. Therefore, this is only preferred in specific cases. If you simply don’t want to download and install any software, consider using an online video repair tool.
How to repair truncated video files for free?
There are plenty of options for repairing truncated video files for free. You can use an online tool like Clever Online Video Repair, or opt for an offline solution like Untrunc.
Why is my repaired file still corrupted after using Untrunc?
A file may still remain corrupted even after being put through Untrunc due to an incompatible reference file, severe corruption, or an unsupported codec or container.
Why do I need a reference file to repair truncated MP4s?
Technically, a reference file isn’t needed to attempt repairs on a truncated MP4 file. However, the chances of repair being successful are very slim without one, which is why many software tools consider it mandatory instead. The reference file contains important information that can be used to reconstruct missing or damaged metadata or headers of the broken file.
How long does video repair usually take?
File truncation rarely takes long to fix because it doesn’t always involve re-encoding the entire video again. If you’re using an online tool, waiting for the file to upload is probably the longest part. However, if a quick fix like that doesn’t work and you need to re-encode the video, the time it will take depends on the size of the video.
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.