Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After a video is cut, the player (mplayer) cannot jump to a specific time position anymore. Clicking the timeline will usually end the playback. How can this be fixed?

share|improve this question

The trimmed video probably has a broken AVI index. The idx1 tag in the AVI file format identifies where the data chunks are, so if the index is missing, the player won't know where to look for data chunks at a given timestamp.

This is somewhat expected since the raw bitstream is cut off somewhere using FFmpeg's -c:v copy option in your linked question.

I'm not aware of any FFmpeg command to fix the index, but mencoder should have it.


Force index rebuilding. Useful for files with broken index (A/V desync, etc). This will enable seeking in files where seeking was not possible.

If you download this unofficial mencoder build from Stef Pause's blog, you can try to fix the AVI.

cd ~/Downloads
chmod +x mencoder
mv mencoder /usr/local/bin/

Then, enter:

mencoder -forceidx input.avi -o output.avi -oac copy -ovc copy

This will recreate the index for your AVI file. Good luck — if it's not working, you're probably better of re-encoding the original video after trimming.

share|improve this answer
-forceidx output a smaller .avi (146 becomes 119MB) and corrupted the avi. I might need to go for the recode way... – ohho May 10 '12 at 10:05
AVI is a pesky container. If you re-encode, check out existing answers and this as well as this. – slhck May 10 '12 at 10:10
Thanks very much for the great links! – ohho May 10 '12 at 10:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .