7.5. Fixing AVIs with broken index or interleaving
Előző | 7. fejezet - Encoding with MEncoder | Következő

## 7.5. Fixing AVIs with broken index or interleaving

Easiest thing. We simply copy the video and audio streams, and MEncoder generates the index. Of course this cannot fix possible bugs in the video and/or audio streams. It also fixes files with broken interleaving, thus the `-ni` option won't be needed for them anymore.

Command:

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

### 7.5.1. Appending multiple AVI files

As a side-effect, the broken AVI fixer function enables MEncoder to append 2 (or more) AVI files:

Command:

    cat 1.avi 2.avi > 3.avi
    mencoder -noidx -ovc copy -oac copy -o output.avi 3.avi

### Megjegyzés

This expects `1.avi` and `2.avi` to use the same codecs, resolution, stream rate etc, and at least `1.avi` must not be broken. You may need to fix your input AVI files first, as described above.

Előző | Fel | Következő
7.4. Stream copying | Tartalom | 7.6. Encoding with the libavcodec codec family