Fix a broken AVI video

I often find myself with a broken AVI video file. Either it doesn’t work at all, or it takes several seconds to begin playing, or seeking forward or backward reveals video artifacts. Here’s how to fix that broken file.

If you don’t have it, use your distro’s package manager to install mencoder, the Swiss army knife of video encoding. Then as user:

mencoder damaged_file.avi -idx -oac copy -ovc copy -o fixed_file.avi

-idx tells it to fix and rewrite the index, which should resolve the issue. -oac specifies the audio codec to use; in this case we only need to copy it. -ovc specifies the video codec to use; here again we merely copy it.

If you can’t stand the command line and simply must have a GUI application, DivFix++ seems to be the most popular choice.

Keyser’s Knowledge Base: Fix broken AVI in Linux
man mencoder


About Warren Post

So far: Customer support guy, jungle guide, IT consultant, beach bum, entrepreneur, teacher, diplomat, over-enthusiastic cyclist. Tomorrow: who knows?
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s