How to Repair Corrupted M4V Video File on Mac and Windows

repair m4v file

Even though M4V videos are mostly created via software processes (rather than being captured with a camera like MP4 videos), they are just as prone to file damage and corruption.

Maybe your computer shut down while you were editing the video, leaving it in a truncated state. Or the storage media where the video was saved got damaged, including the sectors where the file was written.

Fortunately, there are many (free) tools that can repair M4V files with different types of errors. In this guide, we’ll demonstrate how to use them.

5 Ways to Repair M4V Video Files on Mac and Windows

In this section, we cover 5 reliable methods to repair a corrupted M4V file on Mac and Windows. Fortunately, all the tools we’ll be using are compatible with both platforms, and most have the exact same interface.

With that in mind, Methods 1-3 will be demonstrated on a Mac, but you can expect the same instructions for Windows. However, Methods 4-5, which have slight variations between platforms, will be demonstrated on both Mac and Windows.

We strongly recommend creating multiple copies of the original corrupted video before proceeding. Do not operate on the original video file.

Method 1: Use Online Video Repair Websites

The most convenient method we recommend users try first is using online M4V video repair software. These are websites that host advanced tools that automatically repair files for you. All you have to do is upload your video to their site.

If you want to follow along with our guide, we recommend a site called Clever Online Video Repair. It’s completely free, with the only limit being a file size of 5 GB (which is massive compared to many other sites).

Most importantly, it’s compatible with most known video file signatures—including M4V (as well as MP4, DAT, MOV, QT, 3GP, and more).

Clever Online Video Repair requires a healthy video sample to work. Ideally, this would be a (non-corrupt) clip taken right before or after the corrupted one with the same camera settings.

Step 1. Open any browser on your computer.

Step 2. Navigate to Clever Online Video Repair’s website and sign up (don’t worry, it’s free).
Login page for Clever Online Video Repair

Step 3. Click the Choose file button.
Uploading a corrupted video file to Clever Online Video Repair

Step 4. Navigate to the location where your corrupted video is saved. Click on the file once, then click the Upload button.
Selecting a video for uploading to Clever Online Video Repair

Step 5. Use the Type, Brand, and Model dropdown menus to provide details about the device that would aid in the repair attempt. If you’re unsure, click Unknown device.
Selecting device specs for a video on Clever Online Video Repair

Step 6. Click the new Choose file button that appears.
Choose file button for healthy video sample on the Clever Online Video Repair website

Step 7. Navigate to and select your healthy file sample and click Upload. Once your healthy file sample is uploaded, Clever Online Video Repair will automatically begin the repair attempt.
Healthy file sample selection dialogue in Clever Online Video Repair

Step 8. Once Clever Online Video Repair is done fixing your video, you’ll be able to preview screenshots of the clips. To save the repaired video, click Download.
Preview and Download buttons for successfully repaired video on Clever Online Video Repair

You’ll find the saved video in the Downloads folder of your computer. Before closing the Clever Online Video Repair website, try playing your repaired video to make sure the downloaded file isn’t incomplete or corrupted.

Method 2: Utilize VLC Media Player’s Always Fix Tool

VLC Media Player is a popular media app that can play videos and perform minor editing operations. It’s known for being compatible with almost all video formats that exist.

It has a special auto-repair tool specifically for AVI files, which can fix minor video file corruption, like a damaged or missing index. But as we’ll show you in the guide below, you can “trick” VLC into treating your corrupted M4V file as if it were an AVI video—effectively triggering the auto-repair feature.

If you’re using a Windows computer, you may have to enable file extensions to appear in Explorer. In Explorer’s menu bar, click View > Show > File name extensions.

Step 1. In Finder or File Explorer, navigate to your corrupted video file (or its copy).

Step 2. Right-click the file and select Rename from the context menu. Then, change your video’s file extension from .m4v to .avi (e.g., corrupt.m4v becomes corrupt.avi).
Renaming an M4V file in Finder

Step 3. When the confirmation dialogue appears, click Use .avi (macOS) or Yes (Windows).
Confirming the change of an M4V file's extension via renaming in Finder

Step 4. Next, open any browser and download VLC Media Player from VLC’s official website.
Downloading VLC Media Player online

Step 5. Open VLC Media Player and open the Settings menu.
Opening VLC's settings menu

Step 6. Navigate to the Input / Codecs menu. In the Codecs / Muxers section, click the dropdown menu beside the Repair AVI Files setting and select Always fix. Then, click Save.
Enabling the Always Fix setting for AVI files in VLC Media Player

Step 7. Finally, open your file with VLC Media Player—it will immediately attempt to repair your video. If it starts playing, you’ve succeeded!
VLC Media Player's Open File button

Note that renaming a file’s extension is not a real “conversion.” Converting a video is a complex process that requires dedicated software, which we’ll be demonstrating in the next method.

You may want to revisit this method after using the next tool to properly convert your video file to AVI format (in case it doesn’t work the first time).

Method 3: Transcode Your Video Using Shutter Encoder

