Convert avi to mkv or add new tracks
This article shows how to losslessly convert from avi to mkv format
The key program to convert from avi to mkv is called mkvmerge.

Example:

mkvmerge -v -o myfile.mkv myfile.avi

You could add a subtitle file using

mkvmerge -v -o myfile.mkv myfile.avi myfile.srt You could add an audio track using

mkvmerge -o mynewfile.mkv myfile.mkv audio.mp3

Media Lab Overview
LIACS Homepage
MM Conf
ACM Multimedia
ACM ICMR
IAPR ICPR
Science Direct
IEEE Library
LIACS Publications
ACM Digital Library