Page 1 of 2

No AudioStream? New fix for MKV files

Posted: Wed Feb 13, 2008 2:15 am
by George Adams
I have had several times where, when I opened Matroska (.mkv) files in AVI2DVD, the "Choose AudioStream" option was blanked out. Since AVI2DVD would always insist that I "Choose an audiostream" before it would start, I was unable to convert these files.

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:
  1. Download and install MKVToolnix
  2. 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).
  3. 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.)
  4. 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...
  5. 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".
  6. 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")
  7. 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.)
  8. 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.
  9. 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...)
  10. Set your output filename to something appropriate (use a .mkv extension) and click "Start Muxing".
If all goes well, you'll end up with a new .mkv file that has the video as the first track (use MatroskaDiag on it to double-check), and its audio track will be listed when you open it in AVI2DVD.

Posted: Wed Feb 13, 2008 2:17 am
by trustfm
i made this post sticky !
Thanks !

Posted: Thu Feb 21, 2008 3:08 pm
by Ali
Thanks for this tip George it solves a problem I have at the moment where I can't get Avi2DVD to convert some mkv files. However, on following your instructions, I get the following issue: when I run mkvmerge (Step 6 in your guide), only the AC3 audio track is listed as a supported file - the h264 video track is not available for me to add. Maybe I have a codec missing, or something else quite simple? I hope you can help, as this will enable me to successfully convert these mkv files. So far the whole format has been a pain for me as I always want to watch stuff from my DVD player.
Cheers
Ali

Posted: Fri Sep 12, 2008 8:12 am
by Spunked
Your instructions are very hard to follow, i have no audio stream and hoping for a fix do you have anything nice and simple fix for dummies like me who aren t pc geeks - thanks a bunch . . .

Posted: Sat Sep 27, 2008 6:16 pm
by Finnius
I have had to extract mkv files before, and the process is too laborous just to burn a movie. I am hoping that after Beta 4.5 we will see this issue resolved. In the meantime, I am going to continue to use an alternate program for my converting/burning needs with mkv files. I WILL be watching this site for any updates and issue resolutions. Honestly, i am unhappy with some of the results with my other program (synching issues mostly)...and i'm hoping that YOUR program will solve that issue as well.

Still no DTS support?

Posted: Tue Nov 25, 2008 9:58 am
by NQK
A friend of mine, who had good experience with Avi2DVD using CCE, always recommend this application to me if I should convert MKVs to DVDs. He said even with only 1 pass, the resulted DVD was quite good, much better than others, including ConvertXtoDVD, which is commercial. And his screenshots proved it.

But in order to utilize Avi2DVD, it may take a lengthy procedure (according to his tutor), from extracting dts soundtrack, converting it to ac3, remux everything to mkv and load it to Avi2DVD, which is currently not supporting DTS.

My wishes include

1) a good support for DTS soundtrack (or at least external sountrack)
2) support for subtitle embedded in mkv file
3) DVD-menu template

Posted: Sat Feb 07, 2009 1:18 am
by Kalisary
Thank you George. This fix worked perfectly for me. Your instructions were very clear and concise.

Thank you again,
Kalisary.

Posted: Sat May 16, 2009 11:37 am
by atlas99
Hey guys I'm new to this board but seem to be having some new problems

when I followed the above steps I still can't get an audio stream.

I changed the name of the file and i get an audio stream however i get the divison by zero error.

also when i was looking at the files my original mkv file had the video and not the audio as the first track but I still wasnt getting an audio track?????????????

Also my file had a 3rd track for subs.

Thanks guys.

Posted: Sat May 30, 2009 5:19 am
by xxPatangTangxx
In Step 4:

You say that Check to see if "Track 1" is audio and "Track 2" is video. But when I check it with MatroskaDiag it says my track 1 is video and track 2 is audio. What do I do now?

Posted: Sat Nov 28, 2009 12:51 pm
by kjohnr2001
hi all - downloaded a .mkv file, again as discussed on other occasions - no audio stream showing up.
after dropping into MatroskaDiag, the audio stream shows as a DTS stream.
any ideas as to whether there is a workaround or other fix to enable a conversion?
any help would be much appreciated
KJR :?