Transcoding and converting a video basically means taking the actual video and audio streams, then rebuilding everything else. It replaces the video container (which lets you change its format), re-generates the file index, changes the codecs, and more.

In other words, transcoding can replace the file elements of your video that are likely to be causing the error.

For this operation, we recommend using Shutter Encoder. It’s free and open-source, and it has a decent interface compared to most tools in this niche. You just need the right guide (ours)!

Step 1. Download the appropriate Shutter Encoder version for your computer from the official website. Install it.

Step 2. Open Shutter Encoder and drag your corrupted video file into the allotted space.
Dragging a video file into Shutter Encoder's interface

Step 3. Under Choose function, click the dropdown menu and select H.264. Finally, click Start function.
Transcoding an M4V video file using Shutter Encoder

Once the loading bar in the Progress status section reaches 100%, your re-encoded video file will be saved to the same location as the original, corrupted video file. Try opening it with VLC Media Player to see if it works.

Method 4: Transcode Your Video With Advanced FFmpeg Parameters

The process of transcoding—where a video file’s non-stream elements are rebuilt—is a highly effective repair method. However, problems with the actual streams can cause errors throughout the transcoding process itself.

Using advanced tools from the FFmpeg framework, you can “force” the transcoding to continue by adding parameters that tell it to ignore errors. This may result in some visual issues in the video during playback (and only during the sections with errors), but the video file itself may become playable.

Fair warning: FFmpeg requires working with the Terminal (macOS) or Command Prompt (Windows). However, you shouldn’t have any problems as long as you follow our guide closely.

The instructions for FFmpeg’s installation and operation differ in too many steps between macOS and Windows. So for this section, we wrote separate guides for each OS.

Option A: Use FFmpeg on Mac

To use FFmpeg on macOS via Homebrew installation:

Step 1. Open any browser on your computer and navigate to the brew.sh website. Then, click the clipboard icon beside the line of code to copy it.
Copying Homebrew's installer code from the brew.sh website

Step 2. Next, open the Terminal app (macOS) or Command Prompt (Windows). Then, paste and execute the code you copied in step 1.  This will install Homebrew, which will allow you to install FFmpeg.
Running Homebrew's installer code in the Terminal app

Step 3. Once Homebrew is installed, use the following command to install FFmpeg:

brew install ffmpeg

Installing FFmpeg via Homebrew commands in the Terminal app

Step 4. Next, execute the following command to navigate to the directory where your corrupted video file is saved:

cd desktop/demo

Replace desktop/demo with the appropriate path for your computer.

Changing the directory to the location of the corrupt video file in Terminal

Step 5. After navigating to the right directory, FFmpeg can work on your file. The next command we want you to execute performs the actual re-encoding operation on the file, along with special parameters to prevent most potential errors:

ffmpeg -err_detect ignore_err -i “corrupt.m4v” -c:v libx264 -crf 22 -preset slow -c:a aac -movflags faststart “repaired.mp4”

Running FFmpeg's transcode command in the Terminal app

Once the operation is complete, you’ll find your version of repaired.mp4 in the same location as the original corrupted file. Open it with VLC Media Player to check if it works.

Option B: Use FFmpeg on Windows

To use FFmpeg on Windows via downloading its archive:

Step 1. Download FFmpeg’s latest release build. Then, use a program like WinRAR or the free 7-Zip to extract the files from the download.
Downloading FFmpeg's full build from GitHub

Step 2. Rename the main extracted folder to ffmpeg and move it to the root folder of your local drive (e.g., C:). The folder’s path should now look something like C:\ffmpeg or D:\ffmpeg (depending on your local disk setup).
Moving FFmpeg's core folder to Local Disk C

Step 3. Open PowerShell from the Start menu.
Opening Windows PowerShell from the Start menu

Step 4. Execute the following command to prime FFmpeg for the session:

$env:Path += ";C:\ffmpeg\bin”

Priming FFmpeg via Windows PowerShell

Step 5. Next, execute the following command to open the appropriate directory for the session:

cd C:\Users\Lex\Desktop\Demo

Replace C:\Users\Lex\Desktop\Demo with the appropriate directory path leading to your video file.

Changing operation directory in Windows PowerShell

Step 6. Finally, you can run the special FFmpeg command to re-encode your video with the appropriate parameters:

ffmpeg -err_detect ignore_err -i “corrupt.m4v” -c:v libx264 -crf 22 -preset slow -c:a aac -movflags faststart “repaired.mp4”

Running FFmpeg's transcode command in Windows PowerShell

After running the above command in PowerShell, you’ll find repaired.mp4 (or whatever you opted to name the new file) in the same location as the original corrupted video file. Try opening it with VLC Media Player.

Method 5: Repair Incomplete M4V Video Files Using Untrunc

A “truncated” video is one that was abruptly cut short during the writing process, and it leaves you with intact audio and video streams but an incomplete and unplayable file. Untrunc is a free and open-source tool that was developed specifically to fix or “untruncate” such corrupted videos by using a similar file as a blueprint.

