I've been banging my head against the wall for awhile now on how to convert downloaded anime mkv files to DVD. These files typically have h264 video, aac audio and either ass or ssa subs muxed together. My problem is that most encoders won't open mkv files, and if they do, the subtitles don't display properly. Windows Media Player 10 (on my machine) will open the mkv files, but won't play them with subtitles.

I finally got it to work last night, and this is how...

Install the following...
Avisynth
TextSub plugin for Avisynth
Haali Media Splitter
MKVtoolnix
MKVextractGui
TMPGEnc or another Avisynth compatible encoder

Step 1
Use MKVextractGui to extract the fonts and subtitle file from the mkv file. Install the fonts by copying to the fonts folder in c:\windows\. Save the subtitles file in the same directory as your mkv file.

Step 2
Open Notepad and make a file named video.avs that has the following text...

Directshowsource("c:\test\video.mkv")
TextSub("c:\test\subtitles.ass")

Obviously, your filenames and filepaths will be different. The idea here is to play the video via Windows (without subtitles) and then overlay the subtitles that we ripped out (via the TextSub function).

Step 3
Open the resulting file in TMPGEnc or the encoder of your choice and encode to your heart's content. That's it.