You have to be careful when transcoding from ogm to avi or mkv to avi. It will only work if the video and audio are each supported in avi. Here’s some examples where it might not work: AC3 audio, VBR (variable-bitrate) audio, ogg vorbis audio**, video codec with B-frames (for example some flavors of h.264, like x264). In some cases you may have multiple audio tracks, and “generic”* avi supports only one, so you’d have to pick one.
In any case, if you have something really simple, open it with VirtualDubMod, then click video, direct stream copy. Then click file, save as (you may or may not have to pick direct stream copy again), and pick your container. I don’t have a video with multiple audio streams to tinker with at the moment, so I don’t know what would happen in that case, but I don’t think it should be too hard to figure out.
* It’s possible to have multiple audio tracks in avi (as for example in videos produced by nandub), but it’s a rather ugly hack.
** you can have ogg audio in avi, but that’s another ugly hack
Finally I want to point out
this thread, (which actually points out my out-of-date knowledge of matroska). The idea is there’s probably more up-to-date tools for processing matroska than VirtualDubMod. You can find some of them listed on this page
http://www.matroska.org/downloads/ (after picking your platform, scroll down to find editors)