[Matroska-users] MKV to AVI

Christian HJ Wiesner chris at matroska.org
Mon Jan 2 21:01:25 CET 2006


 
Craig,

there is good news and bad news.

First the good news : the video stream is XviD (MPEG ASP Advanced Simple 
Profile), and is compatible with AVI and most likely your standalone 
player. Only exception could be, if the MKV file you are having is VFR 
(Variable Framerate), but these are very rare and mainly only appear in 
the anime scene.

Now the bad news : The audio compression format used in your file is one 
of the best that is currently available, AAC (Advanced Audio Coding 
Format)  is a super efficient HE mode. This can not be put into AVI with 
normal tools (only avi-mux GUI can), and even if you could then for 100% 
certain your player wont be able to decode it. Your player will most 
likely only support MP3 in AVI for audio.

This means, conversion is possible but not easy. This is how to do it :

1. Use mkvextract from the MKVtoolnix package 
(http://mkvmerge.matroska.org) to extract the XviD video stream. It will 
automatically be output into an AVI, which can later be processed with 
Virtualdub for muxing the new audio in. Note : There is a nice GUI 
called MKVextractgui on corecodec.org 
(http://mkvextractgui.corecodec.org) , if you dont like CLI programs. 
Just unzip it into the same folder where mkvtoolnix is and run the .exe .

2. Also use MKVextract to extract the one audio stream you like to hear, 
as your player will also most likely not allow switching between audio 
tracks, so you have to choose which one you want. As the 2nd one is the 
Director's commentary, i guess only Nr. 1 is of interest. The extension 
of the track will most likely be  .aac , but i am not 100% certain about 
that.

3. Download the great audio player and conversion program Foobar2000 
from http://foobar2000.org (i'd go for the special installer - it has a 
matroska parser built in, that will allow you to open the MKV directly 
and convert the first audio track into MP3, so you can skip the 
extraction process in 2.). It will allow you to open the .aac file and 
convert it into MP3, using lame.exe (the great free MP3 encoder). Right 
click on the AAC track in the playlist, goto 'conversion' 'settings' and 
select MP3 as output format, bitrate about 128 kbps. I'd prefer VBR mode 
for quality reasons, but some older standalone player will only support 
CBR MP3. I'd test VBR first, and make a 2nd file with CBR if it doesnt 
work on your standalone.

4. Download VirtualdubMod 1.5.10.2 from 
http://sf.net/projects/virtualdubmod and open your AVI file, as from 1. 
. Goto 'streams' , 'add audio stream' and point it to your .MP3 file. 
Then goto 'file' 'save as ...' and select AVI as format and give it a 
new name. The result should be a new AVI file with the unchanged video, 
and the converted audio in MP3 format.

This file should play fine on your standalone. If it cant handle the VBR 
MP3 (most units today can), redo step 3. and 4. , but with 'CBR' 
setttings for the lame encoder.

Regards

Christian
matroska project admin



Craig Watson schrieb:

> Here is the text: (let me know)
>
> Matroska file info : C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].mkv
> File size : 251.43 MB
> File complete : yes
> Duration : 01:02:08.426
> Title : The Wire - 101 - The Target (with optional commentary)
> Writing application : mkvmerge v0.9.1 built on Jun 15 2004 23:29:28
> Muxing application : libebml v0.7.0 + libmatroska v0.7.0
> Date : 2003-11-01 04:17:07.000
> Tracks : 3
> Track 1 : Audio
>   - Codec : AAC HE (High Efficiency) Low Complexity with Spectral Band 
> Replication (A_AAC/MPEG4/LC/SBR)
>     - Possible filter : CoreAAC
>       - Installed : no
>       - Link : http://coreaac.corecodec.org
>   - Language : English (eng)
>   - Sampling Frequency : 24000
>   - Output Sampling Frequency : 48000
>   - Channels : 2
> Track 2 : Audio
>   - Codec : AAC HE (High Efficiency) Low Complexity with Spectral Band 
> Replication (A_AAC/MPEG4/LC/SBR)
>     - Possible filter : CoreAAC
>       - Installed : no
>       - Link : http://coreaac.corecodec.org
>   - Name : Director's Commentary
>   - Language : English (eng)
>   - Sampling Frequency : 24000
>   - Output Sampling Frequency : 48000
>   - Channels : 1
> Track 3 : Video
>   - Codec : Microsoft VFW compatibility mode (V_MS/VFW/FOURCC)
>   - Fourcc : XviD MPEG-4 codec (XVID)
>     - Possible filter : Xvid
>       - Installed : yes, in C:\WINDOWS\system32\xvid.ax
>       - Link : http://www.xvid.org
>     - Possible filter : ffdshow
>       - Installed : yes, in C:\Program Files\Matroska 
> Pack\ffdshow\ffdshow.ax (1.0.2.3)
>       - Link : http://sourceforge.net/projects/ffdshow
>   - Language : English (eng)
>   - Pixel Width : 448
>   - Pixel Height : 336
>
> DirectShow RenderFile check :
> Matroska Splitter : Gabest's Matroska Splitter
>   - Installed : no
>   - Can be created : no
> Matroska Splitter : Haali's New Matroska Splitter
>   - Installed : yes, in C:\Program Files\Matroska Pack\haali\splitter.ax
>   - Can be created : yes
> RenderFile with DirectShow : OK
>
> DirectShow detailed rendering :
> 0> MyRenderFile : C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].mkv
> 0> Creation of GraphBuilder : OK
> 10> Creation of FilterMapper2 : OK
> 40> Adding graph to ROT : OK
> 110> Creation of source filter : OK
> 110> # Rendering output pin C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Video)
> 120> Filters matching mediatype : ffdshow MPEG-4 Video Decoder, DivX 
> Decoder Filter, DirectVobSub (auto-loading version), Video Renderer, 
> DivX Decoder Filter, XviD MPEG-4 Video Decoder, LEAD MCMP/MJPEG 
> Decoder, AVI Decompressor, Nero Video Decoder, Nero DVD Decoder
> 120> Trying connection to ffdshow MPEG-4 Video Decoder :
> 260> Failed connecting pin to ffdshow MPEG-4 Video Decoder, removing 
> it now.
> 270> Trying connection to DivX Decoder Filter :
> 280> OK, connected to (XForm In)DivX Decoder Filter
> 280> # Rendering output pin C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Video) -> DivX Decoder Filter(XForm Out)
> 290> Filters matching mediatype : ffdshow MPEG-4 Video Decoder, 
> DirectVobSub (auto-loading version), Video Renderer, LEAD MCMP/MJPEG 
> Decoder, AVI Decompressor, Nero Video Decoder, Nero DVD Decoder
> 290> Trying connection to ffdshow MPEG-4 Video Decoder :
> 321> Failed connecting pin to ffdshow MPEG-4 Video Decoder, removing 
> it now.
> 321> Trying connection to DirectVobSub (auto-loading version) :
> 361> Failed connecting pin to DirectVobSub (auto-loading version), 
> removing it now.
> 361> Trying connection to Video Renderer :
> 401> OK, connected to (VMR Input0)Video Renderer
> 401> Completed path : C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Video) -> DivX Decoder Filter(XForm Out) -> Video 
> Renderer
> 401> # Rendering output pin C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Audio)
> 401> Filters matching mediatype : AC3Filter, ffdshow Audio Decoder, 
> Moonlight Odio Dekoda, DirectVobSub (auto-loading version), ACM Wrapper
> 401> Trying connection to AC3Filter :
> 401> Failed connecting pin to AC3Filter, removing it now.
> 411> Trying connection to ffdshow Audio Decoder :
> 441> OK, connected to (In)ffdshow Audio Decoder
> 441> # Rendering output pin C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Audio) -> ffdshow Audio Decoder(Out)
> 451> Filters matching mediatype : AC3Filter, ffdshow Audio Decoder, 
> Moonlight Odio Dekoda, Elecard PVA Demultiplexer, Elecard MPEG2 
> Demultiplexer, DirectVobSub (auto-loading version), Default 
> DirectSound Device, MainConcept MPEG Splitter, RealMedia Splitter, ACM 
> Wrapper
> 451> Trying connection to AC3Filter :
> 461> Failed connecting pin to AC3Filter, removing it now.
> 461> Trying connection to Moonlight Odio Dekoda :
> 461> Failed connecting pin to Moonlight Odio Dekoda, removing it now.
> 461> Trying connection to Elecard PVA Demultiplexer :
> 471> Failed connecting pin to Elecard PVA Demultiplexer, removing it now.
> 471> Trying connection to Elecard MPEG2 Demultiplexer :
> 471> Failed connecting pin to Elecard MPEG2 Demultiplexer, removing it 
> now.
> 471> Trying connection to DirectVobSub (auto-loading version) :
> 491> Failed connecting pin to DirectVobSub (auto-loading version), 
> removing it now.
> 491> Trying connection to Default DirectSound Device :
> 551> OK, connected to (Audio Input pin (rendered))Default DirectSound 
> Device
> 551> Completed path : C:\Documents and Settings\Craig Watson\My 
> Documents\Movies\The Wire - season 1 complete\The Wire - 101 - The 
> Target [FuckGov].m(Audio) -> ffdshow Audio Decoder(Out) -> Default 
> DirectSound Device
> 551> MyRenderFile finished : OK
>
>
>
>
>
> ----Original Message Follows----
> From: Christian HJ Wiesner <chris at matroska.org>
> Reply-To: chris at matroska.org
> To: "Questions, help, instructions, talk about Matroska" 
> <matroska-users at lists.matroska.org>,  duncanschneider at hotmail.com
> Subject: Re: [Matroska-users] MKV to AVI
> Date: Tue, 27 Dec 2005 17:28:26 +0100
> MIME-Version: 1.0
> Received: from p15097576.pureserver.info ([217.160.128.146]) by 
> bay0-mc6-f18.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); 
> Tue, 27 Dec 2005 08:30:21 -0800
> Received: from localhost (localhost.localdomain [127.0.0.1])by 
> p15097576.pureserver.info (Postfix) with ESMTP id C7FA2440049;Tue, 27 
> Dec 2005 17:28:55 +0100 (CET)
> Received: from p15097576.pureserver.info ([127.0.0.1]) by localhost 
> (p15097576 [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 
> 15200-04; Tue, 27 Dec 2005 17:28:52 +0100 (CET)
> Received: from smtprelay.wiesneronline.net (p54927248.dip.t-dialin.net 
> [84.146.114.72])by p15097576.pureserver.info (Postfix) with ESMTP id 
> 3B56444003F;Tue, 27 Dec 2005 17:28:52 +0100 (CET)
> Received: from Spooler by smtprelay.wiesneronline.net (Mercury/32 
> v4.01a) ID MO0001B9;  27 Dec 2005 17:28:52 +0100
> Received: from spooler by wiesneronline.net (Mercury/32 v4.01a); 27 
> Dec 2005 17:28:44 +0100
> Received: from [10.226.137.66] (80.226.232.100) by 
> smtp.wiesneronline.net (Mercury/32 v4.01a) with ESMTP ID MG0001B8;   
> 27 Dec 2005 17:28:32 +0100
> X-Message-Info: JGTYoYF78jFSrZ5RXVtXrGrccxXLUlcLsRO5w+RhuwY=
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.7) 
> Gecko/20050414
> X-Accept-Language: en, de
> References: <BAY115-F52D4CD03EBDC448950445B5340 at phx.gbl>
> X-Virus-Scanned: by amavisd-new at bunkus.org
> Return-Path: chris at matroska.org
> X-OriginalArrivalTime: 27 Dec 2005 16:30:21.0953 (UTC) 
> FILETIME=[D516F710:01C60B02]
>
> Craig Watson schrieb:
>
>> I have a DVD player that plays AVI files.
>> Is there a way to change mkv files to AVI so that I can burn it to a 
>> disk and it will play on my inflexible hardware?
>
>
> Craig, MKV is a very powerful container and it can contain MANY 
> different video and audio compression formats. As a result of that, 
> there is no general statement if a MKV file can be converted into AVI 
> or not, and what is even more important for you, if your standalone 
> player can then play the AVI or not. Don't forget, while 99% of the 
> AVIs out there are MPEG4 video + MP3 audio (and this is very likely 
> the only profile your standalone can play), even the AVI container can 
> hold many different codecs.
>
> If you have the matroska full pack installed, there is a tool called 
> 'matroskadiag.exe' coming with it. It can analyze your MKV file and if 
> you send us the log of the scan to this list here (its a small txt 
> file) we can give you advice if its possible or not, and also if its 
> sensible or not.
>
> Christian
> matroska project admin
>
>
>




More information about the Matroska-users mailing list