2

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?

ohho
  • 3,124

1 Answers1

2

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.

-forceidx

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
unzip mencoder.zip
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.

slhck
  • 235,242