PDA

View Full Version : Avalon's little Guide: MKV2AVI/MPEG


Amnon82
16th March 2004, 21:21
I wrote for the german doom9 a guide called OGM2AVI/MPEG.
Now it is MKV2AVI/MPEG.
I think that the people here can do it with this little guide.
If somebody wants it with pics, I can write it, cos I've holidays now.
It is also possible that I write this guide for this doom9.page if the man/girl behind doom9.org want this.

And here we go:


THE AVI METHODE:

Start VirtualDubMod (VDM).
Load Your MKV-file.
Go to 'Streams\Streamlist'
Mark the Audiofile and click on 'Demux'.
Go to 'Video\Direct Stream Copy'
Go to 'File\Save As...'
Choose the AVI Container and hit Save.
So You have a AVI without a Audio and the audiofile.
If you want the Audio into the container reopen VDM (if You closed it...)
Open the AVI.
Go to 'Streams\Streamlist'
Click on 'Add'.
Choose the Audiofile.
If the Audiostream was OGG, You must reencode it in MP3 or some other format which is supported by the AVI-Container.
Click 'Ok'.
Save again the AVI using 'File\Save As...' or press 'F4'.

THE MPEG METHODE:

Start VirtualDubMod (VDM).
Load Your MKV-file.
Go to 'Streams\Streamlist'
Mark the Audiofile and click on 'Demux'.
Go to 'Video\Direct Stream Copy'
Go to 'File\Save As...'
Choose the AVI Container and hit Save.
So You have a AVI without a Audio and the audiofile.
Start DRPEnc (http://rj-elektronik.de/avideo/maineng.php?set=DRPEnc).
Setup DRPEnc.
Go to 'Source'.
Open at 'Supported Files' Your AVI-file.
Go to 'Advanced'.
Select at 'Templates' a template You want.
Change some settings if You want.
(Prediction works only with D2V-files till now...)
Go to 'Encode'.
Set the Outputfile.
Hit 'Create Batchfile'.
Hit 'Save and Encode'.
Wait for the MPEG-File.

If You need it read the DRPEnc Manual (http://rj-elektronik.de/avideo/files/DPREnc%200.2%20Manual.pdf).

bond
16th March 2004, 23:35
thanks a lot for the guide, but of course it also has to be said that these guides are not usable if there are newer codecs stored in .mkv as it is often the case, like rv9 or vorbis, as for example they cant be stored in (old outdated) avi

so to say its often not that easy to get rid of matroska like these guides maybe make people think ;)

Amnon82
17th March 2004, 21:28
Yes I know. The new codecs are to faaassttt also in changing...

gizmotech
18th March 2004, 00:33
It's also completely useless if the person has used the vfr technologies.

A few disclaimers should be added to it.

Gizmo.

unmei
26th March 2004, 05:19
it will become even more funny once native mpeg-4 becomes standard in matroska ..i don't mean 'default', but rather i bet once it can be done easily, i will most likely not be the only one to drop the avi-compatibility-mode quickly and with joy.

msgallin
11th January 2005, 02:55
Great Guide that you posted... But I'm unsure how to re-encode the OGG Audio Track into an MP3 file that I can use to re-encode my AVI file. Can you give me any advice? Thanks:confused:

celtic_druid
11th January 2005, 03:24
mencoder.exe -ovc copy -oac mp3lame input.mkv -o output.avi
Re-encode the audio and remux in one go. You could also use something like BeSweet to re-encode the audio seperatly.

msgallin
11th January 2005, 03:49
I'll give that a try.

bugmenotwillyou
17th July 2005, 18:46
I wrote for the german doom9 a guide called OGM2AVI/MPEG.
Now it is MKV2AVI/MPEG.
I think that the people here can do it with this little guide.
If somebody wants it with pics, I can write it, cos I've holidays now.
It is also possible that I write this guide for this doom9.page if the man/girl behind doom9.org want this.

And here we go:


THE AVI METHODE:

Start VirtualDubMod (VDM).
Load Your MKV-file.
Go to 'Streams\Streamlist'
Mark the Audiofile and click on 'Demux'.
Go to 'Video\Direct Stream Copy'
Go to 'File\Save As...'
Choose the AVI Container and hit Save.
So You have a AVI without a Audio and the audiofile.
If you want the Audio into the container reopen VDM (if You closed it...)
Open the AVI.
Go to 'Streams\Streamlist'
Click on 'Add'.
Choose the Audiofile.
If the Audiostream was OGG, You must reencode it in MP3 or some other format which is supported by the AVI-Container.
Click 'Ok'.
Save again the AVI using 'File\Save As...' or press 'F4'.

THE MPEG METHODE:

Start VirtualDubMod (VDM).
Load Your MKV-file.
Go to 'Streams\Streamlist'
Mark the Audiofile and click on 'Demux'.
Go to 'Video\Direct Stream Copy'
Go to 'File\Save As...'
Choose the AVI Container and hit Save.
So You have a AVI without a Audio and the audiofile.
Start DRPEnc (http://rj-elektronik.de/avideo/maineng.php?set=DRPEnc).
Setup DRPEnc.
Go to 'Source'.
Open at 'Supported Files' Your AVI-file.
Go to 'Advanced'.
Select at 'Templates' a template You want.
Change some settings if You want.
(Prediction works only with D2V-files till now...)
Go to 'Encode'.
Set the Outputfile.
Hit 'Create Batchfile'.
Hit 'Save and Encode'.
Wait for the MPEG-File.

If You need it read the DRPEnc Manual (http://rj-elektronik.de/avideo/files/DPREnc%200.2%20Manual.pdf).


MA CHE CAZZO DICI???? WHAT A FUCK YOU SPELL???

buzzqw
17th July 2005, 20:50
Please respect forum rules

4) Be nice to each other and respect the moderator. Profanity and insults will not be tolerated. If you have a problem with another member turn to the respective moderator and if the moderator can't help you send a private message to Doom9.

I am italian (e quindi capisco quello che hai scritto), and what you write is enough to get striked.

Please, again, report your problem and DO NOT INSULT.

Thanks

BHH

vlada
18th July 2005, 11:01
I believe there is a mistake in the guide. If you demux audio, it doesn't mean, that it won't be processed. You have to disable it. But why should I demux the sound? If the file is an MPEG-4 ASP CFR, with MP3/AC3/AAC sound, I just open my MKV and save it as AVI (with Direct Stream Copy). I don't have to demux sound unless it is Vorbis (OGG is a container, Vorbis is the copmression).
But if my MKV has an MPEG-4 AVC or RV9 inside, I'm affraid it won't work anyway.

gaspah
18th June 2007, 08:07
I've had a lot aboutof problems converting mkv to dvd... I've just got it... all I need for perfect, dual audio, dual subtitle, true widescreen (not 16:9 inside a 4:3) is a program that converts .ass subtitles to .srt subtitles and I'm laughing...

But this guide is a bit useless at the moment, as I've only come across a few older mkv files that actually open in virtualdubmod...

i havent searched for other mkv conversion guides..

if i can't find one i'll write one.. but i can't figure out a way to do it with 'free' software yet..

vlada
18th June 2007, 11:59
gaspah
Converting MKV to DVD-Video with free SW is very easy. Just follow these steps:
1) Demux audio (MKVToolnix + MKVExtract GUI)
2) Compress audio to AC3 if it is another format (with BeLight f.e.)
3) Make an AviSynth script to convert video. Something like
DirectShowSource("video.mkv")
LanczosResize(720,436)
AddBorders(0,70,0,70)
(this script is for video with AR 2.35:1, PAL)
4) Open your AviSynth script with HC and compress video.
5) Covert subtitles to SRT (SubtitleWorkshop) and then to SUP (SubtitleCreator)
6) Mux video, subtitles and audio streams with Muxman.
7) Burn your DVD

