With some experimentation and some clues from Midas' post, I've discovered that AVI2DVD is apparently unable to recognize an audio stream in the MKV file if the audio is the first track in the file. So, if the audio is Track 1 and video is Track 2, AVI2DVD can't find an audio stream. If the video is Track 1, however, and the audio is Track 2, then AVI2DVD works just fine.
With that, I now know how to fix the .mkv files that AVI2DVD can't find an audio stream in, by unpacking and repacking the audio and video into the correct order. Here's how you can do it. You'll need the following tools:
- Download and install MKVToolnix
- Download and unzip MKV Extract GUI into the folder where MKVToolnix is installed. (the MKV Extract GUI and MKVToolnix executables need to be in the same folder).
- Download and unzip MatroskaDiag. Put its executable anywhere you want. (EDIT: this file seems to be missing now on the page I link to. For now (2008-03-31) it can be found here.)
- Run MatroskaDiag. Drag your .mkv file to it. Check to see if "Track 1" is audio and "Track 2" is video. If so, then AVI2DVD probably won't be able to handle it, and you'll need to extract and repack the .mkv. Read on...
- Run MKV Extract GUI. Specify your .mkv file for the "Input". For "Output", click the "Other" radio button and specify the directory wherever you want the extracted audio/video files to go (put it in a different directory from the source file, just to keep them separate). In the "Content" window, select both the audio and video track. Then click "Extract".
- Run "mkvmerge GUI" (part of the MKVToolnix package). Click "add" and go to the directory where your "Output" files were stored in the last step. Find the video file that came from the extraction, and add it. Then click "add" again and add the audio file. (Look for files that have the word "Track" in them. For instance if your original file was foo.mkv, the extracted audio will probably be named something like "foo_Track1.ac3" and the video will be "foo_Track2.h264")
- If mkvmerge warns you that it can't determine the FPS of the video file, you'll have to enter it manually. In the "Tracks" window, click the video file, then click the "Format specific options" tab. In the FPS dropdown box, enter the correct value. (Note that 30000/1001 = 29.970FPS and 24000/1001 = 23.976FPS). How do you know what value to put in? Find another utility that will read your original .mkv file and give you its FPS info. (one option is the "mkvinfo" tool that comes with MKVToolnix - open your original .mkv file in it, and hunt in the details for something that says "xxxx fps for a video track.)
- Make sure that the video track is listed above the audio track. If they are reversed, use the "up" and "down" buttons to put the video first.
- You may want to set other options, such as the language for both the video and audio track, and the aspect ratio for the video track. (Not sure whether all that's necessary or not...)
- Set your output filename to something appropriate (use a .mkv extension) and click "Start Muxing".