Like FFmpeg, Untrunc can only be installed and operated through the Terminal app (macOS) and Command Prompt (Windows). But don’t worry—we provided step-by-step guides for both platforms so even beginners can make use of this complex but highly effective tool.

Untrunc requires a “healthy file sample” to work. Ideally, this is a video clip that was taken immediately before or after the corrupted clip, with the same camera settings.

Option A: Use Untrunc on Mac

To use untrunc on macOS via Homebrew installation:

Step 1. Open any browser on your computer and navigate to brew.sh. Then, click the clipboard icon beside the snippet of code to copy it.
Copying Homebrew's installer code from the brew.sh website

Step 2. Next, open the Terminal app and paste the code you copied from the snippet in step 1. Executing this code installs Homebrew, which will allow you to install the Docker environment for running untrunc.
Running Homebrew's installer code in the Terminal app

Step 3. After installing Homebrew, execute the following command to install Docker:

brew install —cask docker

Installation Docker via Homebrew in the Terminal app

Step 4. Open the newly installed Docker app (feel free to skip through the pop-up menus) and make sure the dashboard says “Engine Running.”
Checking Docker's dashboard for the "Engine Running" status

Step 5. On your browser, navigate to the GitHub page of Untrunc’s latest version. Click the green < > Code button and select Download ZIP from the dropdown menu. This will start downloading a folder called untrunc-master.
Downloading Untrunc's ZIP file from GitHub

Step 6. Open the Terminal app again. Type the string cd plus one space. Then, drag the untrunc-master folder into the Terminal window. Hit Return.
Dragging the untrunc-master folder into the Terminal window

Step 7. Next, run the following command to build Docker with the dependencies we need for this operation:

docker build --build-arg FF_VER=3.3.9 -t untrunc .

Building the Docker app in Terminal with FFmpeg dependencies

Step 8. Finally, execute the following command to run the untrunc operation on your file:

docker run -v ~/Desktop/demo/:/mnt untrunc /mnt/healthysample.m4v /mnt/corrupt.m4v

Running Untrunc's command in the Terminal app

Once the untrunc operation is complete, you’ll find the new file saved in the same location as your corrupted video. It will have the same filename with _fixed added to the end.

Option B: Use Untrunc on Windows

To use untrunc on Windows via WSL:

Step 1. Open PowerShell as Administrator.
Running Windows PowerShell as Administrator via the Start menu

Step 2. Run the following command to enable WSL (Windows Subsystem for Linux):

wsl —install

Restart your computer when prompted.

Installation WSL via Windows PowerShell

Step 3. Download Docker Desktop from the official website.
Downloading the Docker Desktop installer

Step 4. During installation, make sure to check the option to Use WSL 2 instead of Hyper-V.
Selecting WSL 2 for Docker Desktop setup

Step 5. Launch the Docker Desktop program and look for the words Engine running on the dashboard.
Checking Docker Desktop's dashboard for the Engine Running status

Step 6. Open any browser on your PC and navigate to the GitHub page of Untrunc’s latest version. Then, click the < > Code button and select Download ZIP.
Downloading untrunc from GitHub

Step 7. Unzip the downloaded file and save the untrunc-master folder somewhere convenient. In my case, I saved it to C:\Users\Lex\Desktop.
Saving untrunc's folder to the PC's Desktop folder

Step 8. Open PowerShell again and run the following command to navigate to Untrunc’s directory:

cd C:\Users\Lex\Desktop\untrunc-master

Replace the path string with the appropriate location of untrunc-master on your PC.

Using the CD command in PowerShell to navigate to Untrunc's folder

Step 9. Next, run the following command to build the Docker image with the appropriate dependencies:

docker build --build-arg FF_VER=3.3.9 -t untrunc .

Building Untrunc in the Docker environment via PowerShell command

Step 10. Finally, execute the following command to run Untrunc’s operation on your corrupted video file:

docker run -v C:\Users\Lex\Desktop\demo:/mnt untrunc /mnt/healthysample.m4v /mnt/corrupt.m4v

Replace the file path based on where your corrupted video file is saved.

Running the Untrunc command in Windows PowerShell

After executing the command in step 8, you’ll find the repaired video in the same location as the original file. Open it with VLC Media Player and see if it works.

Before You Go: 3 Tips to Avoid Corrupted M4V Files

M4V file corruption commonly happens due to software and hardware errors, rather than camera errors. Most of the time, the file is either damaged due to said errors or written as incomplete. To prevent this from happening, we prepared a few simple tips.

First, ensure a stable network connection if transferring or downloading files online. Second, practice safe storage habits–eject storage devices properly, keep them dry, cool, and secure, and make sure they don’t fall on a hard surface. Finally, make sure that files are saved properly by the software before you shut down your computer.

Alejandro Santos
Chief Writer
Alejandro is Macgasm’s Chief Writer and Apple ecosystem enthusiast. He pens the majority of troubleshooting guides and software reviews for this website, tapping into his love for technology and extensive background in technical writing. He started his career by helping… Full Bio