Or use an automated tool such as DVDFlick or FAVC.

beto
6th September 2007, 03:06
The OP method (specifically the AVI one) works only if you have one MKV file.
I tried appending 2 MKV segments of the same movie and convert them to a single AVI file. This does not work properly with VirtualDubMod. After the junction frame the file does not play correctly.
For it to work properly you have to use mkvtoolnix first to append the MKV segments and then use VirtualDubMod to convert to AVI.

vlada
8th September 2007, 18:25
Most MKV files can't be opened in VirtualDubMod. This program is unfortunately very outdated and doesn't work with MKV/h.264 files.

If you want to convert MKV to a different format, I'd suggest you to use Avisynth.

beto
12th September 2007, 18:10
I'm curious as how to convert MKV to AVI using Avisynth. How do you do it? Is it a one step procedure?

buzzqw
12th September 2007, 20:20
feeding virtualdub with directshowsource ... and reencoding... ;)

BHH

vlada
12th September 2007, 20:40
Or use ffmpeg source in AviSynth. But if you don't have to change video compression, you can convert MKV to AVI losslessly (at least the video part).

The advantage of using Avisynth is that you can then open the script in VD to create AVI/MPEG-4 ASP, in MeGUI to create MP4/MPEG-4 AVC, in HC or QuEnc to produce MPEG-1/2 or create WMV through WMNicEnc. All these applications take AviSynth script as input.

buzzqw
12th September 2007, 20:55
just fyi even AutoMKV take avs as input ... ;)


BHH

beto
13th September 2007, 03:01
Or use ffmpeg source in AviSynth. But if you don't have to change video compression, you can convert MKV to AVI losslessly (at least the video part).

The advantage of using Avisynth is that you can then open the script in VD to create AVI/MPEG-4 ASP, in MeGUI to create MP4/MPEG-4 AVC, in HC or QuEnc to produce MPEG-1/2 or create WMV through WMNicEnc. All these applications take AviSynth script as input.

Sorry, but I did not understand much of your post. I feel really stupid and pardon my ignorance....
I don't need to reencode, but to make a direct stream copy (audio in ac3 and video in xvid) from a MKV container to an AVI container. It seems simple but it is much harder than I thought it would be...

Nicholi
13th September 2007, 07:56
Demux the streams with mkvextract, and remux with AVI-Mux GUI. Fairly simple, and no re-encoding required. That will work for what you described at least: Xvid video and AC3 audio. Unless the video is vfr then you'll most likely have to re-encode it...unless there are only a few segments with the changing/differing framerate you can easily trim out.

beto
13th September 2007, 16:53
@Nicholi
Thanks for the information. I have no variable frame rate in my matroska files (I suppose vfr means this).
I tried your approach and it worked. Thanks again. :)

vlada
14th September 2007, 00:27
beto
I was talking about the situation when you have to transcode your video. MPEG-4 ASP in Matroska is not a very usual situation (there is no XviD format, XviD is a codec which creates video in MPEG-4 ASP format). So I thought you want to transcode your video. Nicholi already gave you a very good advice. You could also try latest version of Avidemux, which has support for MKV.

element72
10th June 2008, 19:38
if i remember correctly, avi doesn't like avc right? If this is right, then how would I got about dealing with the avc codec, while converting it to avi.

vlada
10th June 2008, 20:13
element72
ÄVC in AVI is possible. It is not recommended to use but it works. The main point for every conversion is Why. Usually people want to convert video to AVI because of compatibility with HW players. These players usually don't support AVC. So even if you convert your video to AVI and leave the original compression, it won't help you to gain any better compatibility.